logo elektroda
logo elektroda
X
logo elektroda

[ESP8266][ATMEGA][C] How to get the IP and port from a received UDP packet?

adambehnke 2787 4
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 15544637
    adambehnke
    Level 24  
    Hello
    Again I have a question regarding the communication between the atmega and the ESP8266.
    Well, I have now set up communication via RXD and TXD.
    I am using AT commands to configure the communication.
    And everything is working correctly. I transmit and receive packets without problems.
    But if I receive a packet I don't know from which IP and port the packet came.
    How to check this. I know that in arduino libraries for ESP8266 there is such possibility.
    But I do not use any library. I'm using communication over an ordinary UART.

    Please give me some hints and suggestions.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • Helpful post
    #3 15545804
    madejpm
    Level 11  
    Change the concept a little. Program the network handling yourself on the ESP and let the ATMEGA just send and receive data. On the ESP you will have access to all network related data and you can easily program a more advanced/go server or client.
    I immediately overwrote the AT firmware with my own programming and ended up doing everything on the ESP, but this is not always the best concept, especially for the ESP-01 board. But I highly recommend doing the network part on it!
  • ADVERTISEMENT
  • #4 15546129
    adambehnke
    Level 24  
    I just thought of the same thing to put the networking part on Esp. But there is a problem here because I am using this module for the first time and I have never written anything for it.
    I know there is a library for this on arduino. But I am writing in Eclipse GCC and don't know where to start.
    I will be very grateful if someone of my colleagues will show mercy and understanding over a beginner and lead a little by the hand. I would like to point out that I do not expect ready-made solutions. But I would like to know where to start because I cannot hide the fact that these modules are extremely interesting.
ADVERTISEMENT