0

I am using the eclipse Paho lib in android and trying to connect to mqtt server at io.adafruit.com using tcp. The problem is that the app is able to connect but as soon as it publishes or subscribes, the connection is lost. The same code works for other mqtt servers. Any help would be appreciated. I have seen other similar questions and tried the solutions but nothing works with this particular server. The exception thrown is:

W/System.err: Connection lost (32109) - java.io.EOFException
    at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:146)
    at java.lang.Thread.run(Thread.java:818)
  Caused by: java.io.EOFException
     at java.io.DataInputStream.readByte(DataInputStream.java:77)
     at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:65)
     at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:107)
JSmith
  • 135
  • 4
  • 14

0 Answers0