Wi-Fi connection not working

Just about everything about Red Pitaya
Post Reply
Bulova
Posts: 38
Joined: Fri Jan 09, 2015 6:07 pm
Location: Babenhausen/Germany

Wi-Fi connection not working

Post by Bulova » Fri Jan 09, 2015 6:20 pm

Hello,

I worked with the RedPit and LAN connection without a problem. Now I wanted to try out the Wi-Fi connection, but was not able to get it done. It seems it is not that easy, when you are not very familiar with network settings.

I did the following:

1) Plugged in the dongle with the recommended type EDIMAX EW-7811UN

2) Did the changes in the Configfile like:

ctrl_interface=/var/run/wpa_supplicant

# WPA configuration example
network={
# ssid="<YOUR_SSID>"
ssid="Red Pitaya"
scan_ssid=1
proto=WPA RSN
# key_mgmt=WPA-PSK
key_mgmt=WPA2-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
# psk="<YOUR_PASSPHRASE>"
psk="redpitaya"
}

# WPA2 ...

3) Tried to use the recommended IP address 192.168.128.1 or redpitaya in CONNECT TO MY REDPITAYA. But I always get the error message Invalid MAC address.


Dieter

Bulova
Posts: 38
Joined: Fri Jan 09, 2015 6:07 pm
Location: Babenhausen/Germany

Re: Wi-Fi connection not working

Post by Bulova » Sat Jan 10, 2015 7:27 pm

Hello,

in addition I did a step forward, but there is still no functionable WiFi.

I did in respect to my first posting:

- Replaced key_mgmt=WPA2-PSK against key_mgmt=WPA-PSK

- Tried to follow up the recomendations in http://stackoverflow.com/questions/2244 ... ax-ew7811u

- Now I started console (PuTTy) and got the following message:


++ Bringing up wlan0
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
udhcpc (v1.22.1) started
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
using static IP 192.168.1.100 netmask 255.255.255.0
No lease, failing
++ Bringing up eth0
udhcpc (v1.22.1) started
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
using static IP 192.168.1.100 netmask 255.255.255.0
No lease, failing
++ Running all startup scripts
Starting logging: OK
Starting mdev...
Initializing random number generator... done.
Starting system message bus: done
Starting network...
ifup: interface lo already configured
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
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 control interface '/var/run/wpa_supplicant'.
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.

ioctl[SIOCSIWAP]: Operation not permitted
Starting sshd: OK
Starting nginx ... done.
++ Starting Red Pitaya IP discovery
/opt/sbin/discovery version 0.92-378-d3751f9
Cannot access http://discovery.redpitaya.com/update.
Running user script from SD card ...
Feel free to add custom initialization commands here.

Red Pitaya GNU/Linux/Ecosystem version 0.92-378


From what I can understand initialization for WLAN failed. The last some sentences about
Failed to initialize control interface '/var/run/wpa_supplicant'.
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.
I cannot interprete this really.

And: I tried the command which is mentioned in the Website above: iwconfig in the console, but the system cannot recognize this command!

I am really lost, and nearly just to throw away the WiFi dongle and go back to the uncomfortable LAN connection, which works fine, though.


Dieter

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Wi-Fi connection not working

Post by Nils Roos » Sat Jan 10, 2015 11:48 pm

Hi Dieter,

It took me a while to find a wifi dongle that works with the existing driver, I also have only been using ethernet up to now.

From what you posted, your wifi adapter is recognized and initialised correctly, but can not connect to your network successfully.
A couple of things to check:
  • is the SSID and the passphrase correct ?
  • are new devices allowed to connect to your wifi access point (MAC restrictions etc.) ?
  • is dhcp supported on the access point ?
If I misspell the SSID or passphrase or disallow new MACs, I get exactly the same console output as you posted.
If on the other hand the dongle is missing or not recognized, the discover will not happen at all.
If all is set up correctly, the connection and dhcp lease succeeds after the 5th discover.

By the way, you don't need to change anything besides the SSID and passphrase in the original wpa_supplicant.conf - at least I did not need to.

Bulova
Posts: 38
Joined: Fri Jan 09, 2015 6:07 pm
Location: Babenhausen/Germany

Re: Wi-Fi connection not working

Post by Bulova » Sun Jan 11, 2015 5:09 pm

Hello Nils,

thank you for your help, it helped a lot, even if it does not solve my problem 100%. But I have got a partly success. My console listing looks a lot better:
++ Bringing up wlan0
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
udhcpc (v1.22.1) started
Sending discover...
Sending discover...
Sending discover...
Sending select for 192.168.178.21...
Lease of 192.168.178.21 obtained, lease time 864000
deleting routers
route: SIOCDELRT: No such process
adding dns 192.168.178.1
++ Bringing up eth0
udhcpc (v1.22.1) started
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
using static IP 192.168.1.100 netmask 255.255.255.0
No lease, failing
++ Running all startup scripts
Starting logging: OK
Starting mdev...
Initializing random number generator... done.
Starting system message bus: done
Starting network...
ifup: interface lo already configured
ifup: interface wlan0 already configured
Starting sshd: OK
Starting nginx ... done.
++ Starting Red Pitaya IP discovery
/opt/sbin/discovery version 0.92-378-d3751f9
OK
Running user script from SD card ...
Feel free to add custom initialization commands here.

Red Pitaya GNU/Linux/Ecosystem version 0.92-378
As you can see, there is a "lease IP# obtained" after the Bringung up WLAN0. To get to this point I found, that I have made a mistake with the PSK passphrase. I misunderstood what was requested here. But I have learned that the WLAN key is required at that place. After changing this the dongle seems to be recognized and the blue led inside flashes a little bit unsteadily, which is didn't before, so something changed to the better.

Why the ++ Bringing up eth0 came up after the WLAN recognition, it is a bit curious. Maybe this overwrites everything else.

Another point is: I substituted key_mgmt=WPA-PSK against key_mgmt=WPA-Personal, as this is written in my PC WLAN setup. But I will try the WPA-PSK again afterwards.

Thank you and
Grüße vom Unterallgäu

Dieter




But the Discovery site still does not connect yet, when I took the listed IP address.

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Wi-Fi connection not working

Post by Nils Roos » Mon Jan 12, 2015 12:14 am

Hallo Herr Unterallgäuer, ^^
Bulova wrote:Why the ++ Bringing up eth0 came up after the WLAN recognition, it is a bit curious. Maybe this overwrites everything else.
Nope, that is perfectly normal, all available network devices will be brought online during startup. This does not interfere with the wlan operation, both connections can live side by side just fine - and if one fails that does not affect the other.

You should be able to connect to your Red Pitaya by just entering http://192.168.178.21 into your browser. I can't tell you why the Discovery site does not work - I never got it to work in my network - but that is just a minor inconvenience, because your router will most likely always assign the ...21 address to your Red Pitaya from now on.

Grüße aus dem Rheinland

Bulova
Posts: 38
Joined: Fri Jan 09, 2015 6:07 pm
Location: Babenhausen/Germany

Re: Wi-Fi connection not working

Post by Bulova » Mon Jan 12, 2015 7:31 pm

Hello Nils,

thanks again. The hint with the direct URL input was worth a mint, as now everythings works perfectly. I even tried it on my tablet, and also this works very well.

Okay, now the real work begins. :mrgreen:

Thanks again and greetings to Königswinter.

Dieter

Docborgia
Posts: 6
Joined: Sun May 31, 2015 6:24 pm

Re: Wi-Fi connection not working

Post by Docborgia » Sun Jun 21, 2015 7:39 am

Hello,
I am new to Redpitaya, and received yesterday the Edimax Wi-fi adapter, does not work properly.
At some start ups I get the network, but password rejected, and most of the time, even no network, without changing anything.
Could you please post the latest setup ?
Kind regards,
Yves

Bulova
Posts: 38
Joined: Fri Jan 09, 2015 6:07 pm
Location: Babenhausen/Germany

Re: Wi-Fi connection not working

Post by Bulova » Sun Jun 21, 2015 9:06 am

Hello Yves,

I am not sure if I am able to help you in this case. But I would recommend to proof some things first before going further into depth.

In the device's memory card there is a file called

\etc\network\wpa_supplicant.conf

The content looks like this:

# WPA configuration example
network={
ssid="FRITZ!Box 7312"
scan_ssid=1
proto=WPA2 RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="<ID of the wlan router without spaces>"
}

I have this content there. Consider that Fritz!box is only valid in my case, and the psk line must provide exactly the ID which is visible on the bottom side of the box.

Secondly, the file interfaces in the same location should have the content like this (maybe you should temporarily add the extension .txt or so to open and to modify it):

auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -B -D wext -i wlan0 -c /opt/etc/network/wpa_supplicant.conf
post-down killall -q wpa_supplicant
udhcpc_opts -t7 -T3

And thirdly, my problem was solved eventually by Nils' proposal to use just the IP address in the browser's url line instead of clicking onto the discovery site button.

Maybe this helps.

Dieter

Docborgia
Posts: 6
Joined: Sun May 31, 2015 6:24 pm

Re: Wi-Fi connection not working

Post by Docborgia » Sun Jun 21, 2015 8:17 pm

Thank you Dieter,

I may have not been accurate in my question,
I was trying to connect my Ipad and Surface to the RP network.

Had done without success several trials based on your answer and the various other posts.

This evening, while RP were changing their website, suddenly the wifi started working - self healing ??

Thanks a lot,
gruessen von Frankreich,
Yves

Bulova
Posts: 38
Joined: Fri Jan 09, 2015 6:07 pm
Location: Babenhausen/Germany

Re: Wi-Fi connection not working

Post by Bulova » Mon Jun 22, 2015 5:26 am

Yves,

but RP's website doesn't have anything to do with your WiFi I think. Maybe it is the same problem I had using the discovery button on the RP's website instead of using the direct IP address in my browser.

Greetings from South Germany (Babenhausen)

Dieter

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: Google [Bot] and 5 guests