Re: [maemo-users] Connect to WLAN from command line

2007-01-08 Thread Michael Stepanov

On 1/8/07, Kalle Valo <[EMAIL PROTECTED]> wrote:


"ext Michael Stepanov" <[EMAIL PROTECTED]> writes:

> ifconfig wlan0 up
> iwconfig wlan0 enc MY_KEY mode managed essid MY_ESSID channel 6
>
> But I didn't see that IP address was assigned to wlan0 interface.

You didn't run the DHCP client:

udhcpc -i wlan0



Correct! After I run this command the WLAN connection is establish.

--

Kalle Valo





--
Cheers,
Michael
___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2007-01-08 Thread Michael Stepanov

On 12/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Wlan is up in the boot through the service wlancond (at /init.d)
associated to runlevel 3. The graphical user interaction doesn't allow to
set up but configure the values of wlan. So you have to define these in
order to wlan starts at runlevel 3 with that configuration.

To do that you have to edit file /etc/network/interfaces with the values
of the wlan (iface, name, address, essid, etc.). Look at here:
http://www.debian.org/doc/manuals/reference/ch-gateway.en.html

A bit more complicate situation is if wlan is not always the same. In such
a situation you must write a script that allows to distinguish between the
different wlans (for instance, via comparison of known mac address and
sniffed mac addres).



Yes, you're right. Here is an example of this script which I found recently
at http://planet.igalia.com:

The /etc/network/interfaces could be like this one (being HomeNET and
WorkNET two existing ESSID network identifiers):

auto eth1
mapping eth1
script /root/WIFI/wldetect.sh
map HomeNET HomeNET
map WorkNET WorkNET

iface HomeNET inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
wireless-essid HomeNET
wireless-key s:mysecretpass1 open
dns-nameservers 127.0.0.1 192.168.1.1

iface WorkNET inet dhcp
wireless-essid WorkNET
wireless-key s:mysecretpass2 open
dns-nameservers 127.0.0.1 192.168.100.1

The script /root/WIFI/wldetect.sh lists the available networks and chooses
one of them being in a whitelist (HomeNET|WorkNET):

#!/bin/sh

# Config
WL_IFACE=`iwconfig 2>/dev/null | { read A _; echo $A; };`

# Reset the interface
ifconfig $WL_IFACE down
ifconfig $WL_IFACE 0.0.0.0
ifconfig $WL_IFACE up

# Search networks
NETWORKS=`iwlist $WL_IFACE scanning | grep ESSID | sed -e
's/.*"\(.*\)"/\1/'`

# Bring down the interface
ifconfig $WL_IFACE down

# Select preferred networks
for NET in $NETWORKS
do
case $NET in
HomeNEt|WorkNET)
echo $NET;
exit 0;
;;
esac
done
exit 1;



iñ



*On Jue Dic 28 8:20 , 'Michael Stepanov' sent:

*



On 12/28/06, Gary <[EMAIL PROTECTED]> wrote:

Michael Stepanov wrote:

*>* Maybe somebody knows how to connect to wlan from background or command
*>* line? I'd like to avoid user interaction to up wlan. I use OS 2005.


Why not set it to auto connect if you don't want user input...?


I need to connect to WLAN right after boot of Nokia. But there is no
possibility to configure it. User has to press connect icon to bring up
network.

-Gary
___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users




--
Cheers,
Michael



___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users






--
Cheers,
Michael
___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2007-01-08 Thread Kalle Valo
"Marius Gedminas" <[EMAIL PROTECTED]> writes:

>> Does anyone know of various causes of the "Connected to  via local IP 
>> link" message in attempting to connect to the internet via WIFI on Nokia 
>> 770 with the latest ITOS 2006 although this also happened with ITOS 2005 in 
>> all subversions?
>
> It happens when the DHCP request times out.

You are correct. After link-local is enabled, the DHCP client will try
to discover a DHCP server in one minute interval.

-- 
Kalle Valo

___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2007-01-08 Thread Kalle Valo
"Paule Ecimovic" <[EMAIL PROTECTED]> writes:

>Is there a way to figure out why the 770 is timing out on the DHCP
> request, when, for example, my Window XP laptop with WIFI isnt.
> Moreover, is there a known remedy to this 770 timing-out behaviour
> apart from terminating the connection and re-connecting? Is there a
> power-up latency for the wifi subsystem of about 20 minutes after
> which it (mysteriously) starts connecting on time? Whats up with this
> recurring and nagging problem?

Very difficult to say. Taking airlogs (ie. sniffing WLAN packets) and
sending them here might help. Most likely it's a some kind IOP problem
between 770 and AP.

What AP are you using and what are the settings?

-- 
Kalle Valo

___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2007-01-08 Thread Paule Ecimovic

Hi, Marius and  all

   Is there a way to figure out why the 770 is timing out on the DHCP 
request, when, for example, my Window XP laptop with WIFI isnt. Moreover, is 
there a known remedy to this 770 timing-out behaviour apart from terminating 
the connection and re-connecting? Is there a power-up latency for the wifi 
subsystem of about 20 minutes after which it (mysteriously) starts 
connecting on time? Whats up with this recurring and nagging problem?


Cheers,

   Paule


- Original Message - 
From: "Marius Gedminas" <[EMAIL PROTECTED]>

To: 
Sent: Monday, January 08, 2007 5:08 Pc
Subject: Re: [maemo-users] Connect to WLAN from command line



___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users





No virus found in this outgoing message
Checked by PC Tools AntiVirus (3.1.0.10 - 9.057.001).
http://www.pctools.com/anti-virus/
___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2007-01-08 Thread Marius Gedminas
On Mon, Jan 08, 2007 at 02:43:48PM +0100, Paule Ecimovic wrote:
> Does anyone know of various causes of the "Connected to  via local IP 
> link" message in attempting to connect to the internet via WIFI on Nokia 
> 770 with the latest ITOS 2006 although this also happened with ITOS 2005 in 
> all subversions?

It happens when the DHCP request times out.

Marius Gedminas
-- 
I'm a shareware signature!  Send $2 if you use me, $10 for a manual.


signature.asc
Description: Digital signature
___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2007-01-08 Thread Paule Ecimovic
Does anyone know of various causes of the "Connected to  via local IP 
link" message in attempting to connect to the internet via WIFI on Nokia 770 
with the latest ITOS 2006 although this also happened with ITOS 2005 in all 
subversions?


- Original Message - 
From: "Kalle Valo" <[EMAIL PROTECTED]>

To: "ext Michael Stepanov" <[EMAIL PROTECTED]>
Cc: 
Sent: Monday, January 08, 2007 8:42 AM
Subject: Re: [maemo-users] Connect to WLAN from command line



"ext Michael Stepanov" <[EMAIL PROTECTED]> writes:


ifconfig wlan0 up
iwconfig wlan0 enc MY_KEY mode managed essid MY_ESSID channel 6

But I didn't see that IP address was assigned to wlan0 interface.


You didn't run the DHCP client:

udhcpc -i wlan0

--
Kalle Valo

___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


No virus found in this incoming message
Checked by PC Tools AntiVirus (3.1.0.10 - 9.057.001).
http://www.pctools.com/anti-virus/ 




No virus found in this outgoing message
Checked by PC Tools AntiVirus (3.1.0.10 - 9.057.001).
http://www.pctools.com/anti-virus/
___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2007-01-07 Thread Kalle Valo
"ext Michael Stepanov" <[EMAIL PROTECTED]> writes:

> ifconfig wlan0 up
> iwconfig wlan0 enc MY_KEY mode managed essid MY_ESSID channel 6
>
> But I didn't see that IP address was assigned to wlan0 interface.

You didn't run the DHCP client:

udhcpc -i wlan0

-- 
Kalle Valo

___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2007-01-07 Thread Kalle Valo
"ext Ted Zlatanov" <[EMAIL PROTECTED]> writes:

> The web browser, for example, triggers a WLAN connect automatically to
> whatever the 770 decides is appropriate (usually the first saved WLAN
> connection, I think).  Can this be scripted?  It seems like a
> reasonable solution.

You are interested in osso_iap_connect() call with OSSO_IAP_ANY IAP.
This document gives more information:

http://maemo.org/platform/docs/howtos/howto_connectivity_guide.html

-- 
Kalle Valo

___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2007-01-02 Thread Michael Stepanov

On 12/28/06, Kahlil Johnson <[EMAIL PROTECTED]> wrote:


Download the iwconfig packages, once you got them you will have the
iwconfig iwspy iwlist etc. Look for a howto to use it. Remember first to
ifup wlan0.

iwlist will give you the broadcast AP, but if you want to put one manually
you should use

iwconfig wlan0 ssid "XYZ" key 1011010101AB



Well, I installed wireless tools package and tried to use it:

ifconfig wlan0 up
iwconfig wlan0 enc MY_KEY mode managed essid MY_ESSID channel 6

But I didn't see that IP address was assigned to wlan0 interface. Moreover,
I add into /etc/network/interfaces following:
auto wlan0
iface wlan0 inet dhcp
wireless-essid MY_ESSID
wireless-key MY_KEY
wireless-mode managed
wireless-channel 6

and run
ifconfig wlan0 up

But also without luck.

Any ideas why?

This will set it up.

--
Kahlil Johnson
"Ya tengo GMAIL!!"





--
Cheers,
Michael
___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2006-12-28 Thread Ted Zlatanov
On 28 Dec 2006, [EMAIL PROTECTED] wrote:

> Wlan is up in the boot through the service wlancond (at /init.d) associated to
>   runlevel 3. The graphical user interaction doesn't allow to set up but
>   configure the values of wlan. So you have to define these
> in order to wlan starts at runlevel 3 with that configuration.
>
> To do that you have to edit file /etc/network/interfaces with the values of
>   the wlan (iface, name, address, essid, etc.). Look at
>   here:http://www.debian.org/doc/manuals/reference/ch-gateway.en.html
>
> A bit more complicate situation is if wlan is not always the same. In such a
>   situation you must write a script that allows to distinguish between
>   the different wlans (for instance, via comparison of known
> mac address and sniffed mac addres).


The web browser, for example, triggers a WLAN connect automatically to
whatever the 770 decides is appropriate (usually the first saved WLAN
connection, I think).  Can this be scripted?  It seems like a
reasonable solution.

Ted
___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2006-12-28 Thread inigo
Wlan is up in the boot through the service wlancond (at /init.d)
associated to runlevel 3. The graphical user interaction doesn't allow
to set up but configure the values of wlan. So you have to define these
in order to wlan starts at runlevel 3 with that configuration.To
do that you have to edit file /etc/network/interfaces with the values
of the wlan (iface, name, address, essid, etc.). Look at here:http://www.debian.org/doc/manuals/reference/ch-gateway.en.html A bit more complicate
situation is if wlan is not always the same. In such a situation you
must write a script that allows to distinguish between the different
wlans (for instance, via comparison of known mac address and sniffed
mac addres).iñ On Jue Dic 28  8:20 , 'Michael Stepanov'  sent:On 12/28/06, Gary <[EMAIL PROTECTED]> wrote:
Michael Stepanov wrote:> Maybe somebody knows how to connect to wlan from background or command> line? I'd like to avoid user interaction to up wlan. I use OS 2005.Why not set it to auto connect if you don't want user input...?
I need to connect to WLAN right after boot of Nokia. But there is no possibility to configure it. User has to press connect icon to bring up network.
-Gary___maemo-users mailing listmaemo-users@maemo.orghttps://maemo.org/mailman/listinfo/maemo-users
-- Cheers,Michael

___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2006-12-27 Thread Michael Stepanov

On 12/28/06, Gary <[EMAIL PROTECTED]> wrote:


Michael Stepanov wrote:

> Maybe somebody knows how to connect to wlan from background or command
> line? I'd like to avoid user interaction to up wlan. I use OS 2005.


Why not set it to auto connect if you don't want user input...?



I need to connect to WLAN right after boot of Nokia. But there is no
possibility to configure it. User has to press connect icon to bring up
network.

-Gary

___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users





--
Cheers,
Michael
___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


Re: [maemo-users] Connect to WLAN from command line

2006-12-27 Thread Gary

Michael Stepanov wrote:

Maybe somebody knows how to connect to wlan from background or command 
line? I'd like to avoid user interaction to up wlan. I use OS 2005.



Why not set it to auto connect if you don't want user input...?

-Gary
___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users


[maemo-users] Connect to WLAN from command line

2006-12-27 Thread Michael Stepanov

Hi list,

Maybe somebody knows how to connect to wlan from background or command line?
I'd like to avoid user interaction to up wlan. I use OS 2005.

Thanks in advance.

--
Cheers,
Michael
___
maemo-users mailing list
maemo-users@maemo.org
https://maemo.org/mailman/listinfo/maemo-users