Reading uBlox GPS via it's DDC (i2c) port

cloudy

Member
I've seen some really helpful code from Hippy here to make the ublox GPS only send certain NMEA strings back on request over serial - however I could really do with doing the same using the i2c interface

http://www.picaxeforum.co.uk/showthread.php?23934-How-to-request-data-from-GPS010&p=238776&viewfull=1#post238776


I found some arduino sample code here:
http://www.recoon5.ru/en/story/u-blox_EVK-7N_I2C

But it seems to dump all the NMEA strings. Has anyone played about with this? Is it possible to turn off the other strings in the same way you can over serial?

Really appreciate the huge help this forum has been in my endeavours!
James
 

neiltechspec

Senior Member
Yes, you need to use their config s/w.
That way way you can enable / disable any message over any supported interface.

Neil
 

cloudy

Member
I think those settings are lost on power cycle, so I need the picaxe to do that on boot, with serial you also need to request which string you want in addition to turning off the automatic ones... Only work with i2c I have done is probing for a value and receiving it back...
 

Jeremy Harris

Senior Member
The Ublox utility makes permanent changes to the configuration, as far as I'm aware. I've used it to change the configuration of a couple of Ublox GPS receivers that I have fitted to quadcopters and the configuration seems to be retained when the power has been off for some time.

Admittedly I've only ever used the utility to change serial mode configurations, like the baud rate and the data sentences that are transmitted, but I can't see why it shouldn't behave the same way for the I2C settings.
 

srnet

Senior Member
Well first off, whether the changes you make in Ucenter are permanent depends on the exact model of Ublox GPS and whether or not you have fitted a backup battery or added the secondary EEPROM, so the answer is it depends and you did not say which of the very many Ublox GPS you are using.

Yes you can turn off the NMEA seantences via I2C, you send UBX commands in the same way you would over Serial, you do not need to use the config utility, at least not on Ublox 7 or 8, not tried on a 6.

Regardless of that however on a PICAXE you would likley have to disable all bar say GPGGA and reduce the update period so that you could read one GPGGA before the I2C buffer in the UBLOX is overun with more incoming GPGGAs.
 

cloudy

Member
Code i'm currently using to read an ADXL345

HI2CIN 0x32,(b20,b21,b22,b23,b24,b25)

I'm not sure if i'm missing something here, but was hoping to send HI2CIN <SEND ME GPRMC string>, <receive my data>
Or do I need to do:
HI2COUT <SEND ME GPRMC STRING>
HI2CIN <receive my data>

My previous experience with i2c devices is I choose a location to read, and then get fed back the data, rather than sending a serial type string, and receiving data back...
 

srnet

Senior Member
The Ublox GPS acts rather like a serial device, except you keep reading one byte at a time from the internal buffer from a single register address.

For sending you send the serial stream (a config command for instance) to the devices I2C address.

This is explained the Ublox manual, and rather better than I can.

You need to look at the Receiver Protocal and Description manual for which ever of the many Ubloxs GPSs you are using.
 
Top