i am developing a android app and i want to read the coil status on click of a button.i encounter problem at "trans.execute".Please let me know what is the problem. the java code works perfectly but this android code is not.
Below is the code:
public void onClick(View view)
{
// Reading coil status
i am developing a android app and i want to read the coil status on click of a button.i encounter problem at "trans.execute".Please let me know what is the problem. the java code works perfectly but this android code is not.
Below is the code:
public void onClick(View view)
{
// Reading coil status
The exception encountered is:
04-28 06:00:34.349: W/System.err(1484): net.wimpi.modbus.ModbusIOException: Executing transaction failed (tried 3 times)