Rtl8192su / Openwrt git / Bifferboard

1084 views
Skip to first unread message

Nicolas Le Falher

unread,
Apr 4, 2011, 10:35:25 AM4/4/11
to Bifferboard
Hi list,

I've got my Realtek wireless adaptater with chipset rtl8192su working
on Bifferboard 8mo with Openwrt.
I add my network configuration (wireless+network) at page footer.
So how make this :

1) Download a git copy.

2) Make an image.

3) Edit Kconfig for your driver (build_dir/linux-rdc/linux-2.6.32.20/
drivers/staging/rtl8192su/Kconfig) and apply change :
- depends on PCI && WLAN
+ depends on PCI && WLAN && USB

4) Launch a "make kernel_menuconfig" and select :
Device Drivers --->
[*] USB support --->
<*> Support for Host-side USB
and
Device Drivers --->
Staging drivers --->
<*> RealTek RTL8192SU Wireless LAN NIC driver

5) Edit target/linux/rdc/image/mkimg_bifferboard.py and change kmax to
0x20 for increase to 2mo kernel size.

6) In Bifboot, change kernelmax value to 0x20

7) Compile image and flash your board :)

8) Download firmware from
http://svn.debian.org/wsvn/kernel/dists/trunk/firmware-nonfree/realtek/RTL8192SU/rtl8192sfw.bin
and scp it to /lib/firmware/RTL8192SU/

9) Download https://dev.openwrt.org/browser/tags/8.09/package/mac80211/files/lib/wifi/mac80211.sh.
Rename it to wext.sh.
Replace all "mac80211" by "wext" with "sed -i -e 's/mac80211/wext/g'
wext.sh"

10) Up wext.sh to /lib/wifi

11) Try a "wifi detect", if it works so save conf with "wifi detect > /
etc/config/wireless"

12) Edit /etc/config/wireless and /etc/config/network for your network
configuration

13) Try with /etc/init.d/network restart

14) Enjoy


Here configuration file for client mode without encryption.

/etc/config/wireless :
config wifi-device
wlan0
option type
wext
option channel
6

# REMOVE THIS LINE TO ENABLE
WIFI:
#option disabled
1

config wifi-
iface
option device
wlan0
option network
wlan
option mode
sta
option ssid
Home
option encryption none

/etc/config/network
onfig 'interface'
'loopback'
option 'ifname'
'lo'
option 'proto'
'static'
option 'ipaddr'
'127.0.0.1'
option 'netmask'
'255.0.0.0'

config 'interface'
'lan'
option 'ifname'
'eth0'
option 'hostname'
'biffer'
option 'proto'
'static'
option 'netmask'
'255.0.0.0'
option 'ipaddr'
'10.0.0.1'

config 'interface'
'wlan'
option 'proto'
'dhcp'
option 'ifname' 'wlan0'

nicolas le falher

unread,
Apr 4, 2011, 10:40:36 AM4/4/11
to Bifferboard
Hmm, here more readable configuration.

root@OpenWrt:/# cat /etc/config/wireless


config wifi-device wlan0
option type wext
option channel 6
# REMOVE THIS LINE TO ENABLE WIFI:
#option disabled 1

config wifi-iface
option device wlan0
option network wlan
option mode sta
option ssid Home
option encryption none

root@OpenWrt:/# cat /etc/config/network

config 'interface' 'loopback'


option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'

config 'interface' 'lan'
option 'ifname' 'eth0'
option 'hostname' 'biffer'
option 'proto' 'static'
option 'netmask' '255.0.0.0'
option 'ipaddr' '10.0.0.1'

config 'interface' 'wlan'
option 'proto' 'dhcp'

2011/4/4 Nicolas Le Falher <n.lef...@gmail.com>:

> --
> To unsubscribe send email to bifferboard...@googlegroups.com
>

--

Nicolas Le Falher.

littlebilly

unread,
Apr 7, 2011, 3:18:23 PM4/7/11
to Bifferboard
Thanks Nicolas, good news!
But still some questions from a newbee.

1. > > 3) Edit Kconfig for your driver (build_dir/linux-rdc/
linux-2.6.32.20/
> > drivers/staging/rtl8192su/Kconfig) and apply change :
> > - depends on PCI && WLAN
> > + depends on PCI && WLAN && USB

Does that mean to add "&& USB" to the existing line "depends on PCI
&& WLAN" ?

2. > > 4) Launch a "make kernel_menuconfig" and select :
When launching a "make kernel_menuconfig" some positions are
already marked:
Like [*] Enable loadable module support ---> or [*]
Networking support --->

I think I have to select your points in addition and change
nothing else?

3. Do I need wpasupplicant mini for WPA encryption?

Thanks in advance Billy

nicolas le falher

unread,
Apr 7, 2011, 3:35:33 PM4/7/11
to biffe...@googlegroups.com

1. Is that, just add "&& USB" to existing line.
2. Yes, just add USB and Drivers, dont touch other points.
3. Dunno, i dont use encryption :).

littlebilly

unread,
Apr 8, 2011, 5:05:08 AM4/8/11
to Bifferboard
Hopefully last question?

your point
7) Compile image and flash your board :)

means just do a make?

Billy


nicolas le falher

unread,
Apr 8, 2011, 5:10:18 AM4/8/11
to biffe...@googlegroups.com
That is, run the command "make " in the root directory of your sources
for compiling JFFS image.

2011/4/8 littlebilly <vultur...@googlemail.com>:

> --
> To unsubscribe send email to bifferboard...@googlegroups.com
>

--

Nicolas Le Falher.

biff...@yahoo.co.uk

unread,
Apr 8, 2011, 7:28:48 AM4/8/11
to Bifferboard
On Apr 7, 8:18 pm, littlebilly <vultur.bi...@googlemail.com> wrote:
> 3. Do I need wpasupplicant mini for WPA encryption?

I believe you only get to use the hardware encryption features of USB
wifi devices under Windows. I think some of the mini-pci cards have
encryption support in Linux, but for the most part you're forced to
use wpa_supplicant, and you have to suffer the performance overhead of
doing encryption in software, on the host (thereby significantly
reducing the throughput when it comes to the Bifferboard).

That's what I found last time I looked into this, but these things are
changing all the time, of course, maybe someone else knows better, and
I'm talking BS.

regards,
Biff.

littlebilly

unread,
Apr 8, 2011, 8:40:07 AM4/8/11
to Bifferboard
What about cmndline settings?
Is there any change?

Billy

On 8 Apr., 11:10, nicolas le falher <n.lefal...@gmail.com> wrote:
> That is, run the command "make " in the root directory of your sources
> for compiling JFFS image.
>
> 2011/4/8 littlebilly <vultur.bi...@googlemail.com>:

nicolas le falher

unread,
Apr 8, 2011, 8:46:35 AM4/8/11
to biffe...@googlegroups.com
You need to set cmndline to 0x20 in Bifboot, because if you make a 2mo
image, and set cmndline to 0x10, you can't boot.

If you don't set 0x20 in target/linux/rdc/image/mkimg_bifferboard.py,
compilation fail because kernel is going too large for 1mo.

2011/4/8 littlebilly <vultur...@googlemail.com>:

littlebilly

unread,
Apr 8, 2011, 9:47:21 AM4/8/11
to Bifferboard
@BB
Does that mean, it's challenging to get BB running with WPA
encryption?
Regards Billy

biff...@yahoo.co.uk

unread,
Apr 8, 2011, 10:25:55 AM4/8/11
to Bifferboard

On Apr 8, 2:47 pm, littlebilly <vultur.bi...@googlemail.com> wrote:
> @BB
> Does that mean, it's challenging to get BB running with WPA
> encryption?
> Regards Billy

I never got wpa-supplicant running on the Bifferboard, I've never
needed it, however I've got it running on a desktop machine, using
Slackware and it wasn't too difficult (with PSK). It's just a case of
having the correct config file. I seem to remember I only had
problems because of lots of 'silly' characters in my PSK. When I
switched to alpha-numerics or using the binhex representation all was
OK.

regards,
Biff.

Andrew Scheller

unread,
Apr 8, 2011, 11:57:08 AM4/8/11
to biffe...@googlegroups.com
> You need to set cmndline to 0x20 in Bifboot, because if you make a 2mo
> image, and set cmndline to 0x10, you can't boot.

I think you mean kernelmax, rather than cmndline? ;-)

This page (scroll down to Biffboot 2.7) contains the exact formula for
working out what kernelmax value you need:
http://sites.google.com/site/bifferboard/Home/bootloader/changelog

The bigger your kernelmax, the less space there is in the JFFS2 root
partition. But in general, a setting of 0x20 should be fine.

Lurch

nicolas le falher

unread,
Apr 8, 2011, 12:10:07 PM4/8/11
to biffe...@googlegroups.com
>I think you mean kernelmax, rather than cmndline? ;-)
Ho yes, sorry for mistake. :/

2011/4/8 Andrew Scheller <ya...@loowis.durge.org>:

HKairpost

unread,
Jan 12, 2012, 3:15:21 PM1/12/12
to nicolas le falher, biffe...@googlegroups.com
Hmm seams I was trying to use the wrong driver for my dongle. I think
it the same as the one described in this thread: 0bda:8176
I'm trying to apply these instructions to the latest git repo with the
2.6.37 kernel.

Step 3) of this howto isn't needed anymore, we now have a RTL8192U
which is actually the USB version of the RTL8192

Though i have an issue at step 9) here is my wext.sh file after the
sed command: http://pastebin.com/QhnPYNG9
I does nothing when call from "wifi detect" and when run directly:

root@OpenWrt:/lib/wifi# ./wext.sh
./wext.sh: line 2: append: not found

Maybe I'm also having an issue because i put the firmware in /lib/
firmware/RTL8192U/ instead of /lib/firmware/RTL8192SU/

Any pointer would help.

Best

PD: Sorry for the CC google doesn't let me reply to the thread

On Apr 8 2011, 5:10 pm, nicolas le falher <n.lefal...@gmail.com>
wrote:

Nicolas Le Falher

unread,
Jan 15, 2012, 11:06:10 AM1/15/12
to Bifferboard
I repost here after a private mail with hka.

0bda:8176 is not a rtl8192su, but a rtl8192ce device, only supported
on 2.6.38.
Take a look at post with 2.6.38.8 support and add support in
"kernel_menuconfig" for rtl8192ce :

[*] Networking support --->
-*- Wireless --->
<*> cfg80211 - wireless configuration API
<*> Generic IEEE 802.11 Networking Stack (mac80211)

Device Drivers --->
[*] Network device support --->
[*] Wireless LAN --->
<*> Realtek RTL8192CE/RTL8188SE Wireless Network Adapter

Nicolas.

HKAipost

unread,
Jan 18, 2012, 2:55:53 PM1/18/12
to biffe...@googlegroups.com
Actually even with the support built in 2.6.38.8 nothing seems to happen
though when i plug my 0bda:8176. dmesg gives:

usb 1-1: new high speed USB device using ehci_hcd and address 3

I checked in
bb/openwrt/build_dir/linux-rdc/linux-2.6.38.8/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
:8176 is listed.

Any pointer?

Regards
hka.

nicolas le falher

unread,
Jan 18, 2012, 3:15:12 PM1/18/12
to biffe...@googlegroups.com
I've make a mistake.

rtl8192ce is for pci device, 8176 is listed but ID is 0x10ec.

Your device is a rtl819cu (for usb device) :
> cat build_dir/linux-rdc/linux-3.0.17/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | grep 8176
    {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8176, rtl92cu_hal_cfg)},
> cat build_dir/linux-rdc/linux-3.0.17/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | grep bda
#define USB_VENDER_ID_REALTEK        0x0bda

And it comes with kernel 2.6.39 :).
So try with kernel 3.0.17.

Nicolas


2012/1/18 HKAipost <goo...@hk.airpost.net>
--
To unsubscribe send email to bifferboard+unsubscribe@googlegroups.com

HKAipost

unread,
Jan 19, 2012, 5:15:32 AM1/19/12
to biffe...@googlegroups.com
Hello,

THanks for porting 3.0 kernel :)
I gave it a try, but i'm still having some issues:

1/ "Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter" can only
be built as package (<M>) kernel_menuconfig won't allow to select <*>

2/ Build goes fine, but no rtl81* package can be found in bin dir.

3/ Though I found rtl8192cu.ko in build dir, I tried to add it to
/lib/modules/3.0.17 but:

# insmod rtl8192cu.ko
insmod: can't insert 'rtl8192cu.ko': unknown symbol in module, or
unknown parameter

Any pointer would help.

Though i'm really confused with these realtek wlan dongles. It's never
clear what supports what, product name are erratic, between the rtl8188
the rtl8192 and then the *cus, *cu, *ce, etc.

On my ubuntu I had made the dongle work building the modules for a 2.6
kernel from linux sources for from this page:
http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=48&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true
That was before 3.0 kernel was officially supported by ubuntu. And it
seams that the source i used can't be found any more there. Here is a
copy:
http://dl.dropbox.com/u/1513082/rtl8192_8188CU_linux_v3.0.2164.20110715.tar.gz
totally confusing, i don't know where to find a new source...

Anyway, one question, in this thread:
https://groups.google.com/group/bifferboard/browse_thread/thread/b67df618eabbfed6/0803959fc988029c?lnk=gst&q=wifi+openwrt#0803959fc988029c

What device ID were you using? actually I first thought you also had
0x0bda:8176

hka.

On 1/18/12 9:15 PM, nicolas le falher wrote:
> I've make a mistake.
>
> rtl8192ce is for pci device, 8176 is listed but ID is 0x10ec.
>
> Your device is a rtl819cu (for usb device) :
> > cat
> build_dir/linux-rdc/linux-3.0.17/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
> | grep 8176
> {RTL_USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8176, rtl92cu_hal_cfg)},
> > cat
> build_dir/linux-rdc/linux-3.0.17/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
> | grep bda
> #define USB_VENDER_ID_REALTEK 0x0bda
>
> And it comes with kernel 2.6.39 :).
> So try with kernel 3.0.17.
>
> Nicolas
>
>

> 2012/1/18 HKAipost <goo...@hk.airpost.net <mailto:goo...@hk.airpost.net>>


>
> Actually even with the support built in 2.6.38.8 nothing seems to
> happen though when i plug my 0bda:8176. dmesg gives:
>
> usb 1-1: new high speed USB device using ehci_hcd and address 3
>
> I checked in

> bb/openwrt/build_dir/linux-__rdc/linux-2.6.38.8/drivers/__net/wireless/rtlwifi/__rtl8192ce/sw.c


> :8176 is listed.
>
> Any pointer?
>
> Regards
> hka.
>
>
>
> On 1/15/12 5:06 PM, Nicolas Le Falher wrote:
>
> I repost here after a private mail with hka.
>
> 0bda:8176 is not a rtl8192su, but a rtl8192ce device, only supported
> on 2.6.38.
> Take a look at post with 2.6.38.8 support and add support in
> "kernel_menuconfig" for rtl8192ce :
>
> [*] Networking support --->
> -*- Wireless --->
> <*> cfg80211 - wireless configuration API
> <*> Generic IEEE 802.11 Networking Stack (mac80211)
>
> Device Drivers --->
> [*] Network device support --->
> [*] Wireless LAN --->
> <*> Realtek RTL8192CE/RTL8188SE Wireless Network Adapter
>
> Nicolas.
>
>
> --
> To unsubscribe send email to

> bifferboard+unsubscribe@__googlegroups.com
> <mailto:bifferboard%2Bunsu...@googlegroups.com>
>
>
> --
> To unsubscribe send email to bifferboard...@googlegroups.com

nicolas le falher

unread,
Jan 19, 2012, 6:01:24 AM1/19/12
to biffe...@googlegroups.com
1/ "Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter" can only be built as package (<M>) kernel_menuconfig won't allow to select <*>
[*] Networking support  --->
   -*-   Wireless  --->
      <*>   cfg80211 - wireless configuration API
         <*>   Generic IEEE 802.11 Networking Stack (mac80211)

Device Drivers  --->
   [*] USB support  --->
      <*>   Support for Host-side USB
   [*] Network device support  --->
      [*]   Wireless LAN  --->
         <*>   Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter


2/ Build goes fine, but no rtl81* package can be found in bin dir.
Yes, seems built in the kernel, not like a package.
 
Test with that, or send me your device ;).

Nicolas

Nicolas Le Falher

unread,
Jun 25, 2012, 6:43:26 PM6/25/12
to biffe...@googlegroups.com
HKairpost,

I've bought a rtl8192cufw recently, it works fine but when I scan wireless "Signal" and "Quality" are always same for all AP (with iwlist and iwinfo).
Can you make a test with your device, and tell me your kernel version ?

Thanks.
Reply all
Reply to author
Forward
0 new messages