I tried to contact the device server using Sockets, after my little Java program crashed, when readLineI had to add my target application using the packet sniffer and found out what os.writeBytes("notify\n");is split into two packages, the first of which contains the nnext otify, of which the server did not like it. I fixed this by adding more writeBytes:
os.writeBytes(" ");
os.writeBytes("notify\n");
os.flush();
It seems a bit hacked and potentially unstable to me, can someone shed some light on why I need to do this and give me a better solution.
Greetings
source
share