GPS Software

Anybody know how to simply get access to the data stream from the GPS front end? That would be the first step in getting an SDR up and running.

This is disappointing. Running light Linux/Python instead of heavy Android/Java using inbuilt GPS on the DragonBoard 410c for making IoT devices is the ideal. Looks like I’ll have to buy a separate GPS module instead.

hi,

it is taking more time than planned… but it’s coming… we should have some GPS enablement on Linux (without any Android pieces) within a few weeks.

that would be awesome, ill be able to finally use my dragonboard

Thanks very much. Can you please give us an update on progress. Seems like there are many of us willing to test it as soon as it is released. Thanks again!

Any updates on the GPS on linux? Or how long again it might be?

Hello, Is there some information to start working in a driver to get GPS information under Linux, by serial port
or something like that ?

hi,

as i said on the forum in the past, we’ve been looking at GPS for Linux, and it’s now working. While it is not integrated into our builds as ‘plug and play’, we have some raw instructions to get it to work. We are going to clean up the patches and merge everything as appropriate, but if you feel brave enough and are familiar with rebuilding kernel and modifying your system, you can try the following instructions…

Our goal is to have everything merged into our build by the end of June. The final solution will probably be slightly different, but the steps below are known to work… if you have issues, please let us know.

====

  1. Install latest Debian/OE release from Linaro on your Dragonboard 410c device –

Debian: https://builds.96boards.org/snapshots/dragonboard410c/linaro/debian/latest/
OE: https://builds.96boards.org/snapshots/reference-platform/openembedded/dragonboard-410c/latest/

  1. Install GPSD service and clients:

a. Debian:

sudo apt-get update
sudo apt-get install gpsd
sudo apt-get install gpsd-clients

b. OE:

Please add OpenEmbedded Layer Index - gpsd (http://cgit.openembedded.org/cgit.cgi/meta-openembedded/tree/meta-oe/recipes-navigation/gpsd/gpsd_3.14.bb?h=master )

Please ensure that following packets are present: libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils

  1. Download latest kernel and add GPS related patches:

https://github.com/andersson/kernel/commit/e2677fab2a24a7615e4e048dc2ed645d7449cf47
https://github.com/andersson/kernel/commit/838194c9283184f8e7855d2313ec56d0b1cab503
https://us.codeaurora.org/patches/quic/imm/PATCH_1576598_410c_GPS_kernel_proxy.tar.gz

  1. Update kernel config and compile kernel (details can be found here: https://builds.96boards.org/releases/dragonboard410c/linaro/debian/latest/ )

declare -x CROSS_COMPILE=”<PATH TO YOUR ARMv8 COMPILER>/aarch64-linux-gnu-"
declare -x ARCH=“arm64”
echo “CONFIG_QCOM_LNX_GPS_PROXY=y” >> ./arch/arm64/configs/defconfig
echo “CONFIG_QRTR=y” >> ./arch/arm64/configs/defconfig
echo “CONFIG_QRTR_SMD=y” >> ./arch/arm64/configs/defconfig
make O=…/build-${ARCH} defconfig distro.config
make O="…/build-${ARCH}" Image dtbs

  1. Pack image file

…/…/skales/dtbTool -o …/gps_dt.img -s 2048 …/build-arm64/arch/arm64/boot/dts/qcom/
…/…/skales/mkbootimg --kernel …/build-arm64/arch/arm64/boot/Image --ramdisk …/…/initrd.img --output …/gps-db410c.img --dt …/gps_dt.img --pagesize 2048 --base 0x80000000 --cmdline “root=/dev/disk/by-partlabel/rootfs rw rootwait console=ttyMSM0,115200n8 earlycon=msm_serial_dm,0x78b0000”

  1. Reboot your device in fastboot mode than update kernel:

fastboot flash boot gps-db410c.img

  1. Setup user-space tools on device:

a. Copy modem firmware:

Debian – on the device files from /media/linaro/00BC-614E/image/ to /lib/firmware/
OE – mount /dev/mmcblk0p1 to /mnt, than copy files from /mnt/image to /lib/firmware/

b. Download and compile QRTR related user-space code (on Debian and copy it to OE if needed):

mkdir -p /home/linaro/qrtr
cd /home/linaro/qrtr/
git clone bjorn.andersson/qrtr.git - [no description]
git clone bjorn.andersson/rmtfs.git - [no description]
git clone bjorn.andersson/qmic.git - [no description]
wget https://us.codeaurora.org/patches/quic/imm/PATCH_1580713_410c_GPS_userspace_proxy.tar.gz
tar -xf ./PATCH_1580713_410c_GPS_userspace_proxy.tar.gz
mkdir gps
cd ./gps/
patch -p2 < …/PATCH_1580713_410c_GPS_userspace_proxy/01_gps_userspace_proxy.patch
compile code in qmic, qrtr, rmtfs and gps folders

c. create empty data files for modem:

sudo dd if=/dev/zero of=/boot/modem_fs1 bs=1M count=2
sudo dd if=/dev/zero of=/boot/modem_fs2 bs=1M count=2
sudo dd if=/dev/zero of=/boot/modem_fsc bs=1M count=2
sudo dd if=/dev/zero of=/boot/modem_fsg bs=1M count=2

d. Open /home/linaro/qrtr folder and switch to root user (sudo –I or su), then execute the following commands:

systemctl stop gpsd.socket
systemctl stop gpsd
./qrtr/qrtr-ns
LD_LIBRARY_PATH=qrtr ./rmtfs/rmtfs -v &
echo 1 > /sys/devices/platform/soc/4080000.qcom,mss/boot
gpsd -N -D3 -F /var/run/gpsd.sock /dev/ttyGPS0
LD_LIBRARY_PATH=qrtr ./gps/gps_proxy -v &
sleep 2
run any GPS client compatible with GPSD
Debian – xgps can be used
OE – gpsmon can be used

Hi @ndec,
I have debian 8.0 installed. how do i perform step “3)Download latest kernel and add GPS related patches”

hi @nelson, you need to have the latest release (16.04) I am not sure what you mean by debian 8.0, it doesn’t correspond to our build numbers.

the release page has instructions to rebuild your own kernel and use it. you should try that, once you are able to run your own kernel, you need to merge the patches mentioned in the instructions above and rebuild. If you are not familiar with ‘getting the kernel’ and building it, that might take some time, but in theory the instructions on the release page should ‘just work’. otherwise please ask here, someone will help.

hi @ndec im currently using debian 15.04, well when it comes to build your own kernel, thats something ive not yet done. Could you please recommend some reading material that i could get started ? or What should i be looking for exactly ???

@nelson,

refer this http://builds.96boards.org/releases/dragonboard410c/linaro/debian/16.04/
“To build the Linux kernel, you can use the following instructions:”

Hello, somebody had testing this patch to get GPS information in Linux ?

Hi,

Is there any release with GPS working available?

hi,

as i said in a previous post above: “Our goal is to have everything merged into our build by the end of June.”. End of June is when we are planning the next release.

Thank you Ndec.
I will be waiting for this post.

End of June is now…

technically it is tomorrow :wink:

the June release is still planned, and will happen. I was hoping to send out a heads up email later today… but my build is stuck in the builder queue at the moment…

anyways, starting with build #103 on http://builds.96boards.org/snapshots/dragonboard410c/linaro/debian/, GPS was integrated. If you install the latest build, it should be there.

then install :
apt-get install gnss-gpsd gpsd gpsd-clients

gnss-gpsd is our wrapper package that ties the QCOM navigation stack into GPSD

most of the GPS stack runs on the DSP, so you need to boot the DSP to get the GPS started:

systemctl start qdsp-start

from that point you should be able to use any GPSD client app (xgps, gpsmon, …)

Notes:

  • the sensibility of the internal antenna is a bit poor. If you have tested GPS on Android, that’s the same issue. Using an external antenna improves drastically the situation
  • there is an issue with the DSP firmware blob, and audio output is ‘broken’ after you load/start the DSP. it’s unfortunate but we don’t have control on the firmware, so it will take some time to get a fix for that. This is why we don’t start the DSP at boot automatically.
  • When no GPSD client are active, the GPS on the DSP is ‘stopped’
  • there is no proprietary s/w involved on the APPs (linux)

Does/can gpsd output the raw observables (pseudorange, phase, doppler, c/n0, etc) or is it limited to just position and velocity?

Hello, I installed dragonboard410c_sdcard_install_debian-112.zip image…

But I cant find “systemctl start qdsp-start” service ?? In linaro directory, is there in other place ?

I got: “Unit qdsp-start.service failed to start: No such file or directory” running from /home/linaro

Regards,

Wilson