Skip to content

Works on Nokia 6120c #73

Description

@simone-85

Unlike the Nokia E/N Series, this phone model does not have GPS. Instead, Symbian expects to rely on a bluetooth GPS receiver, which are at a low level, just Bluetooth Serial devices that transmit NMEA messages.
So what I think happens to non-GPS Nokia models when the app makes GPS calls is:

  1. If not enabled, Symbian asks for permission to enable bluetooth
  2. Search devices box appears, and user is prompted to select one device
  3. If it's not a Bluetooth Serial Device (if the device does not have the Serial Profile), it goes back to the Search Devices box
  4. If it's a Serial Device it connects, and then waits for NMEA messages
  5. When received, those messages are parsed to the GPS calls and returned as valid GPS data.

As a proof of concept I've made my linux machine as a Bluetooth Serial device, and made a small python script that sends the same NMEA data every 1s.
(example data is from this repo and this site)

#!/usr/bin/env python3
import sys

BT_DEV = "/dev/rfcomm0"
sentences = [
"$GPGGA,202735.400,4153.523,N,01229.240,E,1,12,1.0,0.0,M,0.0,M,,*62",
"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30",
"$GPRMC,202735.400,A,4153.523,N,01229.240,E,,,220526,000.0,W*77"
]

try:
	bt = open(BT_DEV, "w")
except OSError as e:
	print(f"Failed to open {BT_DEV}: {e}")
	sys.exit(1)

try:
	while True:
		for sentence in sentences:
			print(f"Sending: {sentence}")
			bt.write(sentence + "\r\n")
			bt.flush()
		time.sleep(1)
except KeyboardInterrupt:
	print("\nStopped.")
finally:
	bt.close()

now this is gps.py and the linux machine is setup as follows:

  1. we stop the existing service: sudo systemctl stop bluetooth
  2. we restart it with the --compat flag for compatibility stuff (since we're using sdptool which is kinda deprecated) sudo bluetoothd --compat &
  3. we add the Serial Port with sdptool sudo sdptool add --channel=1 SP
  4. we can optionally check if the Serial Port is registered: sudo sdptool browse local | grep "Serial"
  5. we watch for incoming connections on hci0: sudo rfcomm watch hci0 1

Then on Symbian side we proceed as we said before, and when the phone connects via bluetooth we'll run:
python3 gps.py
and it should just work! :-)

So I think s60-maps could potentially work with any Symbian S60v3 device, or any Symbian device which has this bluetooth-gps mechanism.

Also, initial tests were made with the s60-gps-tracker app.

(P.S. what app do i need for screenshotting/screen recording?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions