5 ms·
I love that the skills I learned in the 80s are still relevant today. Interacting with serial ports. AT commands. This stuff hasn't changed much.
by mig39 5y ago
I love that the skills I learned in the 80s are still relevant today. Interacting with serial ports. AT commands. This stuff hasn't changed much.
- rurban 5y agoyou configure modems still the same way. you still have modems in IoT devices. what changed are the capabilities, esp. the power states. these trackers can sleep most of the time, only wake up periodically, so they can survive on battery for several years. most sensors are connected via I2C to the CPU. some weird ones via SPI. most GPS sensors are different, they connect mostly via UART. so you can connect to them directly, bypassing the CPU.
- pantalaimon 5y ago> some weird^W fast ones via SPI ftfy
- rurban 5y agoblock devices, yes. my GNSS sensor needs SPI btw.
- pantalaimon 5y agoMT3333? Yea that's an improvement over the UART interface where it just sends out the data no matter if the other side is listening or sleeping. With the SPI interface you get an interrupt and can read the data at your own pace. But I2C would do too if they would offer a proper register interface as opposed to always expecting you to parse those verbose NMEA messages. Oh and only generating an interrupt if the fix is valid would be nice! But they just shoehorned the SPI interface onto it, exposing exactly the same data as they would over UART. So if you have to wake up, parse the message and only then will you find out if you have a valid fix or can go back to sleep and try again. Afaik they dropped the SPI mode in the newer chips though.
- sva_ 5y agoI wonder how common this UART protocol is in electronics? Being able to communicate with arbitrary electronics using the $30 Bus Pirate device seems like a very fair price.
- raptor99 5y agoQuite common. I will see if I can find a link and or some quick examples.
- dismalpedigree 5y agoWide spread. Its very easy to work with. UART aka Serial TTL or just RX/TX is native to almost all chips. There is no standard protocol though, so unless its a modem (AT commands) or you have a manual you will likely have a hard time communicating with it. If you want to see what is going over the wire get a logic analyzer. Typically ~$30. Connects to USB and comes with software to decode the messages. Its read only so to speak.
- unwind 5y agoUARTs are super important still, nothing old or obsolete about that tech. It's simply still useful, and a sensible way of doing serial communication in a simple way. The Pirate is awesome, and was rather magical when it first appeared (I bought mine in 2010), but nowadays I would just use a USB/UART adapter [1]. They're cheap as ... something cheap on Amazon, and simpler since they're special-purpose. [1]: https://www.amazon.com/s?k=usb+uart&crid=1JQRTOTBVDDCW&sprefix=usb+uart https://www.amazon.com/s?k=usb+uart&crid=1JQRTOTBVDDCW&spref...
- spicyjpeg 5y agoSerial ports are still ubiquitous in embedded electronics. Crack open any non-trivial device and you will probably find a serial port, sometimes along with JTAG or SWD, on an unpopulated connector or on test pads, spitting out debug logs. And it makes sense from an engineering standpoint. Equipment for interfacing to a serial port, even in 2022, is widely available (you can get a basic TTL-level dongle for the price of a coffee) and pretty much every microcontroller/SoC has at least one hardware UART. If you want to see what your code prints to stdout while it's running on real hardware you could either implement a fancy redirection layer that sends logs over whatever interface your device has (and hope there are no bugs in it) or just use the built-in UART, wire it up to an off-the-shelf dongle and call it a day.
- quartz 5y agoSeeing AT commandes described as the "way that humans and machines can interact with a cellular modem" made me feel old because they didn't just say "remember AT commands from manually driving your Hayes 9600baud dial up modem?"
- tallanvor 5y ago9600? Try 1200 baud! Of course, this guarantees that someone will chime in talking about starting off with a 300 baud modem that worked like they showed in WarGames.
- jon_adler 5y agoI also ran through most of the modem speeds. All the lower speeds were calls made to BBSs, pre internet. 1200, 2400, 9600, 14400, 28800, 33600…
- lordelph 5y agoI recall accessing Prestel at 1200/75 - 1200 baud coming down, but a measly 75 baud going back up!
- jes 5y agoBack in the 70s, I dialed a number on my parent’s rotary phone. When the remote computer answered, I would shove the handset into the earmuffs on the acoustic coupler[1]. It usually worked. I don’t remember if the baud rate was 300 or 110. 1. https://en.m.wikipedia.org/wiki/Acoustic_coupler https://en.m.wikipedia.org/wiki/Acoustic_coupler
- DonHopkins 5y agoModems used to cost a dollar a baud, about $100 for a 110 baud modem, $300 for a 300 baud modem, and $1200 for a 1200 baud modem.
- 13of40 5y agoI remember when the Hayes command set started to become the standard, because for a while you could get on a group chat on a BBS and press +++ATH to make the outbound modems hang everyone up. I think there was an AT command to remap that pattern, but it wasn't adopted by all the BBS software right away. Edit: To clarify, before then you would have something like a 300 baud modem that didn't have an out-of-band command set, so you would dial the number on your phone and flick a switch on the modem to make it connect and everything would be sent to the other side verbatim. The "+++" is the escape sequence you send to a Hayes modem to break it into command mode, the "AT" is the prefix for the command (attention?), and "H" means "hang up". IIRC, puritans would say "ATH0" because the "0" represents some particular state to hang up to, but it's the same as "ATH".