I am trying to write python server that communicates with a Particle Photon micro-controller. The micro-controller should send updates when the status has changed, and also accept commands from the server to run a calibration or other actions.
There are raw sockets in Python that act more low-level (How Do I Use Raw Socket in Python?), however, I am not currently using one of those.
In my python server code, I open the sockets as a SOCK_STREAM:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Now, I want to make sure that my packages arrive uncorrupted on both ends, and was considering adding a checksum. However, TCP already has a checksum in its packages, so do I still need to build yet another checksum into my protocol?
Given that I am communicating between a C-style lower level language and a Python, should I be using RAW_Sockets instead?
All communication is on a LAN over Wifi.