IBM Bluemix disconnecting the MqttAndroidClient after sometime

0 votes

I am working on CC2650 sensortag and Bluemix(using IOT starter boilerplate) as a cloud solution. The cc2650 android app uses MqttAndroidClient to connect to MQTT server provided by bluemix. The problem I am facing after sometime (around 7 mins) it get timedout.

Following exception is visible on the android studio console d:2f7tpk:ti-sensortag2:B0B448C07886: Timed out as no activity, keepAlive=240,000 lastOutboundActivity=1,463,309,545,312 lastInboundActivity=1,463,309,275,609 time=1,463,309,785,352 lastPing=1,463,309,545,312

Please note that every 10 seconds I am publishing the data to server from my android client app. So not sure why it is saying no activity. Keepalive interval is set to 120 seconds.

I confirmed it. It is IBM Bluemix which is disconnecting the client after approx 7 min. During this period client was continuously sending the data in 10 sec interval and that was also visible on the Bluemix device page.

Any idea why Bluemix is disconnecting it after 6-7 minutes (It is not fixed but out of 6 in 5 it got disconnected in 7 min and once it was around 6 min).

New observation: The other observation is once it is disconnected then it takes 10-12 retries before I am able to reconnect to Bluemix server. From Mqttv3 client I get the exception "Unable to connect to server". But during this period I am able to ping to server through cmdline ping utility.

Aug 1, 2018 in IoT (Internet of Things) by Matt
• 2,270 points
471 views

1 answer to this question.

0 votes

It was because phone cpu was going in sleep mode. http://dalelane.co.uk/blog/?p=1599 explains in detail what all should be taken care in Android MQTT client.

answered Aug 1, 2018 by anonymous2
• 4,280 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer
0 votes
1 answer

Unable to connect IBM Bluemix to NodeMCU using TLS Protocol

I've captured the your client hello in ...READ MORE

answered Oct 11, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points
646 views
0 votes
1 answer

CLI for Watson IBM IoT service in Bluemix

Programmatically register devices using bulk/devices operations. https://docs.internetofthings.ibmcloud.com/swagger/v0002.html#!/Bulk_Operations/post_bulk_devices_add Here's ...READ MORE

answered Nov 23, 2018 in IoT (Internet of Things) by DataKing99
• 8,240 points
598 views
0 votes
1 answer
0 votes
1 answer

MQTT protocol connection error

Ok so you need two libraries to ...READ MORE

answered Jul 6, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points

reshown Jul 6, 2018 by Vardhan 2,821 views
0 votes
1 answer

Mosquitto 1.4.2 Websocket support

down vote In the dir mosquitto-1.4.X edit the ...READ MORE

answered Jul 9, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points
1,206 views
0 votes
1 answer

IoT request response protocol

Based on your requirement of a light ...READ MORE

answered Jul 13, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points
1,635 views
0 votes
1 answer

What is the maximum message length for a MQTT broker?

It's not entirely clear what you're asking ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points
9,103 views
0 votes
1 answer

The MQTT folder is missing in Bluemix IoT NodeJS code,

IoT-Workbench now uses new improved code generation ...READ MORE

answered Aug 8, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points
713 views
0 votes
1 answer

Python Code to retrieve data from Device to IBM Bluemix

You connect as a device -> import ibmiotf.device. ...READ MORE

answered Sep 18, 2018 in IoT (Internet of Things) by anonymous2
• 4,280 points
1,105 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP