diff options
Diffstat (limited to 'bcm4751_gpsd.c')
| -rw-r--r-- | bcm4751_gpsd.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bcm4751_gpsd.c b/bcm4751_gpsd.c index d7cdc9c..690433a 100644 --- a/bcm4751_gpsd.c +++ b/bcm4751_gpsd.c @@ -253,6 +253,22 @@ void bcm4751_read_dump(int fd) } } +void bcm4751_switch_protocol(int fd) +{ + uint8_t data1[] = { 0xff, 0x00, 0xfd, 0x40, 0x00, 0x00, 0xe6, 0xfc }; + uint8_t data2[] = { 0xfe, 0x00, 0xfd, 0x6f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0xfc }; + uint8_t data3[] = { 0xfe, 0x00, 0xfd, 0x6f, 0x3a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x34, 0xfc }; + + sleep(1); + + printf("Sending unknown bytes!\n"); + bcm4751_serial_write(fd, data1, sizeof(data1)); + bcm4751_serial_write(fd, data2, sizeof(data2)); + bcm4751_serial_write(fd, data3, sizeof(data3)); + + bcm4751_read_dump(fd); +} + int main(void) { int fd = -1; |
