ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Telemetry / Low Latency Messaging / Everyplace » Android client for MQTT

Post new topic  Reply to topic
 Android client for MQTT « View previous topic :: View next topic » 
Author Message
Pearl
PostPosted: Mon Mar 10, 2014 10:50 am    Post subject: Android client for MQTT Reply with quote

Newbie

Joined: 08 Dec 2010
Posts: 3

Hi ,

I have imported the Android client project provided as part of M2M package.(mqttExerciser)

This when deployed into a Android emulator , it opens up MQTT app.

ClientID, MQTT server IP ( In my case it is my MQ running locally ) , telemetry port ( 1883 ) - These are required by the app to establish connection to MQ Telemetry Server .

I have followed the same steps as described in

For some reason I have never been successful in establishing connection to MQTT server from android app. I always get " Unknown error occurred while connecting to [ Server ]"

Android "Log Cat" does not give any useful info for debugging.

Wanted to know if any one has faced similar issue ? or was it a cake walk as described in developer work link . If so what am I missing. Please suggest

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Mar 10, 2014 11:07 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What do you mean by "my MQ running locally"?

Unless you enable the Telemetry daemon, an MQ queue manager does not speak MQTT.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Mon Mar 10, 2014 11:21 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3252
Location: London, ON Canada

Hi,

- Did you install Telemetry Service (and Telemetry Clients) when you installed MQ?
- What version of MQ are you using?
- As Jeff mentioned, did you enable it? In MQ Explorer, in the left panel, click Telemetry then click the link to enable it
- Have you tested your setup with the MQTT Client Utility included with MQ Explorer? i.e. In MQ Explorer, in the left panel, click Telemetry then click 'Run MQTT Client Utility'.
- Are you running your Android device inside (WiFi) or outside (3G/4G) of your network?

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Pearl
PostPosted: Mon Mar 10, 2014 12:15 pm    Post subject: Reply with quote

Newbie

Joined: 08 Dec 2010
Posts: 3

I am using MQ 7.5 Yes, I have installed Telemetry service and it is up and running.
I have tested using Java client provided in M2M package it works fine, I am able to connect to MQ server and publish messages.

Have you tested your setup with the MQTT Client Utility included with MQ Explorer - Yes I have done this. I am able to connect and perform Pub Sub on topics.

my MQ running locally - MQ is running in the same machine where my deploying the Android emulator.

Are you running your Android device inside (WiFi) or outside (3G/4G) of your network? - I m running Android emulator in my PC and my PC is using Wifi. - Did I get your question rite ?

Thanks [/b]
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Mar 10, 2014 12:20 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The MQTT daemon also acts as a lightweight HTTP server. You might see if you can get the browser running in the Android Emulator to reach the same MQTT hostname/port #.

This will allow you to verify that the network configuration that the Android emulator has allows it to reach the MQTT port, rather than having to worry that something in your code is wrong.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Mon Mar 10, 2014 12:35 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3252
Location: London, ON Canada

Pearl wrote:
I m running Android emulator in my PC and my PC is using Wifi.

- Does the emulator allow outbound connections?
- Windows likes to separate network interfaces, maybe you have a firewall issue.
- Is the queue manager running on the same PC as where you are running the emulator?
- Did you try connecting to Eclipse's Paho project at "tcp://m2m.eclipse.org:1883"

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Pearl
PostPosted: Mon Mar 10, 2014 1:45 pm    Post subject: Reply with quote

Newbie

Joined: 08 Dec 2010
Posts: 3

From your comments I understand I need to correct network settings in Emulator.

Tried following :
1.Unable to connect to internet from emulator - Opened browser to hit google it failed.
2.Opened browser and used the IP : 10.0.2.2:1883 ( Alias for local machine's loopback address ) - This worked . Browser opened IBM Messaging page.

Now in the process of understanding emulator's router redirection to allow outbound TCP. Shall post once I get this cleared.

Thanks for putting me on rite direction.
Back to top
View user's profile Send private message
DP1234
PostPosted: Tue Jul 22, 2014 6:45 am    Post subject: Reply with quote

Apprentice

Joined: 25 May 2014
Posts: 40

Hi all.,
I am working on MQTT protocol implementation...am new to it...i could not find telemetry option on Queue Manager..How do i import Telemetry service to my existing MQ.

My MQ version is 7.5.0.1

Thanks in advance
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jul 22, 2014 7:00 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You have to have installed the Telemetry feature.

You might want to play with the developer VM of MessageSight as well.
Back to top
View user's profile Send private message
DP1234
PostPosted: Tue Jul 22, 2014 7:16 am    Post subject: Reply with quote

Apprentice

Joined: 25 May 2014
Posts: 40

mqjeff wrote:
You have to have installed the Telemetry feature.

You might want to play with the developer VM of MessageSight as well.


Is it possible update that feature in my current MQ..? if so how can i do that?
Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Telemetry / Low Latency Messaging / Everyplace » Android client for MQTT
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.