Paho is an Eclipse project has been created to provide scalable open-source implementations of open and standard messaging protocols like MQTT aimed at new, exisiting, and emerging applications for Machine-to-Machine (M2M) and Internet of Things (IoT).
Questions tagged [paho]
1173 questions
0
votes
1 answer
Does free Xively account causes QoS 1 or 2 publish failed?
My code (below) is working if I use QoS 0. But for QoS 1 or QoS 2. MQTTClient_publishMessage(...) failed.
Am I missing any configuration? Or, is it because I am using free XIvely account?
I use Paho API.
------------------------------- start of cut…

David Hsia
- 1
- 1
0
votes
1 answer
How to use the un-blocking method of MqttClient
When I try the below code to connect to the mosquitto broker, as you know, connecting to the broker might takes few seconds/minutes, and during that time when the button pressed to connect, it remains pressed till the connection established and when…

rmaik
- 1,076
- 3
- 15
- 48
0
votes
0 answers
connectWithResult method is undefined for MqttClient object
Below are my imports used in my java program. What I am trying to do is, to create a client of type MqttCient and then use the method connectWithResuls as follows
client.connectWithResult(opts);
the problem is eclipse underscores the lie mentioned…

rmaik
- 1,076
- 3
- 15
- 48
0
votes
2 answers
The IMqttClient class does not provide any mean to specify the client ID?
This class IMqttClient() allows you to create a client object with a callback to all possible events to happen, for an example
@Override
public void subscribe(String arg0) throws MqttException, MqttSecurityException {
// TODO Auto-generated…

rmaik
- 1,076
- 3
- 15
- 48
0
votes
2 answers
Paho JS can't connect to Mosquitto Server
When I try to connect to Mosquitto server through this JS, I receive this error:
WebSocket connection to 'ws://xx.xxx.xxx.xxx:1883/mqtt' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET
I tried from console and it works fine.
I…

Andrea T
- 3,035
- 4
- 23
- 39
0
votes
1 answer
The passwords is different and I can see the published messages?
In the below code snippet I declare a username and passqord for the subscription.
private final String userName = "user_1";
private final char[] password = "pass".toCharArray();
....
....
final MqttAndroidClient client_1 = new…

Amrmsmb
- 1
- 27
- 104
- 226
0
votes
2 answers
With the clear session flag set to FALSE, I am missing the published values
Is anyone has a logical explanation why despite I have the clear session flage = false I do not receive the updated published message I am subscribed to while i am not connected to the broker?
With the aorementioned flag set to false I ran my App,…

Amrmsmb
- 1
- 27
- 104
- 226
0
votes
1 answer
Regarding publishing a message using aho Android API
I followed some tutorial to know how to publish a message to the broker from Android device. Below is my attempt, and at this point, I did not find the methods provided in the tutorial like MqttDeliveryTokenAndroid it is not in the library.
Please…

Amrmsmb
- 1
- 27
- 104
- 226
0
votes
0 answers
The broker does not deliver the LWT message?
i have he following LWT topic and WT message
private final String WILL_TOPIC = "sensor_0_LWT";
private final String WILL_MSG = "LWT: Unexpected Connection Drop Down";
And i am subscribed to a topic named sensor_0 when I publish a message I receive…

Amrmsmb
- 1
- 27
- 104
- 226
0
votes
2 answers
How to stop receiving LWT retained message?
For testing, I have created a client with clean sessin = false and setWill(WILL_TOPIC, WILL_MSG.getBytes(), 1, true); and ran the App. Later, i set setWill(WILL_TOPIC, WILL_MSG.getBytes(), 1, false); when i run the App, i receive the previously…

Amrmsmb
- 1
- 27
- 104
- 226
0
votes
1 answer
The server DISCONNECT and I receive LWT message?
Isn't if the server did not receive any messages from the client within the (1.5) * KeepAlivetime and the client did not send any PINGREQ within the aforementioned period, the server should DISCONNECT?
If yes, why I am receiving LWT message which is…

Amrmsmb
- 1
- 27
- 104
- 226
0
votes
1 answer
Declaring a MqttClientPersistence object causes connection failure
In te below code I am trying to create a folder for persisted data. As you see I created private final String folder = "//temp"; and the object persistence. But the problem is when i run the App, i says Connection Failed, this message comes out from…

Amrmsmb
- 1
- 27
- 104
- 226
0
votes
2 answers
Synchronous or Asynchronous messaging over MQTT is called first
I have been reading this tutorial to learn the basics of Paho android Service API, and some where in the text i read as for client.connect(context, callback which has two methods onSuccess() and onFailure()
As mentioned, a synchronous client is…

Amrmsmb
- 1
- 27
- 104
- 226
0
votes
1 answer
Is the order of libraries set in the buildPath matters?
i am new to MQTT and paho Libs for Android. today I tried to create a simple connect example, as shown below, but what happens is that, I get error messages from logcat posted below despite there is no error in the code but at run time, either…

Amrmsmb
- 1
- 27
- 104
- 226
0
votes
1 answer
how to run GIT commands
I am new to Android Open Accessor AOA, and I wanted to download paho library designed for Android service.
I read this documentaion here, but it says in the section of Building from source that I have to apply this command
git clone…

Amrmsmb
- 1
- 27
- 104
- 226