devenh
Posts: 32
Joined: Fri Jun 05, 2015 9:11 pm

Setting default USB (/dev/ttyACM0) baud rates

Thu May 03, 2018 3:25 am

I am using a USB GPS (u-blox chipset, /dev/ttyACM0) and at boot or when the device is plugged in, the baud rate is 9600. How can I configure my system so that the baud rate is 115200 or higher at startup or when it is plugged in? (I know the stty -F 115200 /dev/ttyACM0 will change the baud rate, but I want 115200 to be the default)

More generally, does the baud rate for USB devices behave the same way as for UART devices? The reason I ask is that the u-blox GPS allows for the setting of baud rates for the UART interface, but not for USB interface. This implies that the USB interface handles baud rates differently. than UART. Is this correct?

User avatar
topguy
Posts: 5894
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Setting default USB (/dev/ttyACM0) baud rates

Thu May 03, 2018 1:04 pm

If the GPS chip has a direct USB interface ( and not just an UART with a serial2usb chip attached ), then there is no actual serial communication going on anywhere and baudrate is irrelevant. The USB has a set transferrate and will always transfer data at that speed.

User avatar
DougieLawson
Posts: 36312
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Setting default USB (/dev/ttyACM0) baud rates

Thu May 03, 2018 8:25 pm

Most GPS receivers work at 4800 8N1 (ancient old ones) or 9600 8N1 and won't drive the serial interface at any higher baud rate (because it doesn't give you any benefits when it's about publishing about five or six NMEA sentences (less than 400 bytes) each second).

Just install gpsd and use that as a simple interface to your u-blox GPS receiver.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

devenh
Posts: 32
Joined: Fri Jun 05, 2015 9:11 pm

Re: Setting default USB (/dev/ttyACM0) baud rates

Thu May 03, 2018 9:41 pm

I'm running a 10hz update rate, so I am pushing more data through the pipe. This is why I'm always checking throughput as I don't want to overload the pipe.

Return to “Raspbian”