Xadow i2c gps - anyone have it working?

Solved
cswiger's picture
cswiger
Junior(1)

Been making progress, have my project talking on UART4, WNC, Pubnub - started into adding the Xadow gps module and it is recognized but it not locking in - have left it outside in my car (it's a car dashboard project!) under the windshield, just a little bit of a tree but other than that open sky. This is all I get with the default out of box application Avnet_ATT_Cellular_IOT:

App Firmware: Release 1.0 - built: Dec 15 2016 00:10:56
Hello World from the Cellular IoT Kit!                                                    
HTS221 Detected (0xBC)

                                                   
  Temp  is: 67.28 F 

                                                          
  Humid is: 32 %

                                                              
Si7020 sensor not found
Si1145 sensor not found
FXOS8700CQ WhoAmI = C7
Xadow GPS Scan ID response = 0x0004 (length), 0x00000005
Waiting for GPS to become ready... V0V0V0V0V0V0V0V0V0V0V0V0V0V0V0V0V0V0V0V0V0V0V
0V0V0V0V0V0V0                                                                   
                        

Will let it run a few more hours but don't know what else to check for debugging. 

 

 

cswiger's picture
cswiger
Junior(1)

From studying the example code, that's 'V' for invalid and '0' for number of satellites - so obviously it's talking to the device. 

cswiger's picture
cswiger
Junior(1)

Looks like my issue was mounting the board directly on top of a metal plate (top of project box) with just a thin insulator between the antenna and a ground plane - guessing. Pulled it up and now is seeing 11 satellite!

Xadow GPS Scan ID response = 0x0004 (length), 0x00000005
gps_check_online is 1
gps_get_utc_date_time : 16-12-16,14:55:0
gps_get_status        : A ('A' = Valid, 'V' = Invalid)
gps_get_latitude      : N:37.826761
gps_get_longitude     : W:122.423010
gps_get_altitude      : 19.399994 meters
gps_get_speed         : 0.250000 knots
gps_get_course        : 215.800003 degrees
gps_get_position_fix  : 2
gps_get_sate_in_view  : 11 satellites
gps_get_sate_used     : 4
gps_get_mode          : A ('A' = Automatic, 'M' = Manual)
gps_get_mode2         : 3 ('1' = no fix, '1' = 2D fix, '3' = 3D fix)

 

( location altered for privacy :)

cswiger's picture
cswiger
Junior(1)

Looks like the Xadow gps works better (from limited testing) vertical with the tiny chip antenna towards the sky - altho per app note 412-003-090702-acd-5036-a3-cc-s-application-note-rev-a1.pdf it's omnidirectional. Even then it just took 17 minutes to acquire satellites. This chip antenna appears targted to cell phone applications so I'll need to change to a bigger better antenna for my car application, of which the most common ones are serial interface - so I need to find another serial port. 

I'm using PTC14,15 for my automobile interface, that's uart4 on the bluetooth j199 connector - and looks like the M14A2A cell modem shield is using PTC16,17 which is either uart2 on the shield schematic, or uart3 on the spreadshet FRDM-K64F_PKG.xlsx.

Looks like PTD2,3 uart2 on the spreadsheet is uart1 on the schematic - so it's looks like I'll have to use a soft serial on a couple of other free pins for a real GPS. 

 

LightCollector's picture
LightCollector
Moderator(20)

Hi,

 

It is normal for the Xadow gps to take a long time to acquire unfortunately but one of many tradeoffs.  It is easy to use and inexpensive.  And we've used it before so knew it was reliable along with some of it's quirks.

 

Another obvious UART to use would be UART0 but only if you do not care about any serial debug.  The mbed OS is more or less tied to UART0 in several software layers but you can certainly use it for your own purpose.  Otherwise, the answer is what you're doing, look at the schematics and the data sheet for the K64F.  Many K64F pins not only have multiple functions but depending upon the peripheral can be mapped to different sets of pins.  Mbed supports this pin mapping through the pin class, you can search and find in the mbed headers constants for the functionality that the K64F can do.  You can of course just override with a poke to a K64F register but I recommend that you don't do that and go with the mbed way of setting up the pins.  If the mbed way does not do what you want then resort to attempting to override but be careful.

 

Best Regards

cswiger's picture
cswiger
Junior(1)

Thanks for the info about uart0 (which is exposed on the 8 pin RF port J6, PTD6,7) as it was very troublsome indeed. Immediately PC USB virtual serial became slow and bursty, etc.    Anway, I just switched to an EM 506 GPS module (really nice!) using SoftSerial on PTC7,5 inner header pins and everything is happy now!

    SoftSerial gpss2(PTC7,PTC5);