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,260 points
38 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,260 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,260 points
30 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,100 points
37 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,260 points

reshown Jul 6, 2018 by Vardhan 284 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,260 points
68 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,260 points
166 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,260 points
81 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,260 points
37 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,260 points
38 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.