0

I created serversocket in java and i am unable to send binary packet response to Teltonica fmxxxx device. can any one help me...

and this is my code

DataOutputStream outToClient = new DataOutputStream(socket.getOutputStream());
byte[] b={0x01};
outToClient.write(b,0,len);
outToClient.write('\n');
outToClient.flush();
Madhawa Priyashantha
  • 9,633
  • 7
  • 33
  • 60
Vinod Poorma
  • 419
  • 1
  • 6
  • 15
  • 1
    Hope it will help : http://stackoverflow.com/questions/7106762/how-to-send-such-complicated-hex-binary-protocol-data-accurately-using-java-byt – Rahman Sep 22 '15 at 07:21
  • From my experience years back .. Teltonica fm are using serial com and not socket . no ? – sean Sep 22 '15 at 07:36
  • Binary data isn't line-terminated. There is something wrong with what you're sending. But 'unable to send' isn't a problem description. – user207421 Sep 22 '15 at 08:37

0 Answers0