WiFi AP with rtl8192cu: works with USB hub, but not directly

787 views
Skip to first unread message

Sergey Manucharian

unread,
Jun 22, 2018, 1:46:19 PM6/22/18
to BeagleBoard
I have a USB WiFi module based on RTL8192CU.

When using an AP mode with kernels 4.14.x the module is configured and working properly only if connected via a USB hub.
With direct USB connection everything looks good, but stations cannot connect to the AP.
The only difference in the kernel messages is the last line
"hwsec_cam_bitmap: 0x0 entry_idx=4" which appears when using a USB hub:

....
usb 1-1: New USB device found, idVendor=0bda, idProduct=817b
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: 802.11n WLAN Adapter
usb 1-1: Manufacturer: Realtek
usb 1-1: SerialNumber: 00e04c000001
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
ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
usbcore: registered new interface driver rtl8192cu
rtl8192cu 1-1:1.0 wlx0034f1812a4c: renamed from wlan0
rtl8192cu: MAC auto ON okay!
rtl8192cu: Tx queue select: 0x05
rtlwifi: -----hwsec_cam_bitmap: 0x0 entry_idx=4                    <==========


With kernels 4.9.x everything works properly. That extra message (mentioned above) doesn't appear at all.
It's not a current consumption issue as well: the device consumes only 120mA.

Thanks for advises and directions.
-Sergey

Robert Nelson

unread,
Jun 22, 2018, 1:52:29 PM6/22/18
to Beagle Board, Sergey Manucharian
Is this one of those really small modules, do you have a part number/Amazon link I can take a look at it?

Regards,

Sergey Manucharian

unread,
Jun 22, 2018, 2:07:39 PM6/22/18
to Robert Nelson, Beagle Board
Excerpts from Robert Nelson's message from Fri 22-Jun-18 12:52:
> On Fri, Jun 22, 2018, 12:46 PM Sergey Manucharian <s...@ara-ler.com> wrote:
>
> > I have a USB WiFi module based on RTL8192CU.
> >
> > When using an AP mode with kernels 4.14.x the module is configured and
> > working properly only if connected via a USB hub.
> > With direct USB connection everything looks good, but stations cannot
> > connect to the AP.
> > The only difference in the kernel messages is the last line "hwsec_cam_bitmap:
> > 0x0 entry_idx=4" which appears when using a USB hub:
> >
> > ....
> > usb 1-1: New USB device found, idVendor=0bda, idProduct=817b
> > usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> > usb 1-1: Product: 802.11n WLAN Adapter
> > usb 1-1: Manufacturer: Realtek
> > usb 1-1: SerialNumber: 00e04c000001
> > 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
> > ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
> > usbcoRe: registered new interface driver rtl8192cu
> > rtl8192cu 1-1:1.0 wlx0034f1812a4c: renamed from wlan0
> > rtl8192cu: MAC auto ON okay!
> > rtl8192cu: Tx queue select: 0x05
> > rtlwifi: -----hwsec_cam_bitmap: 0x0 entry_idx=4
> > <==========
> >
> > With kernels 4.9.x everything works properly. That extra message
> > (mentioned above) doesn't appear at all.
> > It's not a current consumption issue as well: the device consumes only
> > 120mA.
> >
> > Thanks for advises and directions.
> > -Sergey
> >
>
>
> Is this one of those really small modules, do you have a part number/Amazon
> link I can take a look at it?

I ordered them directly from the vendor:

http://www.radi.com/modular71.htm


Thanks,
Sergey

Robert Nelson

unread,
Jun 22, 2018, 2:10:22 PM6/22/18
to Sergey Manucharian, Beagle Board
Yeah, those should be safe from the HDMI noise, that usually affects models with that chipset.


What's the full uname -r of the last v4.14.x based kernel you tried?

Regards,

Sergey Manucharian

unread,
Jun 22, 2018, 2:22:47 PM6/22/18
to Robert Nelson, Beagle Board
I built it yesterday‎ using your building scripts, it's 4.14.51-bone15.

Sent from my BlackBerry 10 smartphone.
From: Robert Nelson
Sent: Friday, June 22, 2018 12:10
To: Sergey Manucharian
Cc: Beagle Board
Subject: Re: [beagleboard] WiFi AP with rtl8192cu: works with USB hub, but not directly

Robert Nelson

unread,
Jun 22, 2018, 2:40:55 PM6/22/18
to Sergey Manucharian, Beagle Board
On Fri, Jun 22, 2018 at 1:22 PM, Sergey Manucharian <s...@ara-ler.com> wrote:
I built it yesterday‎ using your building scripts, it's 4.14.51-bone15.


Try disabling musb's dma engine:

In /boot/uEnv.txt change:

cmdline=coherent_pool=1M net.ifnames=0 quiet

to

cmdline=coherent_pool=1M net.ifnames=0 musb_hdrc.use_dma=n quiet

and reboot...

Regards,

--
Robert Nelson
https://rcn-ee.com/

Sergey Manucharian

unread,
Jun 22, 2018, 2:52:33 PM6/22/18
to Robert Nelson, Beagle Board
Excerpts from Robert Nelson's message from Fri 22-Jun-18 13:40:
> On Fri, Jun 22, 2018 at 1:22 PM, Sergey Manucharian <s...@ara-ler.com> wrote:
>
> > I built it yesterday‎ using your building scripts, it's 4.14.51-bone15.
> >
>
>
> Try disabling musb's dma engine:
>
> In /boot/uEnv.txt change:
>
> cmdline=coherent_pool=1M net.ifnames=0 quiet
>
> to
>
> cmdline=coherent_pool=1M net.ifnames=0 musb_hdrc.use_dma=n quiet
>
> and reboot...

That works great!
Thank you very much, Robert!

So, how would I disable the musb's dma engine by default when building a kernel?
I'll have to rebuild the kernel anyway since I have my own config with
very limited number of drivers and options for an embedded system.

Thanks,
Sergey

Robert Nelson

unread,
Jun 22, 2018, 2:56:47 PM6/22/18
to Sergey Manucharian, Beagle Board
sed -i -e 's:CONFIG_USB_TI_CPPI41_DMA:CONFIG_MUSB_PIO_ONLY:g' .config
make ARCH=arm menuconfig

should be enough, here's the full git diff

diff --git a/patches/defconfig b/patches/defconfig
index 7585507..aa5cb8c 100644
--- a/patches/defconfig
+++ b/patches/defconfig
@@ -4516,8 +4516,7 @@ CONFIG_USB_MUSB_AM335X_CHILD=y
#
# MUSB DMA mode
#
-# CONFIG_MUSB_PIO_ONLY is not set
-CONFIG_USB_TI_CPPI41_DMA=y
+CONFIG_MUSB_PIO_ONLY=y
# CONFIG_USB_DWC3 is not set
# CONFIG_USB_DWC2 is not set
# CONFIG_USB_CHIPIDEA is not set

Sergey Manucharian

unread,
Jun 22, 2018, 4:09:08 PM6/22/18
to Robert Nelson
Excerpts from Robert Nelson's message from Fri 22-Jun-18 13:56:
> On Fri, Jun 22, 2018 at 1:52 PM, Sergey Manucharian <s...@ara-ler.com> wrote:
> > Excerpts from Robert Nelson's message from Fri 22-Jun-18 13:40:
> >
> > So, how would I disable the musb's dma engine by default when building a kernel?
> > I'll have to rebuild the kernel anyway since I have my own config with
> > very limited number of drivers and options for an embedded system.
>
> sed -i -e 's:CONFIG_USB_TI_CPPI41_DMA:CONFIG_MUSB_PIO_ONLY:g' .config
> make ARCH=arm menuconfig
>
> should be enough, here's the full git diff
>
> diff --git a/patches/defconfig b/patches/defconfig
> index 7585507..aa5cb8c 100644
> --- a/patches/defconfig
> +++ b/patches/defconfig
> @@ -4516,8 +4516,7 @@ CONFIG_USB_MUSB_AM335X_CHILD=y
> #
> # MUSB DMA mode
> #
> -# CONFIG_MUSB_PIO_ONLY is not set
> -CONFIG_USB_TI_CPPI41_DMA=y
> +CONFIG_MUSB_PIO_ONLY=y
> # CONFIG_USB_DWC3 is not set
> # CONFIG_USB_DWC2 is not set
> # CONFIG_USB_CHIPIDEA is not set

Excellent! Thank you!

Sergey

Reply all
Reply to author
Forward
0 new messages