Author Topic: Got Wifi-radar Working  (Read 5858 times)

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Got Wifi-radar Working
« on: February 20, 2006, 01:35:19 pm »
I've been using Wifi-radar on my laptop and want to use it to identify and associate with wireless networks. The interface is written in Python and only requires pygtk2 and iwconfig. I have all of those installed, yet I keep getting this error when I try and run it:
Code: [Select]
[/home/root] # wifi-radar -v
Could not find platform independent libraries
Consider setting $PYTHONHOME to [:]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/sbin/wifi-radar", line 1241, in ?
    confFile = ConfigParser.ConfigParser()
NameError: name 'ConfigParser' is not defined


Any Python gurus out there than can help? I've tried googling the error without coming up with anything that helps (meaning that I can understand - see my avatar  )

This would be a great app for the Z if we could get it to run.

For more info and the files for Wifi-Radar see: http://www.bitbuilder.com/wifi_radar/

Cheers,
Jerry

****Update****
Thanks to iamasmith's help below, this handy utility is working.It works fine with my old Socket card.

I made an ipk of it complete with desktop file so it shows up in the menu. Let me know how it works with your different cards.
« Last Edit: February 22, 2006, 08:49:19 pm by jerrybme »
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Got Wifi-radar Working
« Reply #1 on: February 21, 2006, 04:53:16 am »
maybe import site fails because all package are not installed.

A workaround maybe to install
python_2.4.1_armv5tel.ipk which I believe contains the whole python install

or import the modules individually... import ConfigParser or something..

(Note I know almost nothing about python)
SLC-860 cacko / senao wifi

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Got Wifi-radar Working
« Reply #2 on: February 21, 2006, 08:13:20 am »
Quote
maybe import site fails because all package are not installed.

A workaround maybe to install
python_2.4.1_armv5tel.ipk which I believe contains the whole python install

or import the modules individually... import ConfigParser or something..

(Note I know almost nothing about python)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=115555\"][{POST_SNAPBACK}][/a][/div]
Above error is with the whole python ipk installed. I even tried compiling python 2.4.2 and installing that, which fixed everything but the ConfigParser error. From reading the Python site, it seems that ConfigParser is part of the python tool set & not an extra module, at least I couldn't find info about compiling it as an extra module....
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Got Wifi-radar Working
« Reply #3 on: February 21, 2006, 08:56:57 am »
Most unusual... just try this and see if it throws any errors...

python
import ConfigParser


Press Ctrl-D to exit Python when you have finished.

ConfigParser should be in the base library set.

- Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Got Wifi-radar Working
« Reply #4 on: February 21, 2006, 02:22:05 pm »
Quote
Most unusual... just try this and see if it throws any errors...

python
import ConfigParser


Press Ctrl-D to exit Python when you have finished.

ConfigParser should be in the base library set.

- Andy
[div align=\"right\"][a href=\"index.php?act=findpost&pid=115577\"][{POST_SNAPBACK}][/a][/div]
From the python command line the import ConfigParser command goes fine without throwing any errors..  

Wierd
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

JohnX

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • http://
Got Wifi-radar Working
« Reply #5 on: February 22, 2006, 06:11:45 am »
Wow.  That is a cool program. I was looking for something exactly like this. Anyways, I managed to get it running on OpenZaurus/GPE ("unstable" distro, built from the latest stuff in the OE tree) w/ 2.6.15 kernel on a C1000. I know this is the pdaxrom forum, but I just thought I'd comment that it's totally worth it to get this program running. I'm running python 2.4.2.  If you need to know any other details about my setup, just ask.
Zaurus SL-C1000 - Linux 2.6.22 - Angstrom/Debian dual boot - Ambicom 802.11b - 1GB Corsair SD
Nokia N800 - 2GB PQI SD card
Zaurus SL-5500 - OZ 3.5.3/Hentges T2/Opie - 64MB Lexar SD card

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Got Wifi-radar Working
« Reply #6 on: February 22, 2006, 06:19:50 am »
Quote
Quote
Most unusual... just try this and see if it throws any errors...

python
import ConfigParser


Press Ctrl-D to exit Python when you have finished.

ConfigParser should be in the base library set.

- Andy
[div align=\"right\"][a href=\"index.php?act=findpost&pid=115577\"][{POST_SNAPBACK}][/a][/div]
From the python command line the import ConfigParser command goes fine without throwing any errors..  

Wierd
[div align=\"right\"][a href=\"index.php?act=findpost&pid=115616\"][{POST_SNAPBACK}][/a][/div]

Just re-read the message... it's failing on site, which would seem to suggest that you didn't install one of the site-packages modules... you have built/installed py-gtk2 haven't you?

And no I can't say for sure why it's failing on ConfigParser seeing as though that's on a seperate import line to gtk and gobject.

- Andy
« Last Edit: February 22, 2006, 06:24:04 am by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Got Wifi-radar Working
« Reply #7 on: February 22, 2006, 09:39:06 am »
Quote
Just re-read the message... it's failing on site, which would seem to suggest that you didn't install one of the site-packages modules... you have built/installed py-gtk2 haven't you?

And no I can't say for sure why it's failing on ConfigParser seeing as though that's on a seperate import line to gtk and gobject.

- Andy
[div align=\"right\"][a href=\"index.php?act=findpost&pid=115702\"][{POST_SNAPBACK}][/a][/div]
Yep, got pygtk2 installed
Code: [Select]
python
>>> import site
works fine from the python command line..

Thanks for your help Andy, BTW (hijacking my own thread..)I've been following all of your work on the BSD arm version, I'm curious as to the difference/benefit to using BSD on the Z compared to pdaXrom?

Cheers,
Jerry
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Got Wifi-radar Working
« Reply #8 on: February 22, 2006, 09:43:39 am »
Quote
Wow.  That is a cool program. I was looking for something exactly like this. Anyways, I managed to get it running on OpenZaurus/GPE ("unstable" distro, built from the latest stuff in the OE tree) w/ 2.6.15 kernel on a C1000. I know this is the pdaxrom forum, but I just thought I'd comment that it's totally worth it to get this program running. I'm running python 2.4.2.  If you need to know any other details about my setup, just ask.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=115700\"][{POST_SNAPBACK}][/a][/div]
Glad to hear it's working for you, yes it's a fine tool for easily connecting to APs. I compiled the python 2.4.2 version and installed it, got the same error..

Hopefully someone else with more technical savvy than I (like Andy) will figure it out for the pdaXrom users.

Cheers,
Jerry
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Got Wifi-radar Working
« Reply #9 on: February 22, 2006, 09:53:45 am »
Quote
Quote
Just re-read the message... it's failing on site, which would seem to suggest that you didn't install one of the site-packages modules... you have built/installed py-gtk2 haven't you?

And no I can't say for sure why it's failing on ConfigParser seeing as though that's on a seperate import line to gtk and gobject.

- Andy
[div align=\"right\"][a href=\"index.php?act=findpost&pid=115702\"][{POST_SNAPBACK}][/a][/div]
Yep, got pygtk2 installed
Code: [Select]
python
>>> import site
works fine from the python command line..

Thanks for your help Andy, BTW (hijacking my own thread..)I've been following all of your work on the BSD arm version, I'm curious as to the difference/benefit to using BSD on the Z compared to pdaXrom?

Cheers,
Jerry
[div align=\"right\"][a href=\"index.php?act=findpost&pid=115716\"][{POST_SNAPBACK}][/a][/div]


OK, I'll come back to you on this.... I have an old SL-C860 knocking around and a couple of free hours

-Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Got Wifi-radar Working
« Reply #10 on: February 22, 2006, 10:53:19 am »
Edit the first line of wifi-radar and take off the -OO there seems to be a problem with bytecode optimisation.

- Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Got Wifi-radar Working
« Reply #11 on: February 22, 2006, 11:05:53 am »
...and I will write a comparison between OpenBSD  and other distributions for the Zaurus soon because a lot of folk are curious.

-Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Got Wifi-radar Working
« Reply #12 on: February 22, 2006, 04:18:35 pm »
Quote
Edit the first line of wifi-radar and take off the -OO there seems to be a problem with bytecode optimisation.

- Andy
[div align=\"right\"][a href=\"index.php?act=findpost&pid=115737\"][{POST_SNAPBACK}][/a][/div]
That was it, damn, that was simple! Thanks Andy!
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

mbaush

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://
Got Wifi-radar Working
« Reply #13 on: March 19, 2006, 08:12:26 pm »
Hello I'm also interested in making this software work, can you instruct on how to get the dependencies and every step to make it work?

Thanks!
Zaurus SL-C3000, Cacko

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Got Wifi-radar Working
« Reply #14 on: March 19, 2006, 10:31:36 pm »
Quote
Hello I'm also interested in making this software work, can you instruct on how to get the dependencies and every step to make it work?

Thanks!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119302\"][{POST_SNAPBACK}][/a][/div]
Just install the ipk (in my first post in this thread), only dependencies are python, iwconfig & pygtk2 but they are installed by default in the ROM.

If it doesn't work, start from a terminal & post the error message.

Cheers,
Jerry
« Last Edit: March 19, 2006, 10:32:19 pm by jerrybme »
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF