Simple network debugging tools

Posted: [Source]
Tags:  arduino audio osc pyo

I've been using sendip and ngrep to performe some network debugging. It was specially useful when I was trying to communicate an arduino ethernet shield to Pyo via Open Sound Control. Here's an example for future reference.

Sending a "Hello" message:

tiago@gnudaw:/home/tiago# sendip -p ipv4 -is 192.168.2.126 -p udp -us 9999 -ud 8888 -d "Hello" -v 192.168.2.149
Added 26 options
Initializing module ipv4
Initializing module udp
Finalizing module udp
Finalizing module ipv4
Final packet data:
45 00 00 21   E..!
6B 7E 00 00   k~..
FF 11 C9 E9   ....
C0 A8 02 7E   ...~
C0 A8 02 95   ....
27 0F 22 B8   '.".
00 0D 0B D7   ....
48 65 6C 6C   Hell
6F   o
Sent 33 bytes to 192.168.2.149
Freeing module ipv4
Freeing module udp

Receiving a loop of OSC messages:

tiago@gnudaw:/home/tiago# ngrep src 192.168.2.149
interface: wlan0 (192.168.2.0/255.255.255.0)
filter: (ip or ip6) and ( src 192.168.2.149 )
#
U 192.168.2.149:8888 -> 192.168.2.126:9999
  /analog/0...,i......
#
U 192.168.2.149:8888 -> 192.168.2.126:9999
  /analog/0...,i......
#
U 192.168.2.149:8888 -> 192.168.2.126:9999
  /analog/0...,i......
^Cexit
3 received, 0 dropped