LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   slackware How to connect wireless network (https://www.linuxquestions.org/questions/linux-newbie-8/slackware-how-to-connect-wireless-network-4175495977/)

gonny95 02-23-2014 07:19 PM

slackware How to connect wireless network
 
I'm not able to connect a wireless network

The following codes are what I did

Code:

bash-4.2# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.30.1.57  netmask 255.255.255.0  broadcast 172.30.1.255
        inet6 fe80::ea11:32ff:fe3c:3d2  prefixlen 64  scopeid 0x20<link>
        ether e8:11:32:3c:03:d2  txqueuelen 1000  (Ethernet)
        RX packets 5086  bytes 5058760 (4.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4299  bytes 735227 (717.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I can't see wlan0 so I typed iwconfig
Code:

bash-4.2# iwconfig
wlan0    IEEE 802.11bgn  ESSID:off/any 
          Mode:Managed  Access Point: Not-Associated  Tx-Power=20 dBm 
          Retry  long limit:7  RTS thr=2347 B  Fragment thr:off
          Encryption key:off
          Power Management:off
         
lo        no wireless extensions.

eth0      no wireless extensions.

I turned up wlan0 so that I can use it
Code:

ifconfig wlan0 up
Now I can see it
Code:

ifconfig
wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::2e0:4cff:fe81:779b  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:81:77:9b  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 588 (588.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I can also see the ESSIDs
Code:

iwlist wlan0 scanning |grep ESSID
ESSID:"ESSID:MY_HOME"
      ESSID:""
      ESSID:"sangyoul"
      ESSID:"SK_WiFi1C47"
      ESSID:""

Seems like I can connect the wifi
So I tried to connect
Code:

iwconfig wlan0 essid MY_HOME
iwconfig

wlan0    IEEE 802.11bgn  ESSID:"MY_HOME" 
          Mode:Managed  Frequency:2.432 GHz  Access Point: 00:27:1C:90:4E:BB 
          Bit Rate=1 Mb/s  Tx-Power=20 dBm 
          Retry  long limit:7  RTS thr=2347 B  Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=69/70  Signal level=-41 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.

But It doesn't seem to be connected
There was no inet address
Code:

ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.30.1.57  netmask 255.255.255.0  broadcast 172.30.1.255
        inet6 fe80::ea11:32ff:fe3c:3d2  prefixlen 64  scopeid 0x20<link>
        ether e8:11:32:3c:03:d2  txqueuelen 1000  (Ethernet)
        RX packets 8014  bytes 8523392 (8.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6324  bytes 985119 (962.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::2e0:4cff:fe81:779b  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:81:77:9b  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 588 (588.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

So I tried dhclient in order to get inet address
Code:

dhclient wlan0
It freezes about 1 minute and not working
I can't connect the internet using wlan0
Code:

bash-4.2# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.30.1.57  netmask 255.255.255.0  broadcast 172.30.1.255
        inet6 fe80::ea11:32ff:fe3c:3d2  prefixlen 64  scopeid 0x20<link>
        ether e8:11:32:3c:03:d2  txqueuelen 1000  (Ethernet)
        RX packets 8065  bytes 8535001 (8.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6375  bytes 1005442 (981.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::2e0:4cff:fe81:779b  prefixlen 64  scopeid 0x20<link>
        ether 00:e0:4c:81:77:9b  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 588 (588.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


frankbell 02-23-2014 08:10 PM

Some essential information is needed: What make/model computer and what wireless chipset does it have (running lspci in a terminal should reveal that information, unless it's a USB dongle)?

gonny95 02-23-2014 08:27 PM

Yeah I'm using USB dongle
Its name is NEXT-201N MINI

It looks like this
http://ez-net.co.kr/new_2012/upload/...20MINI_800.jpg

And it provides drivers but I did't install
Because when I typed iwconfig seems that my computer recognized the usb dongle
http://www.ez-net.co.kr/ez-net/downl...20DRIVER_A.zip
http://www.ez-net.co.kr/ez-net/downl...20DRIVER_A.zip

frankbell 02-23-2014 08:49 PM

The system may be seeing the device but may not have the correct firmware for it.

Unfortunately, I have no personal experience with it and all the relevant links I can turn up seem to be in Korean.

This might be a case for ndiswrapper. I haven't had to use it for years. It can be hit-or-miss, but I have used it successfully (back on Slackware 10.x).

There is a Slackbuild: http://slackbuilds.org/result/?searc...rapper&sv=14.1

Alien Bob has an article on NDISWrapper at his wiki: http://alien.slackbook.org/dokuwiki/...re:ndiswrapper

gonny95 02-23-2014 09:51 PM

Wasn't there somthing wrong with my commands?

By the way, dhclient looks like resetting wlan0

Code:

bash-4.2# iwconfig wlan0 essid MY_HOME
bash-4.2# iwconfig
wlan0    IEEE 802.11bgn  ESSID:"MY_HOME" 
          Mode:Managed  Frequency:2.432 GHz  Access Point: 00:27:1C:90:4E:BB 
          Bit Rate=1 Mb/s  Tx-Power=20 dBm 
          Retry  long limit:7  RTS thr=2347 B  Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=68/70  Signal level=-42 dBm 
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.

bash-4.2# dhclient -v wlan0
Internet Systems Consortium DHCP Client 4.2.5-P1
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:e0:4c:81:77:9b
Sending on  LPF/wlan0/00:e0:4c:81:77:9b
Sending on  Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
bash-4.2# iwconfig
wlan0    IEEE 802.11bgn  ESSID:off/any 
          Mode:Managed  Access Point: Not-Associated  Tx-Power=20 dBm 
          Retry  long limit:7  RTS thr=2347 B  Fragment thr:off
          Encryption key:off
          Power Management:off
         
lo        no wireless extensions.

eth0      no wireless extensions.

bash-4.2#

------------------------

And I installed ndiswrapper and installed driver using it

When I type ndiswrapper -l
Code:

bash-4.2# ndiswrapper -l
netrtwlanu : driver installed
        device (0BDA:8176) present (alternate driver: rtl8192cu)

But When I try to connect wifi it is still not working
Code:

ifconfig wlan0 up
iwconfig wlan0 essid MY_HOME
dhclient wlan0


frankbell 02-24-2014 08:12 PM

Hopefully someone will come along and help us out.

I'm out of ideas without one of those devices to test. Do you have a different maybe more mainstream brand of dongle you could try, maybe borrow one from a friend for some testing? This list may help, though it's a bit dated: http://www.cyberciti.biz/tips/linux-...pter-list.html

allend 02-24-2014 11:12 PM

Quote:

device (0BDA:8176) present (alternate driver: rtl8192cu)
That USB device ID is associated with
Code:

USB: 0BDA:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
(from https://wiki.debian.org/rtl819x)

That device should be supported by the rtl8192cu kernel module. Is this module being loaded when you plug the device? (Check the output of 'lsmod')

Also, it may be easier trying to get this device working using the GUI frontend to NetworkManager. http://docs.slackware.com/slackware:...ation_services

gonny95 02-25-2014 12:28 AM

Thanks I feel like getting closer to the solution

kernel modules seem to be loaded properly

Code:

Module                  Size  Used by
ipv6                  234918  18
lp                      7474  0
ppdev                  4702  0
parport_pc            16472  0
parport                24879  3 lp,ppdev,parport_pc
fuse                  64207  7
hid_generic              733  0
rtl8192cu              58080  0
rtlwifi                61120  1 rtl8192cu
rtl8192c_common        32682  1 rtl8192cu
mac80211              372726  2 rtlwifi,rtl8192cu
usbhid                31706  0
hid                    70115  2 hid_generic,usbhid
cfg80211              319419  2 mac80211,rtlwifi
rfkill                12408  2 cfg80211
usb_storage            35805  0
snd_hda_codec_hdmi    26486  4
coretemp                3855  0
snd_hda_codec_realtek    30108  1
acpi_cpufreq            4479  1
mperf                    911  1 acpi_cpufreq
snd_hda_intel          29246  2
snd_hda_codec        123857  3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
snd_hwdep              4730  1 snd_hda_codec
snd_pcm                60504  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc          5894  2 snd_pcm,snd_hda_intel
snd_timer              14195  1 snd_pcm
snd                    43944  11 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec,snd_hda_intel
nouveau              870054  3
mxm_wmi                1119  1 nouveau
wmi                    7051  2 mxm_wmi,nouveau
ttm                    44502  1 nouveau
drm_kms_helper        31326  1 nouveau
kvm_intel            119260  0
kvm                  306633  1 kvm_intel
ehci_pci                2972  0
gpio_ich                3424  0
lpc_ich                11181  0
uhci_hcd              19323  0
intel_agp              8672  0
drm                  184126  5 ttm,drm_kms_helper,nouveau
intel_gtt              10108  1 intel_agp
processor              20557  1 acpi_cpufreq
video                  10162  1 nouveau
agpgart                21576  4 drm,ttm,intel_agp,intel_gtt
thermal_sys            18829  2 video,processor
r8169                  50804  0
freq_table              2104  2 acpi_cpufreq,thermal_sys
hwmon                    997  3 coretemp,nouveau,thermal_sys
i2c_dev                4471  0
i2c_i801              12385  0
i2c_algo_bit            4567  1 nouveau
evdev                  7448  5
soundcore              4218  1 snd
ehci_hcd              33259  1 ehci_pci
i2c_core              17440  6 drm,i2c_i801,i2c_dev,drm_kms_helper,i2c_algo_bit,nouveau
button                  3664  1 nouveau
microcode              7469  0
mii                    3263  1 r8169
loop                  14679  0

And I activated /etc/rc.d/rc.networkmanager It detected wifi access points but couldn't connect it
And when I activated it, suddenly my wired connection was disconnected
So I had to turn it off and connected wired connection using 'dhclient eth0'

And I also tried Wicd,Happily it didn't have the wired connection disconnected
But When I tried to connect wifi points
It says:
Resetting IP address...
Putting Interface up...
Obtaining IP address...
Connection Failed: Unable to Get IP Address

At last,I just tried making on a Android access point

And connecting to the AndroidAP was successful

I can connect the AndroidAP using dhclient command and networkmanger and Wicd

But unfortunately I failed to connect other wifi points

I guess there's problem in my home network

But I can connect other wifi points if I use my phone

But my computer can't connect

And there's also no problem with my usb dongle. I used to connect wifi when I was using windows

itsgregman 02-25-2014 12:57 AM

Shouldn't he be using the command "dhcpcd wlan0" instead of "dhclient wlan0" or do they both work?

gonny95 02-25-2014 01:52 AM

I'm not sure about how to use dhcpd
And don't know much about the difference between two
Anyway it doesn't seem to work
Code:

bash-4.2# dhcpd wlan0
Internet Systems Consortium DHCP Server 4.2.5-P1
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 leases to leases file.

No subnet declaration for wlan0 (no IPv4 addresses).
** Ignoring requests on wlan0.  If this is not what
  you want, please write a subnet declaration
  in your dhcpd.conf file for the network segment
  to which interface wlan0 is attached. **


Not configured to listen on any interfaces!

If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.

If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.

Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.

exiting.


notKlaatu 02-25-2014 02:38 AM

It should not be `dhcpd` but `dhcpcd`

Note the extra "c" in the correct command.

I use `dhcpcd` all the time and it works quite well but for all practical purposes it's the same as dhclient, so I don't think that's the issue.

But anyway, it sounds more like an issue with your network; as I understand it, you were able to connect to your android phone as an AP from your Slackware system, yes?

If so, maybe try temporarily turning off encryption on your home network and see if you can connect to it from your computer.

gonny95 02-25-2014 03:10 AM

Quote:

you were able to connect to your android phone as an AP from your Slackware system, yes?
yes.

but there's already no encryption on the wifi

see this

http://i58.tinypic.com/10qaobc.png

MY_HOME is what I'm trying to connect

I really don't know there is a problem in my home network Because when I was using windows there was no problem connecting wireless network

allend 02-25-2014 05:49 AM

Notice how all the access points in range are using WPA2. So should you! WEP and WPA are busted for security, so staying on WEP/WPA is just signing yourself up for the internet bills that people leeching on your connection should be paying. http://www.aircrack-ng.org/

First, set your access point to use only WPA2. Yes, it takes some more work handling the PSK key, but it is the only realistic option.

Second, I suggest that you try using NetworkManager rather than wicd.

Third, if you are using a GUI network manager in Slackware, make sure that the file /etc/rc.d/rc.inet1.conf is the same as originally installed. From the email to root titled ' Welcome to Linux (Slackware 14.1)!' (bold emphasis is mine)
Quote:

If you will be using wireless (or even a wired interface), you might
want to let NetworkManager handle your network connections. This is
a choice during the initial installation, but may also be selected
later by rerunning netconfig, or by setting the startup script
to executable (chmod 755 /etc/rc.d/rc.networkmanager). When Network
Manager is used to handle connections, a nice interface is provided
to scan for wireless access points and make changes to the network
configuration. This interface runs automatically with KDE or Xfce.
In fluxbox, the nm-applet program will need to be launched. Other
window managers lack a system tray to display nm-applet, so for those
you might want to look at wicd in /extra, which also provides a nice
GUI tool for connecting to wireless (or wired) networks. For window
managers that do not provide a tray for running programs, start
"wicd-client" to make changes. With NetworkManager or wicd, it's
a good idea to remove any existing network configuration in
/etc/rc.d/rc.inet1.conf first. This can be done by running netconfig
and setting the machine to use loopback. Then, if you're using
NetworkManager run it a second time and select NetworkManager.

Fourth, carefully check all settings when setting up the connection in NetworkManager. Look for a checkbox about saving settings for all users and ensure that it is checked.

Fifth, try making initial connection with dhcpcd as it is the default, but it may be that you will have more success if you switch to using dhclient. (I have a device that does not play well with NetworkManager and the version of dhcpcd in Slackware 14.1). The default setting is set in /etc/NetworkManager/NetworkManager.conf

Aside -
Not recommended until you have a working GUI network manager setup as wpa_supplicant can be picky about options.
Note - All of the following requires root privileges.
If you want to use a wireless LAN connection with WPA2 encryption from the command line, then you will need to use wpa_supplicant with a string of options after setting up the /etc/wpa_supplicant.conf configuration file. It would pay to check initially that your device is not turned off in software by using rfkill. After establishing the connection to your access point with wpa_supplicant, you will need to run dhcpcd or dhclient to further configure your internet connection via DHCP.

gonny95 02-25-2014 09:42 AM

I've followed what you said

I deleted wicd and set loopback using netconfig
I enabled /etc/rc.d/rc.networkmanager
I set networkmanager using netconfig

And it no longer disturbs the wired connection
Still, I'm only able to connect my AndroidAP

http://i58.tinypic.com/idxjwz.png

allend 02-25-2014 05:09 PM

If you can connect to the AndroidAP, then the NetworkManager setup and the appropriate kernel module loading are OK. There must be some configuration problem with the connection to the MY_HOME access point. Is there anything in the logs (check /var/log/messages and /var/log/syslog) that they may give a clue?

You can also get more detailed logging using the procedure in this post. http://www.linuxquestions.org/questi...9/#post5067787


All times are GMT -5. The time now is 06:58 AM.