6

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:

  1. set up a stable connection (UDP or TCP, I have to determine also this) between the two actors
  2. on the PC side, create an application that sends the data to the device
  3. device side, write an handler for the incoming packets and manage the arrival of them
  4. 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?

3
  • 2
    Although this is broad, I think it has an easy/useful answer - use an existing protocol. I'll leave it to someone more familiar with the software stack to explain how MQTT or similar would cover these points effectively. May 10, 2018 at 11:45
  • 2
    A couple of clarifying questions: Does the embedded device have the IP address of the PC it is trying to talk to? If not, then you will need a discovery process of some sort. Why does your protocol need to be custom? What is so special about the data passing back and forth that it can't use an existing protocol?
    – JD Allen
    May 10, 2018 at 16:37
  • 1
    you guys maybe are right, I have no special data to be processed, so I think an existing protocol can do the stuff. thanks!
    – panc_fab
    May 14, 2018 at 7:14

1 Answer 1

2

Ok guys, so thank you for the comments, I've managed to solve the issue by using MQTT for feedback data as mentioned before by @Sean. problem solved!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.