TCP or HTTP Protocol

9 years 9 months ago #202 by Fab85
TCP or HTTP Protocol was created by Fab85
Hello EasyIoT,

Lately I have also been playing with the ESP8266 and I'm really happy with the arduino driver for EasyIoT. But now with the "Lua" scripts the need of a arduino is a little less needed for a lot of projects. Is there a way to write a driver for "Lua"?
A other thing is that I also have sensors that communicate with TCP or HTTP via gprs. I would like to connect them to EasyIoT, but for this I need to know more about the protocol that you use with EasyIoT. Is this information public some where or is it possible to make this protocols public? I think more people would like to know this, to make other products work with your server.

Thanks

Please Log in or Create an account to join the conversation.

9 years 9 months ago - 9 years 9 months ago #203 by EasyIoT
Replied by EasyIoT on topic TCP or HTTP Protocol

Fab85 wrote: Hello EasyIoT,

Lately I have also been playing with the ESP8266 and I'm really happy with the arduino driver for EasyIoT. But now with the "Lua" scripts the need of a arduino is a little less needed for a lot of projects. Is there a way to write a driver for "Lua"?
A other thing is that I also have sensors that communicate with TCP or HTTP via gprs. I would like to connect them to EasyIoT, but for this I need to know more about the protocol that you use with EasyIoT. Is this information public some where or is it possible to make this protocols public? I think more people would like to know this, to make other products work with your server.

Thanks


Yes you are right. For simple projects would be "lua" driver enough on ESP side. But right now I'm developing other functions on EasyIoT server and I don't have time for this. If anyone is interested in developing "lua" I will gladly help with ESP8266 EasyIoT implementation details.
All available info for ESP8266 EasyIoT driver is public. There is no documentation about driver, but protocol is very simple. It's TCP and source code is available on GitHub. All data are sent in form described in Esp8266EasyIoTMsg. If you need any further details let me know.

Please Log in or Create an account to join the conversation.

9 years 9 months ago #259 by Fab85
Replied by Fab85 on topic TCP or HTTP Protocol
Hello EasyIoT,

I'm traveling at the moment and don't have my ESP8266 modules with me. I would like to experiment with the protocol a little with the Windows version and putty already. Is it possible to post a dump of the serial communication between the Arduino and the ESP8266? And/or a wireshark dump?

Thanks

Please Log in or Create an account to join the conversation.

9 years 9 months ago - 9 years 9 months ago #265 by EasyIoT
Replied by EasyIoT on topic TCP or HTTP Protocol

Fab85 wrote: Hello EasyIoT,

I'm traveling at the moment and don't have my ESP8266 modules with me. I would like to experiment with the protocol a little with the Windows version and putty already. Is it possible to post a dump of the serial communication between the Arduino and the ESP8266? And/or a wireshark dump?

Thanks


Hi, dump will not help you much. I will describe in short how communication works:
-ESP connects to EasyIoT server on specific port
-If ESP doesn't have stored node ID in EEPROM it requests it from server.
server sends ID - this is unique number starting from 1. ESP store ID to EEPROM so next time it doesn't need to request ID. ID can be requested only if you press add node in server web interface.
-after ESP know it's ID it sends presentation message - it sends info about sensor type. All this communication is done in setup
-ESP sends sensor data - this is in loop part of program.
-If no sensor data is send, ESP sends PING message every 5s and gets response from server.
-if there is no PING response message more than 5s connection is closed and open again.

ID is number between 1 and 65534. After ESP sensor node is added to server, server knows node based on this ID. It doesn't need to know node IP and it can actually change over time if you are using DHCP.
All data are sent in form described in Esp8266EasyIoTMsg.h. ESP EasyIoT lib also reconnects if connection is lost or if ESP freezes it resets it.

If you need any additional info I can help you.

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1195 by geir
Replied by geir on topic TCP or HTTP Protocol

Fab85 wrote: Hello EasyIoT,

I'm traveling at the moment and don't have my ESP8266 modules with me. I would like to experiment with the protocol a little with the Windows version and putty already. Is it possible to post a dump of the serial communication between the Arduino and the ESP8266? And/or a wireshark dump?

Thanks

Have you managed to get hold on a Wireshark log or similar showing the IP-communication between the EasyIoT server and the ESP8266 now? I find it quite hard to locate the correct bytes to transmit by reading the Arduino library, so a real life communication seen in Wireshark would really help understanding the protocol. Preferably a complete session from the point where a new device is added in EasyIoT-server, requesting it's _nodeId and then starting to transmit some simple data (f.ex. a temperature).

The reason for wanting to understand this protocol is to make a non-Arduino device able to transmit it's sensor data to the EasyIoT server.

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1205 by EasyIoT
Replied by EasyIoT on topic TCP or HTTP Protocol

geir wrote:

Fab85 wrote: Hello EasyIoT,

I'm traveling at the moment and don't have my ESP8266 modules with me. I would like to experiment with the protocol a little with the Windows version and putty already. Is it possible to post a dump of the serial communication between the Arduino and the ESP8266? And/or a wireshark dump?

Thanks

Have you managed to get hold on a Wireshark log or similar showing the IP-communication between the EasyIoT server and the ESP8266 now? I find it quite hard to locate the correct bytes to transmit by reading the Arduino library, so a real life communication seen in Wireshark would really help understanding the protocol. Preferably a complete session from the point where a new device is added in EasyIoT-server, requesting it's _nodeId and then starting to transmit some simple data (f.ex. a temperature).

The reason for wanting to understand this protocol is to make a non-Arduino device able to transmit it's sensor data to the EasyIoT server.


No I do not have Wireshark. Just see code and everything will be clear. In Esp8266EasyIoTMsg.h is message definition and in Esp8266EasyIoT.cpp method process() is main function to handle messages.

Please Log in or Create an account to join the conversation.

Time to create page: 0.193 seconds

Forum latest

  • No posts to display.