• AVR Freaks

Hot!How to obtain IP Version 4 info from WINC1500

Author
larrycook99
Starting Member
  • Total Posts : 46
  • Reward points : 0
  • Joined: 2012/04/01 11:37:34
  • Location: Lexington, KY
  • Status: offline
2020/06/18 07:08:35 (permalink)
0

How to obtain IP Version 4 info from WINC1500

I am using the WINC1500 to add WiFi capability to a product and it works reasonably well. However, we want to add BACnet/IP which uses UDP to communicate and the issue that I am having is that when I receive an incoming message I cannot get at the information in the IP Version 4 header. Specifically I want the IP address of the destination the message was sent to because I want to know if the message was a UDP unicast or a UDP broadcast. I need that because BACnet responds or doesn't respond to certain messages based on whether it was a unicast or broadcast message.
 
Does anyone know if I can get the IP V4 header info and if so how? Or is there a way to just find out if the message was unicast or not?
#1

3 Replies Related Threads

    malaugh
    Super Member
    • Total Posts : 412
    • Reward points : 0
    • Joined: 2011/03/31 14:04:42
    • Location: San Diego
    • Status: offline
    Re: How to obtain IP Version 4 info from WINC1500 2020/06/18 07:38:07 (permalink)
    0
    In the socket callback, in the RCVFROM case a structure of type tstrSocketRecvMsg is returned.  The strRemoteAddr element in this structure contains the remote IP address.
     
     
    #2
    larrycook99
    Starting Member
    • Total Posts : 46
    • Reward points : 0
    • Joined: 2012/04/01 11:37:34
    • Location: Lexington, KY
    • Status: offline
    Re: How to obtain IP Version 4 info from WINC1500 2020/06/18 07:57:23 (permalink)
    0
    Unfortunately the strRemoteAddr is where the message came from. I want the address of where that message was being sent. Was it specifically the receiving device's address (Unicast) or was it a broadcast message (something like 255.255.255.255 or 192.168.1.255)?
     
    Also the structures you reference are from the Atmel driver code. I am using the Microchop code (which I should have mentioned) and those names are recvMsg (Atmel's tstrSocketRecvMsg) and ai_addr (Atmel's strRemoteAddr ).
    #3
    larrycook99
    Starting Member
    • Total Posts : 46
    • Reward points : 0
    • Joined: 2012/04/01 11:37:34
    • Location: Lexington, KY
    • Status: offline
    Re: How to obtain IP Version 4 info from WINC1500 2020/06/30 09:59:18 (permalink)
    0
    I logged a support ticket about this several days ago. The response from Microchip:
     
    Unfortunately, the WiFi driver doesn't have any provision to get the destination IP address of the incoming packet. The IP header which contains the Destination IP and Source IP is bypassed and only Source IP is stored in the structure(t_socketRecv). Also the structure remains same irrespective of unicast UDP packet or Broadcast UDP packet,So differentiating between unicast and multicast packets is also questionable.
     
    We reported this issue to the internal team. We will get back to you on this issue ASAP.
     
    It was what I suspected but I am still disappointed.
    #4
    Jump to:
    © 2020 APG vNext Commercial Version 4.5