WiFi with Wilc1000 @ SAMA5D3 Xplained

For SAMA5D2 Xplained, SAMA5D3 Xplained and SAMA5D4 Xplained

Moderator: nferre

gpowers
Posts: 2
Joined: Tue Jan 19, 2016 9:42 am

WiFi with Wilc1000 @ SAMA5D3 Xplained

Wed Jan 20, 2016 5:38 pm

Hi,

is it possible to use Wilc1000 as WiFi Extension for the SAMA5D3 Xplained? If yes then how?

Best regards
Georg

Image
micro1
Posts: 38
Joined: Sun Jun 08, 2014 11:55 am

Re: WiFi with Wilc1000 @ SAMA5D3 Xplained

Mon May 09, 2016 8:19 pm

HI,

yes of course. Just compile the kernel with the driver.
Or choose the latest releas

linux4sam/bin/view/Linux4SAM/LinuxKerne ... am_5_3_tag
bdohler
Posts: 4
Joined: Wed Sep 28, 2016 9:19 pm

Re: WiFi with Wilc1000 @ SAMA5D3 Xplained

Mon Oct 03, 2016 10:17 pm

I've installed the latest release (5.4) of the demo image onto my SAMA5D3 xplained, and inserted an WILC1000 into the SD card slot. I turn on the board, login into root, and tried the following to connect to the WILC1000

insmod wilc1000_sdio.ko
insmod: ERROR: could not load module wilc1000_sdio.ko: No such file or directory

For good measure, I've also run:

ifconfig wlan0 up
wlan0: ERROR while getting interface flags: No such device

Any advice is appreciated. Thanks.
blue_z
Location: USA
Posts: 1560
Joined: Thu Apr 19, 2007 10:15 pm

Re: WiFi with Wilc1000 @ SAMA5D3 Xplained

Tue Oct 04, 2016 2:17 am

bdohler wrote:insmod wilc1000_sdio.ko
insmod: ERROR: could not load module wilc1000_sdio.ko: No such file or directory
Since this command requires a proper path, did you bother to check if this module exists at /lib/modules/... ?
BTW unless you have a specific intention, you probably should be using the modprobe command instead of insmod.

All this may be for naught.
In the Linux4SAM news, there's a warning notice for the 5.4 demo that "Atmel WILC1000 WIFI not tested"

I haven't looked at the actual 5.4 demo rootfs, but AFAICT the krogoth Yocto build for demo 5.4 does not build any drivers for the WILC1000.
The driver is enabled in the kernel default config for SAMA5, but the meta-atmel config does not and should override the default.

You should have better luck with the 5.3 demo, where the (older version) WILC1000 drivers are installed.
Or test the Buildroot version of the 5.4 demo.

Regards
nferre
Site Admin
Posts: 167
Joined: Wed Feb 14, 2007 11:17 am

Re: WiFi with Wilc1000 @ SAMA5D3 Xplained

Tue Oct 04, 2016 12:06 pm

Hi,

We've updated the linux-4.4-at91 branch on our github site to backport wilc1000 driver. If you can re-compile your kernel, it's the way to go.

Otherwise, the upcoming linux4sam 5.5 will provide this (staging) driver.

Best regards,
AntoineC
Posts: 105
Joined: Wed Oct 03, 2012 11:33 am

Re: WiFi with Wilc1000 @ SAMA5D3 Xplained

Wed Oct 19, 2016 6:17 pm

Hello,
I'm trying to use the wilc1000_sd kit on an SAMA5D3_Xplained to test Wifi. I build Linux Kernel and Rootfs with last version of buildroot -ie- 2016.08.1.

I have followed information from http://www.atmel.com/images/atmel-42435 ... rguide.pdf and other ressources from Linux4Sam.
( https://github.com/linux4sc/wireless-dr ... ation-Mode and other...)

The kernel version is the linux4sam_5.5 repository from https://github.com/linux4sam/linux-at91.git. So wilc1000 driver is already include in the sources. The driver is compiled "built-in" and not module.


I am trying to run Wifi in Station Mode. I insert the WILC_1000_SD after boot:

Code: Select all

mmc0: queuing unknown CIS tuple 0x91 (2 bytes)
mmc0: new high speed SDIO card at address 0001
wilc1000_sdio mmc0:0001:1: Driver Initializing success
Starting WPA Supplicant service:

Code: Select all

wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wilc_wpa_supplicant.conf &
# Successfully initialized wpa_supplicant
wilc1000_sdio mmc0:0001:1: chipid (001003a0)
wilc1000_sdio mmc0:0001:1: has_thrpt_enh3 = 1...
wilc1000_sdio mmc0:0001:1 wlan0: loading firmware atmel/wilc1003_firmware.bin
Connection to the AP:

Code: Select all

# wpa_cli -p/var/run/wpa_supplicant ap_scan 1
Selected interface 'wlan0'
OK
# wpa_cli -p/var/run/wpa_supplicant add_network
Selected interface 'wlan0'
0
# wpa_cli -p/var/run/wpa_supplicant set_network 0 ssid '"User_AP"'
Selected interface 'wlan0'
OK
# wpa_cli -p/var/run/wpa_supplicant set_network 0 key_mgmt NONE
Selected interface 'wlan0'
OK
# wpa_cli -p/var/run/wpa_supplicant select_network 0
Selected interface 'wlan0'
OK
I change the User_AP with the correct SSID. (And check it several time)
I also try to connect to an AP with psk encryption.

When running dhcp, interface could not get IP:

Code: Select all

udhcpc -iwlan0
udhcpc: started, v1.25.0
udhcpc: sending discover
udhcpc: sending discover
When I try to set the address manualy, I get the following errors:

Code: Select all

ifconfig wlan0 192.168.42.42
# wilc1000_sdio mmc0:0001:1 wlan0: Failed to set IP address
wilc1000_sdio mmc0:0001:1 wlan0: Failed to send setup multicast
wilc1000_sdio mmc0:0001:1 wlan0: Failed to get IP address
wilc1000_sdio mmc0:0001:1 wlan0: Failed to send scan parameters
wilc1000_sdio mmc0:0001:1 wlan0: Failed to set abort running
wilc1000_sdio mmc0:0001:1 wlan0: Failed to set IP address
wilc1000_sdio mmc0:0001:1 wlan0: Failed to set abort running
wilc1000_sdio mmc0:0001:1 wlan0: Failed to get IP address
...
Here is the wpa_cli status after running udhcpc command:

Code: Select all

wpa_cli status
Selected interface 'wlan0'
wpa_state=SCANNING
p2p_device_address=00:f8:f0:05:f1:48
address=00:f8:f0:05:f1:48
uuid=10a264a9-8542-54e5-8ddd-222d8f413611
wpa_cli scan & wpa_cli scann_result gave no result :-(

I do not know what could be wrong and where to start debuging... There are no error displayed.
Is there option I can activate to have more trace from the driver to see if it is really correcty inited.

Regards,
nferre
Site Admin
Posts: 167
Joined: Wed Feb 14, 2007 11:17 am

Re: WiFi with Wilc1000 @ SAMA5D3 Xplained

Fri Oct 21, 2016 2:41 pm

I test with the firmware from: https://github.com/linux4sc/wireless-firmware
version 14.0 (not the 14.1 which I don't manage to make work for now on). I don't know if it's the one provided by stock buildroot

Hope that it can help.
AntoineC
Posts: 105
Joined: Wed Oct 03, 2012 11:33 am

Re: WiFi with Wilc1000 @ SAMA5D3 Xplained

Mon Oct 24, 2016 11:27 am

Yes!!! It work!! At least scanning return a SSID :-) I will test connection next.

In buildroot-2016.08.1, the wilc1000-firmware.mk define WILC1000_FIRMWARE_VERSION = 14.1
I download v14 and copy it in the rootfs, and it work.

Many thanks!

Is it ok to work with v14? Is there known issues in the v14 firmware to be corrected by an upcomming version?
AntoineC
Posts: 105
Joined: Wed Oct 03, 2012 11:33 am

Re: WiFi with Wilc1000 @ SAMA5D3 Xplained

Wed Oct 26, 2016 6:43 pm

So Wilc1000 with firmware version 14 works fine in Station Mode. I manage to connect to my phone and then ping google.com without problem.

But I tried to use it as host, and could not make it work. Again, I follow instructions on https://github.com/linux4sc/wireless-driver/wiki/

On one SAMA5D3_Xplained, I launch the host service:

Code: Select all

hostapd -B /etc/wilc_hostapd.conf
ifconfig wlan0 192.168.0.1
/etc/init.d/S80dhcp-server start
Here is the hostapd_cli status:

Code: Select all

Selected interface 'wlan0'
state=ENABLED
phy=phy0
freq=2412
num_sta_non_erp=0
num_sta_no_short_slot_time=0
num_sta_no_short_preamble=0
olbc=0
num_sta_ht_no_gf=0
num_sta_no_ht=0
num_sta_ht_20_mhz=0
num_sta_ht40_intolerant=0
olbc_ht=0
ht_op_mode=0x0
cac_time_seconds=0
cac_time_left_seconds=N/A
channel=1
secondary_channel=0
ieee80211n=0
ieee80211ac=0
vht_oper_chwidth=0
vht_oper_centr_freq_seg0_idx=0
vht_oper_centr_freq_seg1_idx=0
bss[0]=wlan0
bssid[0]=f8:f0:05:f1:43:a6
ssid[0]=SoftAP
num_sta[0]=1
On one other Kit, I try to connect to the Host:

Code: Select all

wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wilc_wpa_supplicant.conf &

wpa_cli -p/var/run/wpa_supplicant ap_scan 1
wpa_cli -p/var/run/wpa_supplicant add_network
wpa_cli -p/var/run/wpa_supplicant set_network 0 ssid '"SoftAP"'
wpa_cli -p/var/run/wpa_supplicant set_network 0 key_mgmt NONE
wpa_cli -p/var/run/wpa_supplicant select_network 0

wpa_cli status gave the following result:

Code: Select all

Selected interface 'wlan0'
wpa_state=ASSOCIATING
p2p_device_address=f8:f0:05:f1:44:0b
address=f8:f0:05:f1:44:0b
uuid=f6f78afd-3681-5e67-9060-ad97c7ba52dd
After a few second, I got the following messages:

Code: Select all

wilc1000_sdio mmc0:0001:1 wlan0: Unspecified failure
wlan0: CTRL-EVENT-ASSOC-REJECT bssid=f8:f0:05:f1:43:a6 status_code=1
wlan0: Trying to associate with f8:f0:05:f1:43:a6 (SSID='SoftAP' freq=2412 MHz)
wilc1000_sdio mmc0:0001:1 wlan0: Received MAC status is MAC_DISCONNECTED
Nferre, do you also try version 14 of the firmware in host mode? Do you manage to make it work?
Does any body has an idea what could be wrong? I try with the wilc_hostapd_secure.conf file for host, and make a secure connection but it also do not work
nferre
Site Admin
Posts: 167
Joined: Wed Feb 14, 2007 11:17 am

Re: WiFi with Wilc1000 @ SAMA5D3 Xplained

Tue Dec 13, 2016 12:42 pm

AntoineC wrote: Nferre, do you also try version 14 of the firmware in host mode? Do you manage to make it work?
Does any body has an idea what could be wrong? I try with the wilc_hostapd_secure.conf file for host, and make a secure connection but it also do not work
Sorry, I never tried in host mode.

Return to “SAMA5 Xplained”

Who is online

Users browsing this forum: No registered users and 2 guests