Driver For Realtek Wifi Dongle


zx-81

Certified Guru
Joined
Apr 5, 2007
Messages
679
Age
53
Location
Earth
Website
zx81.zx81.free.fr
Hi All,

I bought few weeks ago a very cheap wifi dongle (chip RT 8188SU) at DX, and i wanted to make it work on my caanoo.
I've tried several source code driver package without any luck and finally i got this one working
(compatible with RT 8712_8188_8191_8192SU)

Here is the source code + binary version of the module 8712u.ko i've sucessfully compiled for the caanoo :
http://zx81.zx81.free.fr/public/caanoo/drivers/caanoo-rtl8712.tar.bz2

I've played with that module using insmod and ifconfig and sucessfully
listed all the essid i can reach from home (using iwlist from
/lib..../wireless/tools/...) .

Now, i need some help, since the wifi connection setup menu of the caanoo doesn't reconize my dongle
even if the module is loaded and if wlan0 is available, and i'm not able to connect to my hotspot.

I haven't found a way to connect properly using dhcp + wpa etc ...
 
Yes, I have this problem too.
I use Railink-compatible dongle too, and when I use ifconfig etc, dongle flash with his led.
But caanoo not doesn't reconize networks.
Now i try to play with iwconfig parameters.
 
u9i said:
Hi zx, i get a 404 error on your posted link. But which wifi adapter did you buy from dealextreme?

link is fixed (forgrot the '2' of 'bz2').

To answer your question, i bought this one :
https://www.dealextreme.com/details.dx/sku.35897

It's provided with linux driver source code, but i haven't been able to make it work even on my fedora PC (that's why i'm using the rtl8712 driver code).
 
Last edited by a moderator:
I bought this one for around £7.50

http://cgi.ebay.co.uk/EDUP-Mini-Wireless-N-11n-Wi-Fi-Nano-USB-Adapter-Dongle-/120637109685?pt=UK_Computing_Networking_SM&hash=item1c168835b5

nice and small goner try your driver how does it work? ;)
 
zx-81 said:
...
(compatible with RT 8712_8188_8191_8192SU)
...

I find another wifi dongle (D-Link DWA-131) with Chipset Realtek RTL8192U. This driver is operational with this dongle ?
 
Last edited by a moderator:
it should, but for now i haven't been able to connect to my wireless router using this driver ... i've been only able to list the wireless essid arround me ...
 
zx-81 said:
it should, but for now i haven't been able to connect to my wireless router using this driver ... i've been only able to list the wireless essid arround me ...

I have this problem with several laptops on Linux. You have make tests with different wireless router?
 
Last edited by a moderator:
Here is what i'm doing :

/sbin/insmod af_packet.ko
/sbin/insmod 8712u.ko
sleep 3


/sbin/ifconfig wlan0 up
sleep 3

# here it works and give me the list of all essid i've got arround me :
/lib/modules/2.6.24/kernel/net/wireless/tools/iwlist wlan0 scanning

# then i configure my access point parameters :
/lib/modules/2.6.24/kernel/net/wireless/tools/iwconfig wlan0 essid "MyOpenRouterNameWithNoKey" mode Managed

# then i launch the dhcp client, but without any success ...
/sbin/udhcpc -i wlan0


Having a look on the strings of gp2xmenu, it doesn't look too different from what it's done with the GPH wifi dongle.
They use ra0 instead of wlan0 and they use /lib/modules/2.6.24/kernel/net/wireless/tools/iwpriv ...
 
finally i got it to work using a shell script that tries to validate the connection step by step. I've tried with open hotspot and a 128 bits WEP access. This driver should work with the caanoo, but for now i succeed to connect randomly (i've to restart the caanoo several times to succeed to initialize my wifi dongle).

Here is the script i'm using, and i have to plug the dongle few second after the launch of the script (or it doesn't work)
Code:
#!/bin/sh


# Your ESSID
ESSID=MYESSID

# Your WEP KEY 64 or 128 Bits 
WEP=YOUWEPKEYHERE

# Your wireless mac address :
MAC=XX:YY:ZZ:TT:WW:AA


/sbin/insmod usb-storage.ko
/sbin/insmod af_packet.ko
sleep 2

MAX_CH=2
MAX_CS=5
CH=0
OK=0

while [ ${CH} -ne ${MAX_CH} ]
do
  CH=`expr ${CH} + 1`
  echo "current hard iter=${CH}"
  echo "insert modules ..."
  /sbin/insmod  8712u.ko initmac=${MAC}
  sleep 10
  CS=0
  while [ ${CS} -ne ${MAX_CS} ]
  do
    CS=`expr ${CS} + 1`
    TEST=`/sbin/ifconfig -a | grep -c wlan0`
    if [ "${TEST}" -ne 0 ]
    then OK=1; break
    fi
    sleep 1
  done
  if [ ${OK} -eq 1 ]
  then  CS=0
        OK=0
        while [ ${CS} -ne ${MAX_CS} ]
        do
          CS=`expr ${CS} + 1`
          echo "current soft iter=${CS}"
          echo "activate wlan0 interface ..."
          /sbin/ifconfig wlan0 up
          sleep 3
          echo "list access point"
          TEST=`/lib/modules/2.6.24/kernel/net/wireless/tools/iwlist scanning | grep -c ${ESSID}`
          if [ "${TEST}" -ne 0 ]
          then OK=1; break
          fi
          echo "desactivate wlan0 interface ..."
          /sbin/ifconfig wlan0 down
          sleep 1
        done
  fi
  if [ ${OK} -eq 1 ]
  then break
  fi

  echo "unload modules ..."
  /sbin/rmmod  8712u.ko
  sleep 3
done

if [ ${OK} -eq 1 ]
then   echo "Connect to ${ESSID}"
       /lib/modules/2.6.24/kernel/net/wireless/tools/iwconfig wlan0 mode managed essid ${ESSID} key  ${WEP}
       sleep 5
       echo "Get IP from dhcp ..."
       /sbin/udhcpc -i wlan0
fi

cd /usr/gp2x
exec ./gp2xmenu
 
I can confirm it works in ad-hoc mode, i've successfully established a connection between my PC and my Caanoo using two wifi dongles. But as said before, you must insert the dongle after the driver has been properly loaded (using /sbin/insmod command).
 
can you give me an exsam. to start in adhoc mode please

if its work in quake thats will be fine and will coming
in the next version of GPH Quake
 
I'm using classical wireless setup sequence, on the caanoo side :

Code:
/sbin/insmod of all required moduels (ie usb stuff)
/sbin/insmod af_packet.ko  

# here is the wifi dongle driver 
/sbin/insmod  8712u.ko initmac="YOUR_MAC_ADDR_HERE"

# wait to let you insert the dongle
sleep 10

# setup the device
/sbin/ifconfig wlan0 up

# configure the wireless connection (you need to setup your own parameters) 
/lib/modules/2.6.24/kernel/net/wireless/tools/iwconfig wlan0 mode ad-hoc channel 5 etc ...

# setup an IP
/sbin/ifconfig wlan0 192.168.2.2

On the PC side

Code:
# setup the moduels & wifi driver 
...

# setup the device
/sbin/ifconfig wlan0 up

# configure the wireless connection (you need to setup your own parameters) 
iwconfig wlan0 mode ad-hoc channel 5 etc ...

# setup an IP
/sbin/ifconfig wlan0 192.168.2.1

then you should be able to connect from the PC to the caanoo and the contrary using this ad-hoc connection
 
zx-81 do we have to use this with gmenu2x and can you explain how to set this up for those of us that aint that savvy with all this

ruffnutts
 
Hmm dont start for me...

my Setup is:
Code:
#!/bin/sh

# Start WLAN
/sbin/ifconfig wlan0 up

# Setup WLAN as Ad-Hoc
/lib/modules/2.6.24/kernel/net/wireless/tools/iwconfig wlan0 ESSID QuakeNET mode Ad-Hoc rate auto channel auto

# Setup IP and Netmask
/sbin/ifconfig wlan0 192.168.2.77 netmask 255.255.255.0

# Start Quake
./quake -mem 64 >stdout.txt 2>stderr.txt

# Turn off WLAN
/sbin/ifconfig wlan0 down

# Back to GP2X Menu
cd /usr/gp2x
exec ./gp2xmenu
 
If you use the gph dongle, then the device name is not wlan0 but ra0. You also need to have the wifi dongle driver loaded (using insmod command).
 
Back
Top