GPRS / Wifi

Mike Baroukh mike at baroukh.com
Sun Aug 10 12:43:49 CEST 2008


>
> Putting scripts into /etc/network/if-up.d would probably work.

Not so easy :
- you may have 2 places where the same interface has different
parameters (wifi at home and wifi at work ...). So you can't just add
"[pre|post]-up" parameters in /etc/network/interface.
- Not so easy to configure tangogps, maemo, wget, mail client, ...

Thats why I think that place parameters should be part of the framework
and not just scripting.
Application then could be compiled for the framework and using shared
informations on how to connect.

Finally, connection parameters should not be part of the system.
They are part of my profiles => they don't ahve to be in
/etc/network/interface.
Personnaly, to connect wifi, I prefer to use a script like

INTERFACE=eth0
ifconfig $INTERFACE up
iwconfig $INTERFACE essid <myessid>
iwconfig $INTERFACE mode managed
iwconfig $INTERFACE channel 7
iwconfig $INTERFACE key open <my wep key>
udhcpc -i eth0



Roland Mas a écrit :
> Mike Baroukh, 2008-08-10 00:52:11 +0200 :
>
>   
>> But I'm asking this : When using wifi or usb, I don't need a proxy.
>> When using GPRS, I need a proxy.
>> I will not re-configure anything each time.
>>
>> Does somebody know if there is a solution ?
>>     
>
>   Putting scripts into /etc/network/if-up.d would probably work.
>
>   
>> for each connection, there would be parameters :
>> - ip (static or dhcp)
>>     
>
>   This should be configured in /etc/network/interfaces
>
>   
>> - nameserver
>> - gateway
>>     
>
>   This info can come from the DHCP server, the PPP remote end, or
> static in /etc/network/interfaces again.
>
>   
>> - proxy (http / https / ftp  ...)
>> - proxy type (transparent or not)
>> - user/password for proxy
>> - may be max upload/download bandwith
>> - may be firewall rules
>>     
>
>   Scripts are your friends there :-)
>
>   
>> Last : may be it could connect to internet transparently if needed by an
>> application.
>>     
>
>   At least on Debian, there's a "diald" package that does exactly
> this.  I guess it could be ported to Openmoko.
>
> Roland.
>   





More information about the community mailing list