Since you refer to the reference_listener, you’ll be relying on libzwaveip. As Carsten mentionedthe source is only exposed by virtue of the source address in IP header of the UDP packet. This information isn’t provided directly in the application command callback, but is accessible from the zconnection handle passed in that callback.
- Use the the zconnection_get_remote_addr(…) function to get the remote IP address from the zconnection.
- Create a ZIPND,ZIP_NODE_SOLICITATION frame populated with the IP address and send it to ZipGw. The response will contain the node Id.
The example listener code doesn’t do this.
Also the ZIP ND commands cannot be encapsulated in ZIP_PACKET frames, and therefore cannot be sent via the libzwaveip code. You need to open your own plain UDP socket (no encryption needed) send the packet and wait for a response. It’s a shame the support isn’t in libzwaveip for this, but its not complicated to write (even doing timeouts and retries). I believe there was an issue opened on libzwaveip regarding this omission.