VAR-SOM-MX6 GPS: Difference between revisions

From Variscite Wiki
(Created page with "=GPS= ==Overview== Our devkits don't contain any on board GPS.<br> You need external GPS receiver to support the GPS on Android Devices.<br> UART: - https://www.amazon.ca/Modu...")
 
 
Line 25: Line 25:
/dev/ttymxc2              0660  system    gps line after /dev/ttymxc1
/dev/ttymxc2              0660  system    gps line after /dev/ttymxc1
</pre>
</pre>
* Edit <pre>device/variscite/var_mx6/BoardConfig.mk </pre><bre>
* Edit <pre>device/variscite/var_mx6/BoardConfig.mk </pre><br>
add following lines at the end
add following lines at the end
<pre>
<pre>

Latest revision as of 02:16, 12 December 2018

GPS

Overview

Our devkits don't contain any on board GPS.
You need external GPS receiver to support the GPS on Android Devices.
UART: - https://www.amazon.ca/Module-High-Gain-Antenna-interface-Glonass/dp/B07KGP79LH/ref=sr_1_3?ie=UTF8&qid=1544576784&sr=8-3&keywords=UART+GPS
USB: https://www.amazon.ca/VANWEI-VK-162-Notebook-Navigation-Support/dp/B01N3OYK5L/ref=sr_1_8?s=electronics&ie=UTF8&qid=1544576964&sr=1-8&keywords=USB+GPS

Below steps are for UART based GPS assuming you have UART3 is connected to GPS receiver.
But the same is applicable to USB based GPS mentioned above, instead of ttymxc2, it will create /dev/ttyUSB0.

Integrating External GPS

https://github.com/kconger/android-serial-gps-driver code to be used. Follow below steps
Depending upon your android release version change the android_build to your
android build root direcotry where you can fine top level Makefile.

$ cd  <android_build>/hardware/imx/ 
$ git clone https://github.com/kconger/android-serial-gps-driver/ gps
  • Edit
    <android_build>/device/variscite/var_mx6/BoardConfig.mk

Add

BOARD_HAS_GPS_HARDWARE:=true
  • Edit device/variscite/imx6/etc/ueventd.freescale.rc and

add permission for /dev/ttymxc2 by adding

/dev/ttymxc2              0660   system     gps line after /dev/ttymxc1
  • Edit
    device/variscite/var_mx6/BoardConfig.mk 

add following lines at the end

PRODUCT_COPY_FILES +=     frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml 
ADDITIONAL_BUILD_PROPERTIES += ro.kernel.android.gps=ttymxc2
ADDITIONAL_BUILD_PROPERTIES += ro.kernel.android.gpsttybaud=115200
  • Compile the system image with this changes
  • Last but not the least test apk, Download https://www.apkmirror.com/apk/chartcross-limited/
  • Install apk adb install Gps...xxx..yyy..zzz.apk
  • Start GPS and see if it gets GPS lock. If this works any GPS application should work with Location provider.