jeelabs / esp-link

esp8266 wifi-serial bridge, outbound TCP, and arduino/AVR/LPC/NXP programmer
Other
2.83k stars 723 forks source link

(Question) Pure C MQTT Client? #307

Open Zageek1 opened 7 years ago

Zageek1 commented 7 years ago

I am wanting to implement an MQTT client in pure C on an AVR not using an Arduino. This is because my current application is in pure C. This will interface to the ESP-Link via UART.

What I have successfully got working is communicating with ESP-Link using SLIP, my next plan is to implement the MQTT functions on top of that in pure C.

Is there more detailed document on of the protocol encapsulated within SLIP to communicate with the ESP-Link to use the MQTT functionality?

I am reading through the C++ source for Arduino and slowing figuring out, however some prewritten documentation would help. I dont have the time it will take to convert my legacy application from C to C++.

Zageek1 commented 7 years ago

I have read through the source and figured out the structure of the SLIP communications. So far I have SLIP working via serial perfectly and I am communicating with ESP-Link and I am working on publishing a topic however its going to be easier to convert this from one or two monolithic functions to a library with helper functions but that is going to take too long for my project.

What I am instead doing is recreating my plain C project in C++ and I will modify the ELclient here to strip out the Arduino stuff as I see the EL Client elegantly takes care of some of the conditions. Why reinvent the wheel...

tve commented 7 years ago

OK, let us know if you run into issues. Apologies for the lack of docs on this part.