OK, I've been able to get somewhere ...
telnet router
sh
tcpdump -v -n -X port 6668
then with phone app on/off/on/off/on/off.......
copy & paste into file, extract hex from 0x0020 second half on to end (0x00d0).
Then process through base64 to create an encoded string ie. AAAAAFWqAAAAIgAAAAcAAACb...
I had 21 on/off examples which I ran through a for loop as:
echo -n -e "$string" | base64 -d | nc IP 6668
and [click] ON [click] OFF I tried it several time and found a pair of strings that seemed to turn it on/off. Well almost, it seemed to be more of "toggle" than on/off and on the hour it quit working - and now it's working again.
#!/bin/bash
off="AAAAAFWqAAAAHwAAAAcAAACbMy4xNjRiMjc3OWU2ODVlNTE4NFFXdlNrYS9uTmtoUzFiL0V0K2lSbG4yK2dITWRRTVFZZ2J6R0dtdy9pTTgrbno4UXllZmVFRDd5REhyMVhVNGhYVHJ0VkM0eVNNb2FIcmdocXFDTFExbVRtMHVjOHRJTlU0eVBvaWc2cHVURndNR281bHljTnlYdzlkeDg3ak9GTriUPgAAqlU="
on="AAAAAFWqAAAAIAAAAAcAAACbMy4xOWRjZTUyNDYzY2YyYWQ3N1FXdlNrYS9uTmtoUzFiL0V0K2lSbG4yK2dITWRRTVFZZ2J6R0dtdy9pTS9hbFM5dldGZW1Pb2sySHYxUXFWNHNxQittZGxIYXFWcGQwZVRyUE9CUjhCN2dJbmNXN21LMDdyb0Z3WE51QWJiQ0V1VlQxWEkxQ2ZTcGN0U1lsamYvXWcXQQAAqlU="
case $1 in
on) echo "ON" ; ret=`echo -n -e $off | base64 -d | nc sg64 6668 2> /dev/null | base64` ;
echo "$ret" ;
ret=`echo -n -e $on | base64 -d | nc sg64 6668 2> /dev/null | base64` ;
echo "$ret" ;;
off) echo "OFF" ; ret=`echo -n -e $on | base64 -d | nc sg64 6668 2> /dev/null | base64` ;
echo "$ret" ;
ret=`echo -n -e $off | base64 -d | nc sg64 6668 2> /dev/null | base64` ;
echo "$ret" ;;
*) echo "Hu?" ;;
esac
while [ 1 ]; do ./my68 on; sleep 1; ./my68 off; sleep 1; done
ran for about 1/2 hour working just fine. I've found if I don't do a double send - on-off off-on it doesn't work. It's as if it's a toggle.