LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux v4.1.7+ wlan0 problems connecting to wireless router (https://www.linuxquestions.org/questions/linux-newbie-8/linux-v4-1-7-wlan0-problems-connecting-to-wireless-router-4175559199/)

PancakesAndGizmos 11-18-2015 09:38 AM

Linux v4.1.7+ wlan0 problems connecting to wireless router
 
Hello to everyone on this forum. This is my first post, so please cut me a little slack...

Background - I came across a wonderfully finished "instructable" on building your own arcade. Naturally, "I need dis". This specific "instructable" calls out the use of a raspberry pi, and in particularly the use of flashing an .img to an SD card. "And bing, bang, boom your done!"

Currently - The arcade has been loads of fun. Stumbling through Linux has been extremely addictive :study: But! But-But-But-But-But! This wlan0 thing is going to kill me...

I don't really know how to explain everything that I have tried because I've tried a lot. But, what I can say is that asking for help on a forum is the first. I won't be able to copy and paste my messages. But, I am willing to manually type them out best I can.

I'll attempt to start. I am using a flashed .img of the most current RetroPie.img file.

The -uname -a:
Linux versin 4.1.7+ ARM6 compatiable-processor revision 7

I went to the local Walmart and picked up a Belkin n300

The lsusb: (when it is plugged in)
Bus 001 Device 005: ID 050d:845a Belkin Components F7D2101 802.11n Surf & Share Wireless Adapter v1000 [Realtek RTL8192SU]

The lsmod:

binfmt_misc 7113 1
snd_bcm2835 22339 0
snd_pcm 92573 1
snd_seq 62040 0
snd_seq_device 5130 1
snd_timer 23456 2
snd 68161 5
uinput 7756 0
r8712u 185465 0
bcm2835_gpiomem 3675 0
uio_pdrv_genirq 3690 0
uio 10009 1
hid_xinmo 1287 0
evdev 11370 4
joydev 9909 0

the dsmeg | grep r8712u:

[ 7.42.477] r8712u: module is from the staging directory, the quality is unknown, you have been warned.
[ 7.672703] r8712u: register rtl8712_netdev_ops to netdev_ops
[ 7.947359] usb 1-1.2-1: r8712u: USB_SPEED_HIGH with 4 endpoints
[ 8.099650] usb 1-1.2-1: r8712u: Boot from EFUSE: Autoload OK
[ 8.978105] usb 1-1.2-1: r8712u: Customer ID = 0x0000
[ 8.990260] usb 1-1.2-1: r8712u: MAC Address from efuse = c0:56:27:03:a6:6c
[ 9.004354] usb 1-1.2-1: r8712u: Loading firmware from "rtlwifi/rtl8712u.bin"
[ 9.023427] usbcore: registered new interface driver r8712u
[ 27.107792] r8712u 1-1.2.1:1.0 wlan0: 1 RCR=0x153f00e
[ 27.108676] r8712u 1-1.2.1:1.0 wlan0: 2 RCR=0x553f00e

I will be happy to add anything else upon request. Any help on this would be greatly appreciated! Thank you!

codeguy 11-18-2015 11:31 AM

Seems like it loaded ok. What does 'ifconfig -a' give you?

PancakesAndGizmos 11-18-2015 12:01 PM

Thank you so much for the response! Here is what your instructions gives me.

The ifconfig -a:
eth0 Link encap:Ethernet HWaddr b8:27:eb:be:1a:9a
UP BROADCAST MULTICAST MTU: 1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets: 0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local loopback
inet addr: 127.0.0.1 Mask: 255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 B) TX bytes:100 (100.0 B)

wlan0 Link encap:Ethernet HWaddr: c0:56:27:03:a6:6c
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B0 TX bytes:0 (0.0 B)

codeguy 11-18-2015 12:05 PM

Looks good. That wlan0 is your wireless. It doesn't have an IP yet, but it should work.

I'm not sure what distro RetroPie is based off of, so not sure how to set up the config. Does RetroPie have a network config? Does it not work? Do you get errors?

Try something like: "iwlist wlan0 scan"
and see if it finds near by access points.

codeguy 11-18-2015 12:09 PM

Have you read this? https://github.com/RetroPie/RetroPie...etting-Up-Wifi

PancakesAndGizmos 11-18-2015 12:22 PM

So I typed:

sudo iwlist wlan0 scan |less

I was able to slowly go through the available wireless connections and mine is one of the lists networks. I have definitely gone through the 3 methods in the link you posted. I did just notice something that might be of interest though.

When I typed:
"sudo ifup wlan0"
an error message reads:

wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
(And then it does the infamous DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval "blah, blah"
No DHCPOFFERS recieved
No working leases in persisten databases - sleeping

Note: I will again try the 3 methods listed in the link you provided and post my results

codeguy 11-18-2015 12:27 PM

I'll bet the wpa_supplicat config file is messed up, so it cannot run.

You should edit /etc/wpa_supplicant.conf (or whereever yours is) and check its syntax.

example configs at bottom: https://www.freebsd.org/cgi/man.cgi?wpa_supplicant.conf

You could also try starting wpa_supplicant yourself and see if you get errors:

wpa_supplicatn -iwlan0 -c/etc/wpa_supplicant.conf

codeguy 11-18-2015 12:30 PM

Oh, also, check /var/log/messages and/or /var/log/syslog, maybe here is a helpful error message in there.

PancakesAndGizmos 11-18-2015 12:34 PM

Ok, thank you! I will try this now

PancakesAndGizmos 11-18-2015 12:49 PM

So the first thing I tried was to run wpa_supplicant myself

I typed: sudo wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
and got a response of:
rfkill: Cannot open RFKILL Control Device

PancakesAndGizmos 11-18-2015 12:53 PM

It is scrolling through

wlan0: Trying to associate with 58:6d:8f:c0:78:27 (SSID="MyNetwork" freq=2462 MHz)
wlan0: Association request to the driver failed
wlan0: Associated with 58:6d:8f:c0:78:27
wlan0: WPA: 4-way Handshake failed - pre-shared key may be incorrect
wlan0: CTRL-EVENT-DISCONNECTED bssid=58:6d:8f:c0:78:27 reason=0

codeguy 11-18-2015 01:01 PM

Quote:

Originally Posted by PancakesAndGizmos (Post 5451580)
wlan0: WPA: 4-way Handshake failed - pre-shared key may be incorrect

misspell the password? Using the same encryption? (key_mgmt=WPA-PSK)

PancakesAndGizmos 11-18-2015 01:06 PM

added key_mgmt=WPA-PSK

checked and double checked password is correct

i dont know what do

codeguy 11-18-2015 01:14 PM

The wpa_supplicant.conf needs to match your wireless router. The examples https://www.freebsd.org/cgi/man.cgi?wpa_supplicant.conf have good comments.

If you are using WPA-Personal (PSK) then key_mgmt=WPA-PSK should be enough. If your using TKIP you might need:

Quote:

key_mgmt=WPA-EAP
pairwise=CCMP TKIP
group=CCMP TKIP
eap=TLS
Edit the config, try a few options, then re-run:
Quote:

sudo wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
At some point, it should give you a success. The above is not running in daemon mode, so as soon as it connects the program will exit and wlan0 will be disconnected again. Thats ok, we just need to test various config options and see if it'll connect. Once the config is correct, then it should connect up correctly on boot.

PancakesAndGizmos 11-18-2015 01:43 PM

OK.
So following your suggestions has finally got me to obtain this response.

I typed:
sudo wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

Response:
rfkill: Cannot open RFKILL control device
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize controll interface 'DIR=/var/run/wpa_supplicant GROUP=netdev'
You may have another wpa_supplicant process already running or the file was left by an unclean termination of wpa_supplicant in which case you will need to manually remove this file before starting wpa_supplicant again.

Any thoughts?


All times are GMT -5. The time now is 07:59 PM.