WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: wifi.tcz Extension (small issue)  (Read 4473 times)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
wifi.tcz Extension (small issue)
« on: June 25, 2011, 09:21:51 PM »
This app is great, it's so small.  Light on resources and fast!

it worked great with a ndis_wrapper, but now that I've compiled a driver and made an extension of it the wifi app only works great after a connection has already been established.  after that you can connect to AP..

??

yeah that's what I was thinking,   I know it's something I did wrong again :)


anyhow,  after a boot with all references to wpa scripts removed from "bootlocal.sh"  nice clean boot

the driver is loaded
Quote
tc@box:~$ sudo -s
root@box:/home/tc# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:600 (600.0 B)  TX bytes:600 (600.0 B)

root@box:/home/tc# iwconfig wlan0
wlan0     unassociated  Nickname:"rtl_wifi"
          Mode:Auto  Access Point: Not-Associated   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@box:/home/tc# wifi.sh
No wifi devices found!
root@box:/home/tc#
root@box:/home/tc#
failed?
What, No wifi devices found!??

Ok maybe the device is slow lol  :-\
let's configure manually,
Quote
root@box:/home/tc#
root@box:/home/tc# iwconfig wlan0 essid xxxx key xxxxxxxx
Error for wireless request "Set ESSID" (8B1A) :
    SET failed on device wlan0 ; Operation not permitted.
root@box:/home/tc#
failed!

Ok lets try a pre-configured script which parses a wpa_supplicant config file with the info of my AP
Quote
root@box:/home/tc# wpa_supplicant -Dwext -iwlan0 -c/opt/wpa_configure.conf &
root@box:/home/tc# ioctl[SIOCSIWAP]: Operation not permitted
Trying to associate with 00:18:e7:xx:xx:xx (SSID='home' freq=2427 MHz)
Associated with 00:18:e7:xx:xx:xx
WPA: Key negotiation completed with 00:18:e7:xx:xx:xx [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to 00:18:e7:xx:xx:xx completed (auth) [id=0 id_str=]
root@box:/home/tc#
YAY!!

one step further
Quote
root@box:/home/tc# udhcpc -i wlan0
udhcpc (v1.18.3) started
Sending discover...
Sending discover...
Sending select for 192.168.0.100...
Lease of 192.168.0.100 obtained, lease time 86400
deleting routers
route: SIOCDELRT: No such process
adding dns 192.168.0.1
root@box:/home/tc#
Now we're cooking with gas!!

Now that we have established a fully working connection
lets try the wifi.sh again.
Quote
root@box:/home/tc# wifi.sh
Found wifi device wlan0
Standby for scan of available networks...

Select Wifi Network

    ESSID                         Enc   Qual    Channel Type            
 1. coop                           on     0       4     WPA
 2. epg2001                     on     0       1     WPA
"---------------------------etc--------------------------------"
14. Tiny                           on     0       6     WPA

Enter selection ( 1 - 17 ) or (q)uit, (n)ext, (p)revious: :

H'mmmm

If I add these two functions to "bootlocal.sh"
Code: [Select]
#!/bin/sh
wpa_supplicant -Dwext -iwlan0 -c/opt/wpa_configure.conf &
/opt/wlan0.sh   (this created by control panel - network utility)
then I have a fully functional internet connection as fast as I can open a browser after bootup.

Great, wifi script does not detect wlan0.     this is really the coolest script, so what does it take to be able to find a device (wlan0) which is clearly up and running,  what am I missing here??
 
« Last Edit: June 25, 2011, 10:42:30 PM by coreplayer2 »

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: wifi.tcz Extension (small issue)
« Reply #1 on: June 26, 2011, 02:16:23 AM »
wifi.sh is still under development. First cut was v0.1. I am nearing the completion of v0.2.
No promises that it will work for everyone. But will get better over time and with good feedback.
BTW. v0.2 should recognize your non-configured wifi device. ;)

« Last Edit: June 26, 2011, 02:51:52 AM by roberts »
10+ Years Contributing to Linux Open Source Projects.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: wifi.tcz Extension (small issue)
« Reply #2 on: June 26, 2011, 06:01:07 AM »
nice work thanks


FYI  I reinstalled wicd   which had no issues with the device.   However neither wifi radar or wpa_gui could recognize the device.

So I'm thinking there is a wpa_supplement conflict here..

Offline andrewb

  • Full Member
  • ***
  • Posts: 121
Re: wifi.tcz Extension (small issue)
« Reply #3 on: June 26, 2011, 09:33:47 AM »
Another useful addition would be searching for hidden networks (i.e. SSID not broadcast). Perhaps as an option if no networks found from initial scan an SSID could be input?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14741
Re: wifi.tcz Extension (small issue)
« Reply #4 on: June 26, 2011, 09:42:02 AM »
Thanks - in fact we've been discussing exactly that..

Offline pugliese

  • Newbie
  • *
  • Posts: 35
Re: wifi.tcz Extension (small issue)
« Reply #5 on: June 26, 2011, 01:56:09 PM »
What a pleasure this morning to replace my wifi setup with wifi.tcz.

After  installed,  with  1 click and 1 # entered a connection was flawlessly delivered within 10 sec.

The user experience demonstrated the advantages I understood  tinycore was architect-ed to provide.


Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: wifi.tcz Extension (small issue)
« Reply #6 on: July 03, 2011, 02:23:39 AM »
Thanks for the update on the great wifi extension.    the script works much better now :)

much better detection of available AP's  which consistently detected in the region of 20 - 30 AP's tonight where previously we were lucky if the AP only a few feet away would be detected at all and at most 3 to 6 AP's available during the busiest evening hours which were also never consistent,  all good now  Great job thanks.
** am not sure the criteria by which the AP's are listed, although it appears to be based on AP signal strength, however the list isn't representative of the strengths of nearby strong signals.  


wifi script did detect a previous connection and provided the choice to disconnect and rescan.  Another plus :)   thank you.   much more slick than a manual disconnect with terminal commands.   I like it a lot thanks

**Only issue is it detects a connection even when there isn't one, ie a wifi device is found and identified as wlan0 however the device is not associated with any AP and is not assigned an ip address.  yet wifi.sh reports already connected and queries to disconnect and rescan..**

v0.2 successfully disconnects and re-establishes a connection, however connections do not succeed every time.  so far a successful connection occasionally takes two attempts, which I suspect has more to do with the version of wpa_supplicant the wifi driver was compiled against.  the wifi driver build instructions did say to use the version supplied with the driver but  instead i used the wpa_supplicant extension from the repository which may be a different version which may add a conflict.  so i'll try to compile and package the version supplied with the driver then we'll see.   there may be another reason, dhcp requests for an ip may time out before success.  I believe the number of attempts can be increased?  meanwhile it works YAY!!


**One question though:  why the need for entering the password twice when attempting to (re)connect ?  there is a need to confirm the password in the event of a misspelling etc when setting the password at the Access Point, but from the client???   seems to have only one possible purpose to ensure the correct password is save in database, but I question if that's really necessary since the password may not be correct even if the spelling is.  this only delays the initial attempt to connect..





 

 
« Last Edit: July 03, 2011, 03:37:47 AM by coreplayer2 »