Reply
Thread Tools
Posts: 1,500 | Thanked: 1,654 times | Joined on Feb 2011
#1
This is based on experience with Aero2 network in Poland which offers free 3G connectivity, but no voice/sms service. N900 doesn't seem to connect to it no matter what (yet Aero2 is listed as one of possible carrier networks in settings/phone).
In order to get connected (once you set up APN settings) in terminal:
sudo pnatd
AT+CGATT=1

The connection bars should show now in the status applet window. Connect to previously set up data connection (with Aero2 it will disconnect in 1h, just reenter AT+CGATT=1 in pnatd and reconnect), in around a minute you will have to reenter AT+CGATT=1 in the terminal if you didn't connect.

TOM from PL wrote a script for autoconnecting, haven't tested it yet, but here it is:
Code:
#!/bin/bash
set -x

function get_status {
NETWORK_STATUS=`dbus-send --system --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status | head -n 2 |tail -n 1|awk '{printf $2}'`
#0 -home -> go get connected
#3 no-serv
#4 no serv search
#9 no coverage
# look in telephony-maemo.c enum net_registration_status
# echo $NETWORK_STATUS
}

NETWORK=`dbus-send --system --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_registration_status | head -n 6| tail -n 2 |awk '{printf $2}'`

if [ "$NETWORK" != "17260" ]; then
#echo NOT IN AERO2
exit
fi

echo -e "AT\r" >/tmp/to_pnatd
tail -f /tmp/to_pnatd | pnatd &
sleep 1
echo -e "\rAT+CGATT=0\r" >> /tmp/to_pnatd
sleep 5
echo -e "\rAT+CGATT=1\r" >> /tmp/to_pnatd

((TIMEOUT_COUNTER=45));
get_status
until [ "$NETWORK_STATUS" == "0" ] || [ "$TIMEOUT_COUNTER" == "0" ]; do
get_status
((TIMEOUT_COUNTER--))
sleep 1
done

killall pnatd

if [ "$NETWORK_STATUS" != "0" ]; then

MESSAGE="Timeout on waiting to attach"
dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:$MESSAGE

else
sleep 2
#connect to IAP Darmowy Aero2
dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:"Darmowy Aero2" uint32:0
fi
 
Reply

Thread Tools

 
Forum Jump


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