Author Topic: Get Online Only Using Bash And A Usb Card  (Read 10520 times)

Allelectrix

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
    • http://
Get Online Only Using Bash And A Usb Card
« on: October 24, 2008, 05:21:06 pm »
Hi all,

Heres how to get online with BT3:

insert the USB Card into the Hub. we are dealing here with the rt73 Card Edimax EW-7318USg Card but any RT73 card should do it.

open a BASH Shell and issue:

ifconfig rausb0 up
iwconfig rausb0 essid "essid_of_AP" channel X mode managed enc ABCDEF0123456789 ap 00:11:22:33:44:55


where:

1. essid_of_AP = the essid of the AP in quotes
2. X = channel AP is on. enter 2 for channel 2 or 11 for channel 11 etc,etc...
3. ABCDEF0123456789 = the HEX encryption key if the Network is using WEP. this will be either 6 or 13 bytes long.
4. ap = 00:11:22:33:44:55 replace this with the AP's MAC addresss

Now, if the HTTP control page is at 192.168.1.254 do next:

hostname

bt

the hostname is bt

finally, to get online using DHCP do:

dhcpcd -h bt -G 192.168.1.254 rausb0


if this command don't complete almost immediately, it will fail to connect. then check:

Is USB Card connected to a powered hub ?
Is the card on the same channel as the AP ?
Is the AP's MAC displayed after you issue iwconfig ?

QUESTIONS


Can someone please answer these for me:

1. How do we get the AP's MAC address listed with iwconfig in pdaXii13 using a USB Card ?
2. I have tried this method with pdaXii13 on a Zaurus SL-C1000. All commands load except:

iwconfig rausb0 ap 00:11:22:33:44:55

even though this command completes correctly, the AP's MAC is still not listed when afterwards we issue iwconfig .
therefore, does anyone know the solution to this ? because if we then try the dhcpcd command above, it fails,
as I said, all other parameters get loaded except AP, a rather annoying little problem.

Hope someone can help.

Thanks all, Allelectrix
SL-C1000 running PdaXii13
Edimax EW-7318USg rt73 Chipset USB 802.11 g/b Wifi
ASPj Source Code rt73.o 2.4.20 kernel module with monitor + packet injection capability
Aircrack-ng 0.9
Miniature USB 2.0 Hub that attaches to rear of screen comfortably using velcro
2 x 500mA 12v DC - 5v DC Converters powering the USB Hub, WiFi Card and the Computer
12v DC 7Ah Sealed Lead Acid Rechargeable Cell powering the DC to DC Convertors

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3703
    • View Profile
Get Online Only Using Bash And A Usb Card
« Reply #1 on: October 26, 2008, 06:54:44 pm »
you shouldn't need to specify the AP if it's an access point (i.e. not ad-hoc), and the wireless client should automatically choose the right client.

iwconfig should then show the AP's mac, and repeat back the wep key (only root sees that).

ping the gateway and look at the arp table ("arp -an") or find the arp file in /proc/sys/net (something like that ) which gets populated when you ping the gateway.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

sdjf

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
    • http://www.sdjf.wordpress.com and http://www.sdjf.esmartdesign.com
Get Online Only Using Bash And A Usb Card
« Reply #2 on: October 27, 2008, 11:57:17 am »
When he says "only root sees that" it means that you have to run the commands as root in order to have access to the information.

In the version of "sudo" I have on my 6000, that means I just type "sudo COMMAND" for whatever command needs root access.

Do you have sudo installed?

sdjf
http://www.sdjf.esmartdesign.com
http://www.sdjf.wordpress.com
-----------------
sl5500 running Sharp ROM 2.38 (dead batteries)
sl6000L running Sharp ROM 1.12 (still working)
Opera 7.25 and 7.30
Socket CF 56k modem
3Com USB Ethernet Adapter
Toshiba, Lexar and Kingston SD cards
Lexar, Kingston and Transcend CF cards

Allelectrix

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
    • http://
Get Online Only Using Bash And A Usb Card
« Reply #3 on: November 01, 2008, 03:46:34 pm »
Quote from: sdjf
Do you have sudo installed?

sdjf

Hi sdjf, thanks for your reply, no, I am using a C1000 with pdaxii13 do we still need sudo ?

Have you ever got an online connection using a USB Wifi Card in pdaXii13 ?

Quote from: speculatrix
you shouldn't need to specify the AP if it's an access point (i.e. not ad-hoc), and the wireless client should automatically choose the right client.

thanks, but this only seems to work for CF Wifi Cards, Have you ever got an online connection using a USB Wifi Card in pdaXii13 ?
Quote
iwconfig should then show the AP's mac, and repeat back the wep key (only root sees that).

yep, again this is so with CF Wifi cards, have not had this work with USB wifi Cards  

Quote
ping the gateway and look at the arp table ("arp -an") or find the arp file in /proc/sys/net (something like that ) which gets populated when you ping the gateway.

OK will try that. thanks lads for your replies so far. It would be really neat if we could get this resolved as USB Wifi Cards are vastly superior
in every way to CF b Cards, in terms of RF range, abilities, performance, and they basically add a whole pile of kick ass features that
B cards cannot even come near too.

so if this gets added to pdaX circia Kernel 2.6 COUNT ME IN !  

keep your ideas rolling in here, we still need a kernel 2.4.20 solution to this problem.
SL-C1000 running PdaXii13
Edimax EW-7318USg rt73 Chipset USB 802.11 g/b Wifi
ASPj Source Code rt73.o 2.4.20 kernel module with monitor + packet injection capability
Aircrack-ng 0.9
Miniature USB 2.0 Hub that attaches to rear of screen comfortably using velcro
2 x 500mA 12v DC - 5v DC Converters powering the USB Hub, WiFi Card and the Computer
12v DC 7Ah Sealed Lead Acid Rechargeable Cell powering the DC to DC Convertors

sdjf

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
    • http://www.sdjf.wordpress.com and http://www.sdjf.esmartdesign.com
Get Online Only Using Bash And A Usb Card
« Reply #4 on: November 01, 2008, 10:58:48 pm »
I do not know pdaX roms.  All I know is that if a command or file can only be accessed or performed by root and you are not root, you will fail.  It is a kernel thing.

Run the following:  echo $USER

That should tell you who you are running as.

Are you typing all this every time or working with a script to automate the parts you are sure of?

sdjf
http://www.sdjf.esmartdesign.com
http://www.sdjf.wordpress.com
-----------------
sl5500 running Sharp ROM 2.38 (dead batteries)
sl6000L running Sharp ROM 1.12 (still working)
Opera 7.25 and 7.30
Socket CF 56k modem
3Com USB Ethernet Adapter
Toshiba, Lexar and Kingston SD cards
Lexar, Kingston and Transcend CF cards

Allelectrix

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
    • http://
Get Online Only Using Bash And A Usb Card
« Reply #5 on: November 02, 2008, 04:26:52 pm »
typing the commands, I also believe it is a kernel config problem, things are strongly pointing in this direction now.
SL-C1000 running PdaXii13
Edimax EW-7318USg rt73 Chipset USB 802.11 g/b Wifi
ASPj Source Code rt73.o 2.4.20 kernel module with monitor + packet injection capability
Aircrack-ng 0.9
Miniature USB 2.0 Hub that attaches to rear of screen comfortably using velcro
2 x 500mA 12v DC - 5v DC Converters powering the USB Hub, WiFi Card and the Computer
12v DC 7Ah Sealed Lead Acid Rechargeable Cell powering the DC to DC Convertors

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3703
    • View Profile
Get Online Only Using Bash And A Usb Card
« Reply #6 on: November 03, 2008, 06:04:05 am »
Quote from: sdjf
Run the following:  echo $USER

or "id -a"
?
« Last Edit: November 03, 2008, 06:04:16 am by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

sdjf

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
    • http://www.sdjf.wordpress.com and http://www.sdjf.esmartdesign.com
Get Online Only Using Bash And A Usb Card
« Reply #7 on: November 03, 2008, 06:38:27 pm »
Quote from: Allelectrix
typing the commands, I also believe it is a kernel config problem, things are strongly pointing in this direction now.

Please show the results.  If it is a kernel thing, it should be fixable somehow.

speculatrix, "id -a" does not work in busybox, but "id" works without arguments.

sdjf
http://www.sdjf.esmartdesign.com
http://www.sdjf.wordpress.com
-----------------
sl5500 running Sharp ROM 2.38 (dead batteries)
sl6000L running Sharp ROM 1.12 (still working)
Opera 7.25 and 7.30
Socket CF 56k modem
3Com USB Ethernet Adapter
Toshiba, Lexar and Kingston SD cards
Lexar, Kingston and Transcend CF cards

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Get Online Only Using Bash And A Usb Card
« Reply #8 on: November 03, 2008, 11:30:20 pm »
I'm partial to "whoami", actually
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

sdjf

  • Sr. Member
  • ****
  • Posts: 447
    • View Profile
    • http://www.sdjf.wordpress.com and http://www.sdjf.esmartdesign.com
Get Online Only Using Bash And A Usb Card
« Reply #9 on: November 05, 2008, 10:07:06 pm »
Quote from: pelrun
I'm partial to "whoami", actually

Great thought, and it even works on both my Z's!

sdjf
http://www.sdjf.esmartdesign.com
http://www.sdjf.wordpress.com
-----------------
sl5500 running Sharp ROM 2.38 (dead batteries)
sl6000L running Sharp ROM 1.12 (still working)
Opera 7.25 and 7.30
Socket CF 56k modem
3Com USB Ethernet Adapter
Toshiba, Lexar and Kingston SD cards
Lexar, Kingston and Transcend CF cards

Allelectrix

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
    • http://
Get Online Only Using Bash And A Usb Card
« Reply #10 on: November 10, 2008, 08:00:31 pm »
Quote from: sdjf
Run the following:  echo $USER

sdjf

Hi everyone, I'll try to answer everyones thoughts here, first sdjf:

the C1000 did nothing to this command.:

echo $USER

root )

Quote
Are you typing all this every time or working with a script to automate the parts you are sure of?

yes, typing each command.

Speculatrix, you mention the command :

id -a

this just gives an error in PdaXii13 with no output.

sdjf, you write again:

Quote
Please show the results. If it is a kernel thing, it should be fixable somehow.

right, here is all the results from the new kernel config:

first of all several screenshots from running;

make menuconfig



and the resulting .config file:



replace .tar with .txt this is a text file not a tar file.

here is my extended, compiled 2.4.20 1.3Mb kernel for you all to try:



remove the .tar from the end, this is a zImage file. install it with the following file:

 [ Invalid Attachment ]

rename to updater.sh

put this updater.sh file and the above zImage file into the root of a CF or an SD card and do a full reset, then
flash the kernel, once the kernel is flashed, the computer will ask you to reboot.

the Computer will now boot with the new kernel.

with this Kernel configuration, dhclient runs, but it does not aquire an DHCP assigned IP address still. also:

iwconfig rausb0 ap 00:45:AC:4C:BB:89

still does not list the AP's MAC address when afterwards we do:

iwconfig

neither does rausb0 fetch the MAC address of the AP off the air, and even though the kernel image is now 1.3Mb in size,
thats 100,000 bytes more than usual, we still are hitting a brick wall.

dhcpcd rausb0

also yields no results, but only brings the Wifi interface down.

Ah! Pelrun, typing:

whoami

the C1000 outputs:

root

root )

so, does this mean that we no longer need to type :

sudo X whatevercommand ?

speculatrix, you wrote:

Quote
ping the gateway and look at the arp table ("arp -an") or find the arp file in /proc/sys/net (something like that ) which gets populated when you ping the gateway.

alas a good idea mate, but, pinging is useless if you have not got an IP address of your own to start with, therefore:

arp -an

returns nothing.

OK, the C1000 is still sorely lacking USB Wifi connectivity, so, please, please , please keep those thoughts rolling in here, I want to
see if we can make this OS the best EVER for the C1000.

thanks to everyone who has contributed so far, do you have any more ideas ?
SL-C1000 running PdaXii13
Edimax EW-7318USg rt73 Chipset USB 802.11 g/b Wifi
ASPj Source Code rt73.o 2.4.20 kernel module with monitor + packet injection capability
Aircrack-ng 0.9
Miniature USB 2.0 Hub that attaches to rear of screen comfortably using velcro
2 x 500mA 12v DC - 5v DC Converters powering the USB Hub, WiFi Card and the Computer
12v DC 7Ah Sealed Lead Acid Rechargeable Cell powering the DC to DC Convertors