Serial to ublox 6 gps
Posted: Mon Dec 31, 2012 7:23 pm
Hi guys,
I've been trying to use a coridium basic chip for a high altitude ballooning project. All is well listening to the gps (ublox 6) on serial but I can't send messages to it
I'm just trying to send sentences such as the ones here http://ukhas.org.uk/guides:ublox6
ie the strings from
// Turning off all GPS NMEA strings apart from GPGGA on the uBlox modules
Serial.print("$PUBX,40,GLL,0,0,0,0*5C\r\n");
Serial.print("$PUBX,40,ZDA,0,0,0,0*44\r\n");
Serial.print("$PUBX,40,VTG,0,0,0,0*5E\r\n");
Serial.print("$PUBX,40,GSV,0,0,0,0*59\r\n");
Serial.print("$PUBX,40,GSA,0,0,0,0*4E\r\n");
Serial.print("$PUBX,40,RMC,0,0,0,0*47\r\n");
I'm sure I'm missing something basic out. Does anyone have an idea why it's not working?
my code (a little bit rough as its only testing the SEROUT)
#include <SERIAL.bas>
'SENDING DATA TO GPS
DIM BYTES(255) AS STRING
dim shortMessage(3)
INPUT(10)
bbBaud(10)=9600
OUTPUT(8)
bbBaud(8)=9600
do
BYTES=""
wait(10)
SERIN (10, 9600, 1, 255,BYTES)
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
SEROUT (8, 9600, 1, 23,"$PUBX,40,GLL,0,0,0,0*5C")'1g flight mode#
'wait(10)
SEROUT (8, 9600, 1, 23,"$PUBX,40,ZDA,0,0,0,0*44")'OFF NMEA GLL
'wait(10)
SEROUT (8, 9600, 1, 23,"$PUBX,40,VTG,0,0,0,0*5E")'Switching off NMEA GSA
'wait(10)
SEROUT (8, 9600, 1, 23,"$PUBX,40,GSV,0,0,0,0*59")'Switching off NMEA GSV
'wait(10)
SEROUT (8, 9600, 1, 23,"$PUBX,40,GSA,0,0,0,0*4E")'Switching off NMEA RMC
'wait(10)
SEROUT (8, 9600, 1, 23,"$PUBX,40,RMC,0,0,0,0*47")
'wait(10)
SEROUT (8, 9600, 1, 22,"1019861802401000001143")'switching of gll
'wait(10)
'SEROUT (10, 9600, 1, 22,[$101]) 'trying to send hex, not working
'chr(101)chr(98)Chr(6)chr(1)chr(8)chr(0)chr(240)chr(1)chr(0)chr(0)chr(0)chr(0)chr(0)chr(1)chr(1)chr(43)'decimal values of the hex trying to send
'shortMessage(0)= 101
' shortMessage(1) = 98
' shortMessage(2) = 6
'SEROUT(10,9600, 1, 10, shortMessage) 'trying to send array, not working
'print shortMessage
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
LOOP
I've been trying to use a coridium basic chip for a high altitude ballooning project. All is well listening to the gps (ublox 6) on serial but I can't send messages to it
I'm just trying to send sentences such as the ones here http://ukhas.org.uk/guides:ublox6
ie the strings from
// Turning off all GPS NMEA strings apart from GPGGA on the uBlox modules
Serial.print("$PUBX,40,GLL,0,0,0,0*5C\r\n");
Serial.print("$PUBX,40,ZDA,0,0,0,0*44\r\n");
Serial.print("$PUBX,40,VTG,0,0,0,0*5E\r\n");
Serial.print("$PUBX,40,GSV,0,0,0,0*59\r\n");
Serial.print("$PUBX,40,GSA,0,0,0,0*4E\r\n");
Serial.print("$PUBX,40,RMC,0,0,0,0*47\r\n");
I'm sure I'm missing something basic out. Does anyone have an idea why it's not working?
my code (a little bit rough as its only testing the SEROUT)
#include <SERIAL.bas>
'SENDING DATA TO GPS
DIM BYTES(255) AS STRING
dim shortMessage(3)
INPUT(10)
bbBaud(10)=9600
OUTPUT(8)
bbBaud(8)=9600
do
BYTES=""
wait(10)
SERIN (10, 9600, 1, 255,BYTES)
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
SEROUT (8, 9600, 1, 23,"$PUBX,40,GLL,0,0,0,0*5C")'1g flight mode#
'wait(10)
SEROUT (8, 9600, 1, 23,"$PUBX,40,ZDA,0,0,0,0*44")'OFF NMEA GLL
'wait(10)
SEROUT (8, 9600, 1, 23,"$PUBX,40,VTG,0,0,0,0*5E")'Switching off NMEA GSA
'wait(10)
SEROUT (8, 9600, 1, 23,"$PUBX,40,GSV,0,0,0,0*59")'Switching off NMEA GSV
'wait(10)
SEROUT (8, 9600, 1, 23,"$PUBX,40,GSA,0,0,0,0*4E")'Switching off NMEA RMC
'wait(10)
SEROUT (8, 9600, 1, 23,"$PUBX,40,RMC,0,0,0,0*47")
'wait(10)
SEROUT (8, 9600, 1, 22,"1019861802401000001143")'switching of gll
'wait(10)
'SEROUT (10, 9600, 1, 22,[$101]) 'trying to send hex, not working
'chr(101)chr(98)Chr(6)chr(1)chr(8)chr(0)chr(240)chr(1)chr(0)chr(0)chr(0)chr(0)chr(0)chr(1)chr(1)chr(43)'decimal values of the hex trying to send
'shortMessage(0)= 101
' shortMessage(1) = 98
' shortMessage(2) = 6
'SEROUT(10,9600, 1, 10, shortMessage) 'trying to send array, not working
'print shortMessage
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
SERIN (10, 9600, 1, 255,BYTES)
PRINT BYTES
LOOP