maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Troubleshooting (https://talk.maemo.org/forumdisplay.php?f=6)
-   -   Connect to WLAN from command line (https://talk.maemo.org/showthread.php?t=3782)

TA-t3 2007-01-03 17:40

Running just 'iwconfig' after the initial iwconfig setup command should show your essid and key etc. If so, then it's associated ok. After that you'll have to run a program to actually do the dhcp setup, I don't know what the dhcp client is called on the 770, try just entering 'dhcp' and press <tab>. It's usually either of dhcp-client or dhcpcd, but could be something else. In any case, whatever its name run it with 'wlan0' as argument (e.g. 'dhcp-client wlan0')

SeRi@lDiE 2007-01-03 18:38

Quote:

Originally Posted by TA-t3
Running just 'iwconfig' after the initial iwconfig setup command should show your essid and key etc. If so, then it's associated ok. After that you'll have to run a program to actually do the dhcp setup, I don't know what the dhcp client is called on the 770, try just entering 'dhcp' and press <tab>. It's usually either of dhcp-client or dhcpcd, but could be something else. In any case, whatever its name run it with 'wlan0' as argument (e.g. 'dhcp-client wlan0')


I think he is trying to connect to a specific network... with a specific IP.

The actual command for dhcp is dhcpclient wlan0

lmf 2007-01-03 22:08

Quote:

Originally Posted by nite_man
Sure. I couldn't call iwconfig and iwevent without them

I also tried this, and it didn't work...

I did:
sudo gainroot
ifconfig wlan0 up
iwconfig wlan0 mode managed essid my_ap_essid

after that, i confirm that the n770 did not connect to the ap, even though they are in the same room...

running "iwlist wlan0 scanning", lists my AP.
(btw, my ap's essid is hidden)

nite_man 2007-01-04 07:40

I found the way to connect my Nokia to WLAN. Run following commands:

ifconfig wlan0 up
iwconfig essid "My access Point" enc MY_KEY mode managed
udhcpc -i wlan0

Note that ESSID should be in the quotes. Otherwise it won't be assigned correctly (at least in my case).
To check that everything ok run first iwconfig wlan0. It should display you options of your access point. Then run ifconfig to see that IP is assigned to your device.

TA-t3 2007-01-04 11:38

Yes, any word with spaces in must be inside quotes on Unix (or you may backslash the spaces), otherwise the word after the space will be taken as the next argument instead.

lmf 2007-01-04 18:57

This ONLY works if the ap is NOT hiding the essid...
(it's strange, because from another linux machine I can connect without any problems...)
However, connecting from the top bar icon, works. (it's just a bit slow...)

so, the question is:
How to manually connect the Nokia 770 to a wifi hotspot with a hidden essid?

nite_man 2007-01-05 10:41

Here is an another way to bring WLAN up from command line. It's possible to do using dbus:
Quote:

Actually, I would suggest sending a dbus message to the network control
software, which would take care of all of that for you. However, the dbus
ontology is very meagerly documented, and to discover the magic incantation
you'll have to execute "dbus-monitor" with the correct command line
arguments. Then (with the interface shut off) start the web browser
showing an outside URL. It will send the signal, and when the net comes up
a dbus signal returns to the browser and it knows it can download and show
that page. And you will have trapped the dbus chatter that makes it
happen, so you can imitate in your command line application.
Personally, I didn't test it yet. But probably, it'd better to use dbus because in this case all native Nokia770 connection functionality will work i. e. WLAN connection applet indicator.

SeRi@lDiE 2007-01-06 01:15

Re: Connect to WLAN from command line
 
I stand corrected all commands in Debian are just like BSD are all different from *nix

Neil McAllister 2007-01-09 22:24

Re: Connect to WLAN from command line
 
I have heard that the DHCP client on the 770 is called 'udhcpc', but I haven't had any real luck with it. I was hoping the command line would give me a second crack at DHCP when my 770 fails with the dreaded "link local address" (yes, my 770 is still all but useless to me in public places where there are lots of Wi-Fi networks present).

nite_man 2007-01-10 08:13

Re: Connect to WLAN from command line
 
Be sure that you became a root - 1. Flash you Nokia with some options (see maemo wiki) and run a command sudo gainroot. All network commands are available only for root.


All times are GMT. The time now is 02:20.

vBulletin® Version 3.8.8