forked from ruvnet/RuView
-
Notifications
You must be signed in to change notification settings - Fork 0
Test for inbound UDP traffic
Martin Cleaver edited this page May 24, 2026
·
2 revisions
PS D:\Dev\Projects\RuView> python -c "
>> import socket, struct
>> sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
>> sock.bind(('0.0.0.0', 5006))
>> sock.settimeout(10)
>> print('Listening on UDP 5006 for 10 seconds...')
>> count = 0
>> try:
>> while True:
>> data, addr = sock.recvfrom(2048)
>> magic = struct.unpack_from('<I', data)[0]
>> names = {0xC5110001: 'CSI_RAW', 0xC5110002: 'VITALS', 0xC5110003: 'FEATURES'}
>> name = names.get(magic, f'UNKNOWN(0x{magic:08X})')
>> count += 1
>> if count <= 5:
>> print(f' Packet {count}: {name} from {addr[0]} ({len(data)} bytes)')
>> except socket.timeout:
>> pass
>> sock.close()
>> print(f'Received {count} packets total')
>> "
Listening on UDP 5006 for 10 seconds...
Received 0 packets total
Receiving nothing
- Is a firewall in the way? Accept Inbound frames from CSI through Firewall
- Are the ESP32s sending anything? CHECK