Ultra96 WIFI issue 19.2 VITIS Ubuntu 18.4.3

Hi i can’t seem to get the WI-FI working on ubuntu 18.4.3 running 19.2.

The wifi.sh file seems to hang at a particular point

After creating the kernal using:

petalinux-config -c kernel

To create the wifi moudles etc:

I added the wifi module to the device tree:

  /include/ "system-conf.dtsi"
/ {
	sdio_pwrseq: sdio_pwrseq {
		compatible = "mmc-pwrseq-simple";
		// MIO[7] RESETN for WILC3000 active low
		reset-gpios = <&gpio 7 1>;
		// requires a patched pwrseq_simple.c for WILC3000
		chip_en-gpios = <&gpio 8 1>;
        };

        // Remove V1 Power ON/OFF controller from U96 V1 DT
        /delete-node/ ltc2954;
};
&sdhci1 {
        max-frequency = <50000000>;
	// cap-power-off-card not compatible with WILC3000
        /delete-property/cap-power-off-card;
        wilc_sdio@1 {
                compatible = "microchip,wilc3000";
                reg = <0>;
                bus-width = <0x4>;
                status = "okay";
        };
        // Remove TI child node from U96 V1 DT
        /delete-node/wifi@2;
};

Then i create the petalinux module:

petalinux-create -t modules -n wilc --enable

Then edit “./project-spec/meta-user/recipes-modules/wilc/wilc.bb” replacing contents with:

SUMMARY = "Recipe for building an external wilc Linux kernel module"
SECTION = "PETALINUX/modules"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891"

inherit module

SRC_URI =  "git://github.com/Avnet/u96v2-wilc-driver;protocol=http;branch=v15_2"

SRCREV = "01ab7484e0e6b2191c69d7ec7c6e89da5ca51f0f"

DEPENDS += "virtual/kernel"

S = "${WORKDIR}/git/wilc"

EXTRA_OEMAKE = 'CONFIG_WILC=y \
		WLAN_VENDOR_MCHP=y \
		CONFIG_WILC_SDIO=m \
		CONFIG_WILC_SPI=n \
		CONFIG_WILC1000_HW_OOB_INTR=n \
		KERNEL_SRC="${STAGING_KERNEL_DIR}" \
		O=${STAGING_KERNEL_BUILDDIR}'

Then build the project.

Then i add the firmware from linux4wilc into /media/rootfs/lib/firmware/mchp:

I then boot up the Ultra96 and create the relevant wifi files

1. wpa_supplicant.conf:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
  ssid="your wifi ssid"
  psk="your wifi pssword"
}

2. wifi.sh

cp -rf ./wpa_supplicant.conf /etc/.
modprobe wilc-sdio
ifconfig wlan0 up
wpa_supplicant -dd -Dnl80211 -iwlan0 -c /etc/wpa_supplicant.conf -B 
dhcpcd -i wlan0

I then set the wifi.sh permissions and run:

chmod uog+x wifi.sh
sudo ./wifi.sh

This is the output log that hangs on the final point in the log:

wlan0: ERROR while getting interface flags: No such device
v/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/run/wpa_supplicant'
ctrl_interface_group='0'
update_config=1
Line: 5 - start of a new network block
ssid - hexdump_ascii(len=10):
     4e 4f 57 54 56 36 51 4a 55 43                     NOWTV6QJUC      
PSK (ASCII passphrase) - hexdump_ascii(len=12): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='NOWTV6QJUC'
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0x5590870ee0
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=040a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=040b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=040c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=040d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=090a
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=090b
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=090c
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=090d
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=0409506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=7f506f9a09
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=0801
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=0a07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=0a11
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=1101
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=1102
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=0505
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x5590870ee0 match=0500
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
netlink: Operstate: ifindex=3 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
Add interface wlan0 to a new radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 20 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 80 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 80 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5735-5835 @ 80 MHz 20 mBm (no IR)
nl80211: 57240-63720 @ 2160 MHz 0 mBm
nl80211: Added 802.11b mode based on 802.11g information
wlan0: Own MAC address: fa:f0:05:dd:cf:44
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=4 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=5 set_tx=0 seq_len=0 key_len=0
wlan0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
wlan0: Setting scan request: 0.100000 sec
TDLS: TDLS operation not supported by driver
TDLS: Driver uses internal link setup
TDLS: Driver does not support TDLS channel switching
wlan0: WPS: UUID based on MAC address: f875525f-424b-5d44-9c91-d8124f0a137c

This seriously needs to be looked at i have now spent time to run your offical 2019.2 bsp and i am getting constant
udhcpc: sending discover

Please advice.

log:
ultra96v2-oob-2019-2 login: root
Password:
root@ultra96v2-oob-2019-2:~# cat /home/root/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
        key_mgmt=WPA-PSK
        ssid="mytempwifissid"
        psk="mytemppassword"
}
root@ultra96v2-oob-2019-2:~# modprobe wilc-sdio
[   45.165388] wifi_pm : 0
[   45.167929] wifi_pm : 1
[   45.170677] wilc_sdio mmc1:0001:1: Driver Initializing success
root@ultra96v2-oob-2019-2:~# ifconfig wlan0 up
[   50.353655] WILC POWER UP
[   50.356321] wilc_sdio mmc1:0001:1: SDIO speed: 50000000
[   50.361805] wilc_sdio mmc1:0001:1: chipid 003000d0
root@ultra96v2-oob-2019-2:~# 
root@ultra96v2-oob-2019-2:~# ifconfig
wlan0     Link encap:Ethernet  HWaddr F8:F0:05:DD:CF:44  
          inet6 addr: fe80::faf0:5ff:fedd:cf44/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:516 (516.0 B)

ant.conf -B6v2-oob-2019-2:~# wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplica
root@ultra96v2-oob-2019-2:~# ifconfig
wlan0     Link encap:Ethernet  HWaddr F8:F0:05:DD:CF:44  
          inet6 addr: fe80::faf0:5ff:fedd:cf44/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:656 (656.0 B)

root@ultra96v2-oob-2019-2:~# udhcpc -i wlan0
udhcpc: started, v1.29.2
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover

Hi Jack,

My apologies for the delayed response to your question.

In PetaLinux 2019.1 and prior the WiFi was configured via a /etc/wpa_supplicant.conf file, and the supplied wifi.sh script could be used as an alternative to the on-board webserver to configure the WLAN connection. Starting in PetaLinux 2019.2 Xilinx made the change to configure and bring up with WiFi using connmanctl. You can see this process described in the webserver.py Python script:

That script uses the webserver wifi_setup.html webpage to collect the SSID and passphrase information from the user for the WLAN. This is a small snippet of what that script does to bring up the WiFi:

Rather than a /etc/wpa_supplicant.conf file, connmanctl uses a /var/lib/ultra96.config file to store the WLAN connection settings.

You can either use a DP monitor, mouse and keyboard to navigate to this web page locally, or use a PC or smartphone to connect to the Ultra96-V2 WiFi AP SSID “Ultra96-V2_” and navigate to http://192.168.2.1/wifi_setup.html and enter your WLAN SSID and passphrase. Note - you will probably need to reboot once you enter your WLAN info via the webpage and press “Connect”

I hope this helps.

–Tom

how do i fix: Error /net/connman/technology/wifi: Not supported

I have not seen this error message, so I can’t comment on how to fix it. However, a quick Google search seems to indicate connmanctl is trying to use wpa_supplicant in the background, which is not installed in the rootfs:
https://wiki.archlinux.org/index.php/ConnMan#Troubleshooting

The solution is to use iwd instead of wpa_supplicant:
https://wiki.archlinux.org/index.php/ConnMan#Using_iwd_instead_of_wpa_supplicant

At the risk of directing you to what you may have already searched for and found, here are a few links about using connmanctl to connect a WiFi interface to a WLAN:
https://wiki.archlinux.org/index.php/ConnMan#Connecting_to_a_protected_access_point

https://www.ev3dev.org/docs/tutorials/setting-up-wifi-using-the-command-line/

Are you trying to build your own PetaLinux 2019.2 OS image from scratch? I would recommend starting with a known-good PetaLinux BSP first. Avnet provides BSPs for recent PetaLinux versions here:
https://www.element14.com/community/community/designcenter/zedboardcommunity/ultra96#e14tab2

image

http://downloads.element14.com/downloads/zedboard/ultra96-v2/ultra96v2_oob_2019_2.bsp?ICID=ultra96v2-datasheet-widget

I hope this helps.
–Tom

still getting error with connman with iwd installed, there is no /usr/lib/iwd/iwd being created when installing meaning the /etc/systemd/system/iwd.service file cannot run

Any changes in this topic?