Author Topic: Wifi Dongle on ZynqBerry  (Read 7318 times)

bentho

  • Active Member
  • *
  • Posts: 10
Wifi Dongle on ZynqBerry
« on: October 18, 2017, 08:40:23 PM »
I'm trying to connect to Wifi using a USB dongle on ZynqBerry.
The dongle is a D-Link DWA131 using a Realtek 802.11n chip. I've used it with success on a Raspberry Pi.
How to set up Petalinux to support a Wifi dongle?
I found this link--> http://www.wiki.xilinx.com/Zynq+SDIO+WiFi
I believe I've managed to handle those settings using "petalinux-config -c kernel" command.
But when I put in the adapter after booting the new image, it is not recognized as a Wifi adapter, just a high speed device.
Plus, I have no access to command "iwconfig".
Did anyone of you here try a dongle on ZynqBerry or any other board for that matter?
Any kind of hint is most appreciated :)

Regards
Benny

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1558
Re: Wifi Dongle on ZynqBerry
« Reply #1 on: October 23, 2017, 08:00:49 AM »
Hi,
sorry we did not test any  WiFi dongle.
Are the ath6kl_sdio.ko drivers installed? Can you check this?

br
John

bentho

  • Active Member
  • *
  • Posts: 10
Re: Wifi Dongle on ZynqBerry
« Reply #2 on: October 23, 2017, 05:02:39 PM »
Thank you John,

I went to root and then searched for this file that you specified.

cd /
find -name ath6kl_sdio.ko

This file was not found on my Petalinux system.
As for reference, I tried the same search on my Ubuntu machine and it was found.

Best regards
Benny

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1558
Re: Wifi Dongle on ZynqBerry
« Reply #3 on: October 23, 2017, 05:14:49 PM »
Hi,
check petalinux kernel config for this setting:
Quote
-> Networking support (CONFIG_NET [=y])
 -> Wireless (CONFIG_WIRELESS [=y])
  -> cfg80211 (CONFIG_CFG80211 [=y])
-> Device Drivers
 -> Generic Driver Options
  -> Userspace firmware loading support (CONFIG_FW_LOADER [=y])
   -> Include in-kernel firmware blobs in kernel binary (CONFIG_FIRMWARE_IN_KERNEL [=n])
 -> Network device support (CONFIG_NETDEVICES [=y])
  -> Wireless LAN (CONFIG_WLAN [=y])
   -> Atheros Wireless Cards (CONFIG_ATH_COMMON [=y])
    -> Atheros mobile chipsets support (CONFIG_ATH6KL [=y])
     -> Atheros ath6kl SDIO support (CONFIG_ATH6KL_SDIO [=m])

petalinux-config -c kernel
 -on menu search with "Shift+/" for the config name for example "CONFIG_FW_LOADER"

br
John

bentho

  • Active Member
  • *
  • Posts: 10
Re: Wifi Dongle on ZynqBerry
« Reply #4 on: October 25, 2017, 09:49:34 AM »
Hi John,

I think maybe we misunderstood each other. I am not connecting an SDIO adapter, it is a USB dongle.
I was looking into the settings used for SDIO that I found online to be used as guidance.
Anyway, I found out that the D-Link DWA-131 USB dongle is using a chipset called RTL8192CU from Realtek.
It is necessary to know what chipset is used and it can in some cases even be different for different hw versions of dongle :)

Now at least I can get the system to recognize the RTL8192CU device. Here is what I did. In the following menu selection of kernel configuration,
->Device drivers ->Network device support ->Wireless LAN -> Realtek rtlwifi family of devices
I enabled [M] on all devices, including Realtek RTL8192CU/RTL88CU USB Wireless Network Adapters

I now get the following response at console when I plug in the dongle,

root@plnx_arm:~# usb 1-1.5: new high-speed USB device number 4 using ci_hdrc
rtl8192cu: Chip version 0x11
rtl8192cu: Board Type 0
rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
usb 1-1.5: Direct firmware load for rtlwifi/rtl8192cufw_TMSC.bin failed with error -2
usbcore: registered new interface driver rtl8192cu
usb 1-1.5: Direct firmware load for rtlwifi/rtl8192cufw.bin failed with error -2
rtlwifi: Loading alternative firmware rtlwifi/rtl8192cufw.bin
rtlwifi: Selected firmware is not available

Feeling I am getting close but it is still not working.
Best regards
Benny

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1558
Re: Wifi Dongle on ZynqBerry
« Reply #5 on: October 25, 2017, 10:57:21 AM »
Hi,
maybe this helps:
https://debianforum.de/forum/viewtopic.php?f=30&t=159157
https://packages.debian.org/de/jessie/firmware-realtek

PS: we have also Debian reference design with sources and script to create own image

br
John

bentho

  • Active Member
  • *
  • Posts: 10
Re: Wifi Dongle on ZynqBerry
« Reply #6 on: October 25, 2017, 02:11:56 PM »
Hi John,

I tried another USB dongle, Belkin F6D4050 V1 that has another chipset, RT3070 from Ralink.
The menu selection for kernel configuration,
Device Drivers->Network device support->Wireless LAN->Ralink driver support
I activated all listed devices.

After building a new image I now get a reasonable respond when I plug in the dongle,

root@plnx_arm:~# usb 1-1.5: new high-speed USB device number 4 using ci_hdrc
usb 1-1.5: reset high-speed USB device number 4 using ci_hdrc
ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
usbcore: registered new interface driver rt2800usb

I can now find the driver rt2800usb under /sys/module
Now I just need to find a way how to get the command line iw or iwconfig tool to show up.

Any hints on how to do this?

BR
Benny

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1558
Re: Wifi Dongle on ZynqBerry
« Reply #7 on: October 25, 2017, 02:42:04 PM »
Hi,

sorry, not at the moment. I did not try out this before.

Or maybe, use your configuration with our debian example (run debian script with your petalinux configuration).
And install missing tools with debian and connected LAN:
https://wiki.debian.org/iwconfig

br
John
« Last Edit: October 25, 2017, 02:45:44 PM by JH »