Ultra96 WiFi not working pynq2.4, 2.5 have executed enable code

I’m a pynq and ultra96 newbie. I’m really struggling to get the wifi working using pynq 2.4 or 2.5 on an ultra96v2 board. I’ve tried 2.4 and 2.5 because of the change in startup of wifi, but the behaviour seems the same in both:

I flash the SD card and start up. I have ethernet over usb access, see the board as a storage device (on my Mac) and can use screen over serial over usb. I can then ssh into the board on 192.168.3.1. I can ssh into the board in a browser on 192.168.2.1 but I can’t reach it with a browser at that address.

ifconfig shows something for 192.168.2.1, but I don’t think it is wifi:

p2p0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.1  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::f8f0:5ff:fe71:e510  prefixlen 64  scopeid 0x20<link>
        ether fa:f0:05:71:e5:10  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 532  bytes 145294 (145.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I have tried switching on the wifi in the simple manner from the faqs:
sudo systemctl start wpa_ap.service
but when I query the state with
sudo systemctl list-unit-files | grep wpa_ap.service
the service has not started.

I’ve also followed the long method here which has been recommended elsewhere in support of a similar issue, but still no luck. I can find the device name (wlan0), check that it is up or switch it on using sudo ip link set wlan0 up and see that it is up:

3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state DORMANT mode DORMANT group default qlen 1000
    link/ether f8:f0:05:71:e5:10 brd ff:ff:ff:ff:ff:ff

Going through the wpa_supplicant process to register my local wifi network:
sudo wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf
returns:

ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument

which I managed to remove by using nl80211 (is this the problem?). But no matter what I do, I can’t get connected. The result of
/sbin/iw wlan0 link
is just
Not connected.

I’ve tried the Jupyter approach at /common/wifi.ipynb. There are no reported errors until I ping. All I get after “connecting” is
ping: www.yahoo.com: Temporary failure in name resolution
and pinging 8.8.8.8 gives Destination Host Unreachable

It’s like the linux knows about wifi, but there isn’t a wifi chip. I did also boot the board using the Avnet image at: http://avnet.me/ultra96-v2-oob. That image produced a wifi access point - so I know the hardware works. But the pynq solution is more helpful in many other ways, so I’d prefer to get it going.

The board needs to connect to the internet, so that it can download things that it needs. Wifi seemed the simplest, because I couldn’t figure out how to give internet access to the Ethernet over USB connection. I’d take a solution to either problem, but I’d really like to know how to get the Wifi going on the Ultra96v2 with Pync 2.4 or 2.5.

Any hints?

I think you may realize this, but it may be helpful for anyone else who finds this post. The board is running a Ubuntu based OS. You can try google for solutions on Ubuntu forums for problems related to the OS.

Do you see a wlan entry here?:
/etc/network/interfaces.d/

Cathal

Yes, there’s a wlan0 and an eth0.

I have been looking at Linux support pages, but no joy so far.

Can you post contents of wlan0? (Maybe blank out any keys/SSID that are in there, just in case)

Cathal

In the last few minutes I rebooted my PC. On reconnecting to the ultra96, there was no wlan in /etc/network/interfaces.d

It was definitely there earlier. Using the Jupyter notebooks wlan page seems to have fixed that. The wlan0 file contains:

iface wlan0 inet dhcp
 wpa-ssid BTHubX-XXXX
 wpa-psk 64-digit-hex-number

ifconfig shows:

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::faf0:5ff:fe71:e510  prefixlen 64  scopeid 0x20<link>
        ether f8:f0:05:71:e5:10  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 47  bytes 4314 (4.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

One thing that I have noticed as well is you cannot use ethernet over USB along with WiFi at the same time. Ethernet over USB seems to have priority over WiFi. This means you cannot use ultra96 board as a bridge between ethernet and WiFi - not sure if this is the same issue for you. I don’t know a solution yet. Btw, p2p0 is the WiFi on ultra96v2.

Okay, that’s a piece of useful information. How do I kill the USB over ethernet to replace with wifi?

I guess I can still get a terminal up over the USB-serial link to command the ultra96 through the process.

Correct. You can use the wifi.ipynb notebook provided in the common folder of jupyter notebooks to connect your ultra96 to your wifi network. Then you can use serial connection to talk to your board. Before running these, you can just unplug the ethernet-usb cable so ethernet will be shutdown automatically.

Okay. Randomly, the Jupyter notebooks wifi setup is now working, and all of a sudden (with I think no changes on my part) I’m now set up.

It is possible to use wifi and USB-Ethernet, I have both up now.

I’d still like to know why it works now and didn’t work for the last four days, but I’ll just move on.

Hi,

Another dimension to this could be USB 3.0. Having an active USB 3.0 device present can interfere with the 2.4GHz wifi signal itself. The wifi antenna on the Ultra96 boards is very small and in my experience does not work as well as a typical wifi device. The amount of the effect of the interference (and wifi not working) can vary greatly depending upon the setup and it’s proximity to your wifi access point and also other physical objects that are around your U96 board.

If you are not using a USB 3.0 device then obviously this had nothing to do with your issues :slight_smile:

Kind regards

1 Like