NIS Command on Android App

Hi,

I am looking to implement nis command using serial port in an Android App.
But it does not seem to be working.

Other commands like lec is working through the app.
Is it because of which is in Hex format?
or present of space in between “nis 0x1234”
I am passing nis as a String currently.

my code is:
String nis = “nis 0x1234”

and serial execution is

serialPort.write(nis.getByte());

since serial port only accepts byte[] format data.

Any Idea about this would be helpful
Thanks

Hi Varun,

the nis command takes one parameter in hexa format.

One of the issue can be that the character sampling rate on shell is slower than your Android App.
‘lec’ command is shorter than ‘nis 0x1234’.

You can try to send slower by adding delays between the characters.

Cheers,
TDK