Hello, I have a audio mixer which is controleable over network via android app. The discovery is done by sending broadcast UDP message "/info\0\0\0" to 255.255.255.255 (checked by tcpdump on the router). I thought I can do the same with:
printf "/info\0\0\0" | nc -4u -w 0 255.255.255.255 10024 But I never get the reply. This is what tcpdump sees: tcpdump -nnSX -v 'src 192.168.5.80 or dst 255.255.255.255' tcpdump: listening on re0, link-type EN10MB (Ethernet), capture size 262144 bytes 23:41:25.595663 IP (tos 0x0, ttl 64, id 28810, offset 0, flags [none], proto UDP (17), length 36, bad cksum 0 (->4439)!) 192.168.5.94.36465 > 255.255.255.255.10024: UDP, length 8 0x0000: 4500 0024 708a 0000 4011 0000 c0a8 055e E..$p...@......^ 0x0010: f fff ffff 8e71 2728 0010 c627 2f69 6e66 .....q'(...'/inf 0x0020: 6f00 0000 o... I never get any reply, but when I try the same with the android app while sniffing on the router: tcpdump -nnSX -v -i bridge0 'dst 255.255.255.255 or src 192.168.5.80' tcpdump: listening on bridge0, link-type EN10MB (Ethernet), capture size 262144 bytes 23:43:52.165821 IP (tos 0x0, ttl 64, id 20743, offset 0, flags [DF], proto UDP (17), length 36) 192.168.5.79.57477 > 255.255.255.255.10024: UDP, length 8 0x0000: 4500 0024 5107 4000 4011 23cb c0a8 054f E..$Q.@.@.#....O 0x0010: ffff ffff e085 2728 0010 2559 2f69 6e66 ......'(..%Y/inf 0x0020: 6f00 0000 o... 23:43:52.171565 IP (tos 0x0, ttl 128, id 8, offset 0, flags [none], proto UDP (17), length 84) 192.168.5.80.10024 > 192.168.5.79.57477: UDP, length 56 0x0000: 4500 0054 0008 0000 8011 aea1 c0a8 0550 E..T...........P 0x0010: c0a8 054f 2728 e085 0040 2677 2f69 6e66 ...O'(...@&w/inf 0x0020: 6f00 0000 2c73 7373 7300 0000 5630 2e30 o...,ssss...V0.0 0x0030: 3400 0000 5852 3138 2d32 372d 3031 2d34 4...XR18-27-01-4 0x0040: 3700 0000 5852 3138 0000 0000 312e 3039 7...XR18....1.09 0x0050: 0000 0000 .... So what am I doing wrong and how can I send UDP broadcast from either script of C code? Thank you! Regards, meka
signature.asc
Description: PGP signature