So, I wanted to get internal (A)GPS working. Too bad, it didn't have much documentation, at least directly Linux-related. Instead, instructions how to get it working in Windows can be found from
http://discussions.europe.nokia.com/t5/Mini-Laptops/Can-I-use-GPS-without-have-3G-data-plan/m-p/594454. Problem was what are COM4/5 equivalents in Linux. After trying, I found that /dev/ttyHS4 is GPS control channel, and /dev/ttyHS1 actual GPS data channel.
It really has been **years** when I last used minicom other terminal programs. Thanks to my colleague, Pablo, who pointed me to use good old kermit, ckermit to be more precise, and try that. I got, yea! This is how I did it:
C-Kermit>set line /dev/ttyHS4
C-Kermit>set carrier-watch off
(C-Kermit>set speed 115200
/dev/ttyHS4, 115200 bps
C-Kermit>c
Connecting to /dev/ttyHS4, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
T S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
OK
ATZ
OK
AT_OGPS=2
OK
After AT_OGPS=2, second kermit-instance, connected to /dev/ttyHS1, started to output raw NMEA data. Very good. Now it's time for some kermit scripts:
~/bin/gps_on.sh:
#!/usr/bin/kermit
def port /dev/ttyHS4
def speed 115200
def carrier-watch off
set port \m(port)
if fail exit 1 Can't open \m(port)
set speed \m(speed)
set carrier-watch \m(carrier-watch)
output AT_OGPSP=7,2\13
input 3 OK
output AT_OGPSCONT=1,"IP","prointernet"\13
input 3 OK
output AT_OGPSLS=1, "http://supl.nokia.com"
input 3 OK
output AT_OGPS=2
input 3 OK
exit
For turning GPS off:
~/bin/gps_off.sh:
#!/usr/bin/kermit
def port /dev/ttyHS4
def speed 115200
def carrier-watch off
set port \m(port)
if fail exit 1 Can't open \m(port)
set speed \m(speed)
set carrier-watch \m(carrier-watch)
output AT_OGPS=0\13
INPUT 3 OK
exit
Still maybe some checking would be needed, to see if it really uses assisted GPS instead of "plain" GPS. It really doesn't matter so much, though assisted is much faster in locating you initially.
Next I'll have write scripts for monitoring GPS status, and then find some suitable navigation sw.
EDIT: I originally said ttyHS0 was data channel, while it really is ttyHS1, sorry about that.