View: 5621|Reply: 0

[OrangePi4G-iot] How to enable the GPS device?

[Copy link]

2

threads

2

posts

30

credits

Novice

Rank: 1

credits
30
Published in 2019-9-3 15:04:12 | Show all floors |Read mode
I am new to OrangePi and to Linux, and I am trying to get data out of the OrangePi4G-iot onboard gps chip.

So far I have found that I have an stpgps device that I can interface to:
root@orangepi:/# find -name "*stpgps*"
./dev/stpgps
./sys/devices/virtual/stpgps
./sys/devices/virtual/stpgps/stpgps
./sys/class/stpgps
./sys/class/stpgps/stpgps

When I open this device and ioctl to it when I check the output of dmesg, I can see the driver performing all kinds of steps to turn on gps and so on, however when I try to read from the stpgps character device file I get nothing from it.

Do I need to manually connect this device/driver to the hardware? If so, how do I do this?

I did find a configuration file:
root@orangepi:/system/etc/firmware# ls -l | grep WMT
-rw-r--r-- 1 root root      80 Nov 15  2018 WMT_SOC.cfg

coex_wmt_ant_mode=1

wmt_gps_lna_pin=0
wmt_gps_lna_enable=0

co_clock_flag=1

Where lna_enable appearantly controls the GPS antenna signal. How do I find out which is the appropriate pin # to set for lna?
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list