Answer the question
In order to leave comments, you need to log in
What interface (API) to use for raw socket exchange between server and piece of iron (stm32)?
All the best!
There is a server (PC, python) and a client (on stm32) connected via ethernet. Communication via raw socket.
Basically the data (requests) comes from the server!
What is the best API to implement/use?
The requirements are simple:
1) simple parsing of commands on the hardware side: determining the beginning of the command, the command, parameters, the end of the command - in case of sending commands in one package. Those. so that you can use switch case :)
2) text commands (something like AT commands) (for ease of viewing in wireshark)
3) I would not want to use third-party libraries (from IoT, smart homes, etc.) but if they give some advantage, it would be possible to use
4) for a minimum of resources
5) and probably most importantly, I would like to use a "beautiful" API, where everything is "beautiful")
What do you recommend? AT commands or plain text like " < START cmd='some_model' Height='3' Width='3' > "
Perhaps you have already done/implemented something similar?
Answer the question
In order to leave comments, you need to log in
AT commands, IMHO, are not the most convenient format - readability is bad for a person, but for a controller - text is text.
Option 1 - options on the topic of text protocols - JSON, SOAP, etc. - SMT32 is fast enough to parse this.
Option 2 - binary protocol - this is more rational for working with the controller. (but if you have a large performance margin, then there is no point in bothering with this).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question