I'm here asking some support for a newbie in embedded communication.
My situation is the following:
- embedded device: STM32L4xx microcontroller + ATWINC1500 wifi module
- WiFi management code (driver) already written and working
My goal: create a connection between the embedded system and a PC via WiFi, having both PC and device on the same LAN, in order to allow the PC to send files to the device, and send feedbacks from the device back to the PC.
The problem is that I do not know basically how to approach the problem, because is my first project that relies on wifi connectivity. The main thing I think I'd should do will be define a custom communication protocol, in order to let the two actors talk to each other. The flow, in my opinion, should be:
- set up a stable connection (UDP or TCP, I have to determine also this) between the two actors
- on the PC side, create an application that sends the data to the device
- device side, write an handler for the incoming packets and manage the arrival of them
- device side, send the feedback to the PC once the data are arrived safely(check the correctness via checksum).
Do you guys think that the above could be a good starting point? Do you have any documentation online to share with me that could clarify my doubts or give me some starting point to follow?