[updated on 2013.11.27]
This page discusses about how-to usage and integration of Broadcom Linux Debian SDK using EVK (ex. BCM4752 Sardine) on Debian-based (Ubuntu) Linux machine. When you finish reading, you will be able to
NOTE: LinuxDebian SDK is based on the latest GNSS software and it has almost all the features of well-known Android GNSS phone system. Please refer to Appendix C. TODOs for exceptions. NOTE: If you are not interested about Assisted GPS, you may ignore any comment about SUPL and LBS (Broadcom proprietary AGPS protocol) in this documentation. NOTE: We have not yet tested other Linux distros (ex. Fedora) besides Debian. However, we are quite sure that it might work well. Even if other Linux distro fails the code change required would be minimal.
Step 1: Prepare following
Step 2: Hardware Setup
Step 3: Dependent Software Setup
Step 4: SDK Software Setup
export DELIVERY_INSTALL_DIR=/opt/gnss
$ make install
$ make uninstall
Step 5: Text-based GNSS client, GpsClient
$ cmake .
$ make
$ GpsClient
$ ./GpsClient [main]:Simple Text-based Client of BRCM GNSS System. [main]:GpsInterface::init returned (0). Delete Aiding? [y/N] y Set GNSS recurrence [0] Periodic [1] Singleshot Choose the GNSS mode to run [1] 1 Set AGPS mode [0] Standalone [1] SUPL 1.0 MS-Based [2] SUPL 1.0 MS-Assisted Choose the GNSS mode to run [1] 1 Set timeout in seconds [180] Set preferred accuracy in meters [50] Change the default SUPL server address? [bcmslpqa1.glpals.com] Change the default set id of User Equipment (UE)? [0000000000000] [y/N] Change the default cell id for reference location? [GSM:MCC(450):MNC(5):LAC(8609):CID(3105)] [y/N] Apply Wifi MAC address for reference location? [y/N] [main]GpsInterface::set_position_mode returned (0). [main]:GpsInterface::start returned (0). Response to following query will send stop command to the GNSS service. In order to monitor current GNSS activity, try "tail -f /var/log/syslog" Start another session? [y/N]
tail -f /var/log/syslog
The GpsClient will put all the result to Linux syslog. For example, if you run AGPS MS-BASED GNSS session, the result of latitude and longitude will be stored in syslog like this.
Nov 6 18:06:37 geoid GpsClient[10922]: [BRCM GNSS]:[local_nmea_cb]: UTC[1352192797762]: NMEA[$IMGSA,A,3,,,,,,,,,,,,,3.3,1.5,2.9*2E]
Nov 6 18:06:37 geoid GpsClient[10922]: [BRCM GNSS]:[local_nmea_cb]: UTC[1352192797762]: NMEA[$PGLOR,1,FIX,21.7,19.1*2D]
Nov 6 18:06:37 geoid GpsClient[10922]: [BRCM GNSS]:[local_nmea_cb]: UTC[1352192797762]: NMEA[$GPRMC,090659.92,A,3730.340611,N,12703.294218,E,000.1,169.5,061112,,,A*5C]
Nov 6 18:06:37 geoid GpsClient[10922]: [BRCM GNSS]:[local_location_cb]: lat(37.505677), lon(127.054904), alt(156.291690), speed(0.043601), bearing(169.528152), accuracy(16.000000)
Nov 6 18:06:37 geoid GpsClient[10922]: [BRCM GNSS]:[local_sv_status_cb]: NumSVs[8]
Nov 6 18:06:37 geoid GpsClient[10922]: [BRCM GNSS]:#011[ ]:PRN[2]:SNR[20.000000]:Elev[68.000000]:AZ[125.000000]
...
Nov 6 18:06:37 geoid GpsClient[10922]: [BRCM GNSS]:#011[ ]:PRN[84]:SNR[20.000000]:Elev[27.000000]:AZ[182.000000]
NOTE: The most important is "$PLGOR,1,FIX", the value next to it is TTFF (Time to First Fix). You can find latitude and longitude next to "local_location_cb".
Extra to this log, we have Broadcom GNSS log, called SLOG, as directed in the XML file.
acLogDirectory="/opt/gnss/log/"
Our GNSS system runs as a service daemon and it has XML configuration. The default XML config file is given in gpsconfig.xml file in the top directory. For more information please refer to GL XML Config file description.
NOTE: XML configuration for customer should be also managed by SW FAE/AEs. Please notify your project detail to your FAE/AEs so that they can create different SDK suited for your project. NOTE: Above SUPL/LBS servers are development servers which need separate registration for each devices. In order to use Broadcom SUPL or LBS server in your mass production for AGPS feature, we need B2B contract. Please discuss about this with local Broadcom FAE/Sales team.
The API to control Broadcom Linux GNSS system is based on Android's GNSS API, GpsInterface. The header file that enclose all the API is located in include/gps.h. (NOTE: Android is under Apache Software Licence 2.0)
The single major difference between Android's GpsInterface and Linux's GpsInterface is this code part.
#ifdef ANDROID struct gps_device_t { struct hw_device_t common; const GpsInterface* (*get_gps_interface)(struct gps_device_t* dev); }; #else // Non-Android user will directly call get_gps_interface_direct(). const GpsInterface* get_gps_interface_direct(); #endif
You can acquire GpsInterface pointer directly with get_gps_interface_direct(). This code usage is open-code available in gpsclient/main.cpp file.
The rest of init/cleanup/start/stop usage is same with Android.
Most of the times, the customer will only review broadcom/LinuxDebian as a reference SDK. The real SDK suited for the target system will require some proprietary tool chain to be used so that different cores are used. In this case, the customer should provide the zipped tool chain file to BRCM GPS FAE/AE so that they can build the GNSS engine library and prepare a different SDK. The key of this process lies in the Makefile.config file. The responsible AE should make a separate cloned project with following modification in the Makefile.config file.
export LIBEXT = a export MAKE = $(TOOL_CHAIN_PATH)/make export CC = $(TOOL_CHAIN_PATH)/gcc export CXX = $(TOOL_CHAIN_PATH)/g++ export AR = $(TOOL_CHAIN_PATH)/ar crsP export LD = $(TOOL_CHAIN_PATH)/g++ export LINK = $(TOOL_CHAIN_PATH)/$(LD) export STRIP = $(TOOL_CHAIN_PATH)/strip
You can change the TOOL_CHAIN_PATH, include path, library path and so on from Makefile.config file.
There is a troubleshooting and similar Linux system guide in How to run SDK on (Windows or Linux) PC.
There were some TODOs that we failed to achieve until the time of the last document update.