Hi there, I have an Adafruit Ultimate GPS Breakout module that I have connected up to the Arduino side. I can view the NMEA sentences when looking at the serial console in the Arduino IDE so I know the wiring it correct and the module works. I am trying to read the GPS data through the Arduino into /dev/ttyMCC and then have GPSD connect to that in order to provide GPS. To do this I am using this sketch; void setup() { Serial.begin(9600); Serial0.begin(9600);} void loop() { while (Serial0.available() > 0 ){ char char_buffer = Serial0.read(); Serial.print( char_buffer );}}If I run sudo cat /dev/ttyMCC I can see about a dozen sentences pass through but then I get nothing and In a very few cases the Neo has to be reset. Can anyone shed any light onto what I am doing wrong? Thank you in advance.
I'm seeing the same thing ... from time to time it gets stuck and I can't even CTRL-BREAK the cat. Didn't happen as often when I was sending small pieces of txt. When it halts the serial output remains broken even after uploading new sketches. A reboot is typically required to get it working again.
OK, so at least it isn't something I am doing wrong. Do you (or anyone) have any suggestions oh what to do? I want to avoid just a USB to serial adapter.
Dear @bnt2025, in which language your app is developed? CAT is not the best for reading the serial. You should read /dev/ttyMCC for example with fopen in C...
@Andrea Rovai I am just using CAT to test the stream. I have tried using sudo gpsd /dev/ttyMCC -F /var/run/gpsd.sock and then testing using gpsmon and cgps but i get no GPS info out of either.
So as an update; I ran gpsd using sudo gpsd -N -D 5 /dev/ttyMCC -F /var/run/gpsd.sock and got the following message; gpsdROG: control socket opened at /var/run/gpsd.sock gpsd:INFO: launching (Version 3.11) gpsd:IO: opening IPv4 socket gpsd:ERROR: can't bind to IPv4 port gpsd, Address already in use gpsd:ERROR: maybe gpsd is already running! gpsd:IO: opening IPv6 socket gpsd:ERROR: can't bind to IPv6 port gpsd, Address already in use gpsd:ERROR: maybe gpsd is already running! gpsd:INFO: command sockets creation failed, netlib errors -1, -1 I killed gpsd and re-ran it with the same options. It appears to be working now. I will leave it running for a while as a test. I guess CAT wasn't a good testing program. It is the Adafruit ultimate gps breakout.