Skip to content

Device does not respond to UDP broadcast discovery queries #174

@tylerkron

Description

@tylerkron

Device Under Test

  • Device: NYQUIST1
  • IP Address: 192.168.1.44
  • TCP Data Port: 9760
  • Serial Number: 9090539562006014104
  • HW: 2.0.0
  • FW: 3.2.0

Issue Summary

The device does not respond to UDP broadcast discovery queries on port 30303, but responds correctly to unicast queries sent directly to its IP address.

Expected Behavior

Device should respond to the discovery query "DAQiFi?\r\n" sent via UDP broadcast to either:

  • Subnet broadcast address (e.g., 192.168.1.255:30303)
  • General broadcast address (255.255.255.255:30303)

Actual Behavior

Query Type Target Response
Unicast 192.168.1.44:30303 ✅ 115-byte protobuf response
Broadcast 192.168.1.255:30303 ❌ No response
Broadcast 255.255.255.255:30303 ❌ No response

Testing Methodology

  1. Tested with Python UDP sockets (independent of application code)
  2. Verified broadcast packets are being transmitted (received own echo on listener)
  3. Tested with socket bound to specific interface (192.168.1.29)
  4. Tested with socket bound to 0.0.0.0
  5. Tested sending FROM port 30303 (in case device filters by source port)
  6. Tested broadcast immediately after successful unicast (device was "awake")
  7. macOS firewall confirmed disabled
  8. All tests consistently show: unicast works, broadcast does not

Evidence

# Unicast test - SUCCESS
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.settimeout(3)
s.sendto(b'DAQiFi?\r\n', ('192.168.1.44', 30303))
data, addr = s.recvfrom(1024)
print(f'Received {len(data)} bytes from {addr}')
# Output: Received 115 bytes from ('192.168.1.44', 30303)

# Broadcast test - FAILS
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.settimeout(3)
s.sendto(b'DAQiFi?\r\n', ('192.168.1.255', 30303))
data, addr = s.recvfrom(1024)
print(f'Received {len(data)} bytes from {addr}')
# Output: socket.timeout (no response)

Conclusion

The device firmware appears to only process UDP packets addressed directly to its IP address (unicast) and ignores packets sent to broadcast addresses. This prevents automatic device discovery on the network.

Recommendation

Please verify the UDP receive handler in the firmware is configured to accept packets sent to:

  1. The device's assigned IP address (currently working)
  2. The subnet broadcast address (e.g., 192.168.1.255)
  3. The limited broadcast address (255.255.255.255)

The socket may need to be bound to INADDR_ANY (0.0.0.0) or have the SO_BROADCAST option enabled for receiving broadcast packets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions