maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Can I setup a Wi-Fi access point via shell? (https://talk.maemo.org/showthread.php?t=88281)

Ricardo 2012-12-16 18:11

Can I setup a Wi-Fi access point via shell?
 
Hi all!

I usually can connect to any Wi-Fi access point without any problems. Unfortunately, I think I've hit Bug 9622 (perhaps the same as Bug 9598), where N900 asks me a WEP key when the access point uses WPA-PSK or WPA2-PSK.

Is it possible to setup (or at least edit) an access point from the shell? I hope that I can workaround the bug this way somehow...

Thank you for any tips!

syake 2012-12-17 01:48

Re: Can I setup a Wi-Fi access point via shell?
 
Options->Settings->Connection->New
->input some name->Next->No->input ESSID
->select Security method "WPA preshared key"
->input key->Finish->return to Desktop
->tap status menu->Internet Connection
->Connect saved AP

otherwise
See: http://www.enterprisenetworkingplane...figure-WPA.htm

you can use "udhcpc" and "iwconfig" and "wpa-supplicant" from command-line.but i dont recommend because i think they would not apply changes of "wireless connection" in status menu apperantly.

Ricardo 2012-12-17 01:57

Re: Can I setup a Wi-Fi access point via shell?
 
Thanks for the reply. I think I should have said that I had already tried to manually setup the AP like this.

If I set the AP manually, name "Connection 1" and make it use WEP, the "Connection 1" (instead of the original SSID) is shown as available for connection (but doesn't work, obviously). But if I set it to use WPA intead of WEP, "Connection 1" is not shown in the available Wi-Fi connections - the original SSID is displayed, and it doesn't use my custom configuration.

I'll try your other tips and report back later, thanks again!

syake 2012-12-17 02:40

Re: Can I setup a Wi-Fi access point via shell?
 
sorry.
I found there is no wpa_supplicant in Maemo repository.
It described in Here.

Quote:

iwlist wlan0 scan
/etc/init.d/icd2 stop
icd2 -l 0
no idea Xq

Ricardo 2012-12-17 02:43

Re: Can I setup a Wi-Fi access point via shell?
 
Some changes I made with iwconfig seemed to be reflected on the status menu. I don't have wpa-supplicant on the N900 right now (is this one OK, or is there a more recent/better version?), but I might give it a try tomorrow.

evujumenuk 2012-12-17 08:56

Re: Can I setup a Wi-Fi access point via shell?
 
Isn't there a way for access points to both offer WEP and WPA? Maybe it's latching onto the WPA scheme (as it should, honestly).

Ricardo 2012-12-17 23:23

Re: Can I setup a Wi-Fi access point via shell?
 
It works! Kind of...

I wrote a script to start a connection (I run it as root):
Code:

#!/bin/sh
stop icd2
stop wlancond
pkill wpa_supplicant
ifconfig wlan0 down
ifconfig wlan0 up
iwconfig wlan0 essid mySSID
wpa_supplicant -B -iwlan0 -cmySSID.conf
udhcpc -iwlan0

Now I can ping, browse the web, etc., but I can't use Skype (the accounts applet says "Network disconnected")... I'm not sure if I can use icd2 and/or wlancond (not how to use them) in order to create a "real" access point... Any ideas?

Tiran 2012-12-21 11:12

Re: Can I setup a Wi-Fi access point via shell?
 
Quote:

Originally Posted by syake (Post 1305257)
sorry.
I found there is no wpa_supplicant in Maemo repository.

Wpasupplicant

syake 2012-12-21 11:17

Re: Can I setup a Wi-Fi access point via shell?
 
Quote:

Wpasupplicant
Thanks Tiran:D

Ricardo,have you tried dbus-send command for AP you created manually ?
Quote:

dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd
com.nokia.icd.connect string:$APNAME uint32:0
dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui
com.nokia.icd_ui.disconnect boolean:false

Ricardo 2012-12-21 13:26

Re: Can I setup a Wi-Fi access point via shell?
 
Thank, syake - but it didn't seem to do anything at all...


All times are GMT. The time now is 18:01.

vBulletin® Version 3.8.8