News for hackers. Stuff that matters.
Re:How not to design a wire protocol by bsder on Tuesday March 05, 2019 @04:48PM (#19314566)
If one of my engineers brought me this "protocol" (um, protocols require state machines, where is it?), we would be having a series of long talks to figure out whether he needs to be educated or fired.

What happens if I want to run NTP on an ARM M4 microcontroller with a lithium coin cell battery? Because, you know, perhaps I actually might want my time to be accurate on devices that even outship cell phones?

Sending that message would be difficult without drift because of the huge number of bytes involved. Transmission time is far too long. I could go on and on...

If you want to see a relatively well designed protocol, go chew through the BLE (Bluetooth Low Enregy) spec. It's not perfect, but it shows you how to balance functionality vs. engineering (note the number of times you have a "length" parameter so that you can chew through your binary blobs even if you can't parse all of it).

Please quit giving ESR a platform when it's quite clear he really sucks as a programmer.

Re:How not to design a wire protocol by outworlder on Tuesday March 05, 2019 @06:53PM (#19315315)
> Please quit giving ESR a platform when it's quite clear he really sucks as a programmer.

I am not sure this post complies with Hacker News guidelines.

Re:How not to design a wire protocol by DonHopkins on Tuesday March 05, 2019 @08:15PM (#19315699)
A better reason not to give ESR a platform is that his racism doesn't comply with Hacker News guidelines.
Re:How not to design a wire protocol by bsder on Wednesday March 06, 2019 @04:36PM (#19323087)
Why? An assessment of technical competence/relevance seems to be a cornerstone of the upvote/downvote system on HN.

I find ESR to be ferociously overrated from a technical standpoint and resent the fact that he absorbs oxygen from people far more talented but far less "adept" at self-promotion. In addition, the "technical" ideas that he promulgates occasionally have to be actively undone by those with stronger technical chops.

Why does verbalizing this run afoul?

Re:How not to design a wire protocol by robertAngst on Tuesday March 05, 2019 @06:06PM (#19315077)
Why would someone write a protocol in 2019?

Don't we already have formats? (EDIT: Like CAN or I2C?)

Re:How not to design a wire protocol by bsder on Wednesday March 06, 2019 @04:30PM (#19323020)
Don't know why you got downvoted, it's a good question.

A "protocol" sits on top of things like I2C, SPI, and CAN.

Protcols answer things like: "How do I send more bytes than the underlying transport can take in a single transaction?" "How do I exchange data when hardware has different characteristics." "How do I minimize the power or time needed to exchange data?"

Different protocols have different strengths and weaknesses.

Remember: part of my complaint about this "protocol" is its "verbosity". If you are on a battery or are bandwidth constrained (Narrowband-IoT, LoRA, ANT, etc.), you want a protocol that exchanges short messages. Time is certainly something that you don't want to require lengthy messages when you are trying to set up.

Too many people think "embedded" means "runs a Linux installation larger than the average computer in 1996".