Hi,
I'm trying to configure my Venus GPS chip but I'm running into problems as I don't even get a rejected message in return after I send a query. I looked into the topic of creating character arrays with hex values and I'm pretty sure that my implementation should work but there must be a mistake somewhere.
Full document: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/GPS/AN0003_v1.4.19.pdf
Message format:
Ack and Nack format codes:
Sample message (s/w version query):
My code:
#include "mbed.h"
Serial pc(USBTX, USBRX); // tx, rx
Serial device(p9, p10); // tx, rx
int main() {
char myhexarray1[]={0xA0, 0xA1, 0x00, 0x02, 0x02, 0x00, 0x02, 0x0D, 0x0A};
pc.printf("\n\n\nStarting\n\n\n\r");
device.printf(myhexarray1);
while(1) {
if(pc.readable()) {
device.putc(pc.getc());
}
if(device.readable()) {
pc.putc(device.getc());
}
}
}
Com output:
When I double checked my message format, I ran across a forum that listed various ways of creating character arrays with hex values:
char myhexarray1[]={"\x1\x2\x3\x4"};
char myhexarray2[]={0x1,0x2,0x3,0x4} ;
char myhexarray3[]={'\x1','\x2','\x3','\x4'};
Any ideas? Am I constructing the message wrong, should i have a '\n' at the end? Am I sending it wrong to the chip?
Cheers,
Sebastian
Hi,
I'm trying to configure my Venus GPS chip but I'm running into problems as I don't even get a rejected message in return after I send a query. I looked into the topic of creating character arrays with hex values and I'm pretty sure that my implementation should work but there must be a mistake somewhere.
Full document: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/GPS/AN0003_v1.4.19.pdf
Message format:
Ack and Nack format codes:
Sample message (s/w version query):
My code:
Com output:
When I double checked my message format, I ran across a forum that listed various ways of creating character arrays with hex values:
Any ideas? Am I constructing the message wrong, should i have a '\n' at the end? Am I sending it wrong to the chip?
Cheers, Sebastian