mqtt

MQTT-SN on Raspberry pi3 , 6lowpan over BLE

南楼画角 提交于 2019-12-23 03:11:09
问题 I'm trying to set a MQTT-SN broker (rsmb) ,and using several pi3 as clients. First , I will build a 6lowpan over ble connection. Setting pi3 (RASPBIAN JESSIE kernel v4.4) sudo su hciconfig hci0 reset modprobe bluetooth_6lowpan echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable hciconfig hci0 leadv BLE gateway (Ubuntu 14.04) sudo su hciconfig hci0 reset modprobe bluetooth_6lowpan echo 35 > /sys/kernel/debug/bluetooth/6lowpan_psm echo 1 > /proc/sys/net/ipv6/conf/all/forwarding echo "connect

Content-Type alternative in MQTT

痴心易碎 提交于 2019-12-23 01:28:40
问题 I am Working on MQTT communication using Paho and Mosqitto. We have to support both model of serialization - xml and json. So I am looking How to identify the content type or payload type in MQTT. Is there something similar HTTP Content-Type in MQTT to identify it quickly ? Content-Type : application/json Content-Type : application/xml Thanks 回答1: No, MQTT payloads are just byte arrays and there is no space in the headers (because MQTT is designed to be as light weight as possible on the

Acknowledgement on publish - MQTT

a 夏天 提交于 2019-12-23 01:13:13
问题 How to identify whether the publish to a topic was success or not. Is there any way to get acknowledgement on publishing to a topic. If there is any connection loss during publish between the clients( Publisher/Subscriber) how to handle it. I don't want the subscriber to send an ack to specific topic in the publishing end after receiving the pay_load. Here is my ruby code: Assume, I have created clients (@client) and configured on both sides. Publish def publish_it @client.publish('test/hai',

updating UI from a C function in a thread

主宰稳场 提交于 2019-12-22 18:44:09
问题 I am using a library called libmosquitto in an iPhone app. The library is written in C. It receives push notifications and therefor runs in a thread. I want to take the data it receives, and display it in a UITableView, however ( I think) I have to write the callbacks which libmosquitto uses as C functions rather than Objective C methods, so I cannot access 'self' in order to do: [self performSelectorOnMainThread:@selector(hideActivityViewer) withObject:nil waitUntilDone:NO]; Anyone have

How to work with MQTT in Wildfly

帅比萌擦擦* 提交于 2019-12-22 17:53:57
问题 I am working on a platform to monitor and control devices which use MQTT for the communication layer. I use REST endpoints for the Angular2 based SPA Web. The backend is developed in JEE using WildFly which support out of the box the MQTT protocol through is JMS Broker(Active MQ). I am new in JEE and don’t know a lot of things: - I have never used the JMS System - I can’t find any information o tutorial to point me in the right way to get MQTT messages through a JMS Application. Can you help

How to Produce from MQTT and consume as MQTT and JMS in ActiveMQ

丶灬走出姿态 提交于 2019-12-22 09:55:22
问题 I have a setup where messages are produced as MQTT to ActiveMQ. I have two consumers one as JMS and another MQTT. When I am publishing message as JMS Message to the topic "foo", I am receiving the messages at both JMS and MQTT consumers, but when I am publishing as MQTT on the same topic I receive the message only on MQTT consumer and nothing at all is received at JMS consumer. Is there something I need to do specifically when publishing as MQTT to be able to consume as MQTT as well as JMS.

Programmatically setting access control limits in mosquitto

心已入冬 提交于 2019-12-22 09:39:11
问题 I am working on an application that will use mqtt. I will be using the python library. I have been leaning towards using mosquitto but can find no way of programmatically setting access control limits for it. The application I'm writing needs to be able to differentiate between users, and only allow them to subscribe to certain topics. The current solution looks like this is done from a config file. Is there a scalable solution to access control limits in mosquitto? If not, do you know of a

Cannot receive already published messages to subscribed topic on mqtt paho

為{幸葍}努か 提交于 2019-12-22 08:21:45
问题 I'm using paho to send and receive mqtt messages. So far it has been no problem to send the messages. I have problems with receiving them.My code is: package BenchMQTT; import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; import org.eclipse.paho.client.mqttv3.IMqttToken; import org.eclipse.paho.client.mqttv3.MqttCallback; import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttMessage; import org.eclipse.paho.client.mqttv3.MqttClient; public class

Integrating MQTT with GCP using IOT adapter and google pub/sub api in python

蹲街弑〆低调 提交于 2019-12-22 01:14:42
问题 Integration with Cloud Pub/Sub APIs from App Engine Standard I am working on developing a Google app engine app in standard Python environment. For some portions of the code, I need to integrate with Google Cloud pub/sub APIs. As mentioned here, Pub/Sub can only be integrated in the App Engine flexible environment (BTW it is also only in alpha). Can someone please describe how to integrate with Pub/Sub in the App Engine Standard environment? My use case description I am trying to integrate

MQTT over websocket in python

主宰稳场 提交于 2019-12-21 21:56:05
问题 is there any support in python to subscribe on mqtt broker with port 8080 import sys import paho.mqtt.client as mqtt def on_connect(mqttc, obj, flags, rc): print("rc: "+str(rc)) def on_message(mqttc, obj, msg): print(msg.topic+" "+str(msg.qos)+" "+str(msg.payload)) def on_publish(mqttc, obj, mid): print("mid: "+str(mid)) def on_subscribe(mqttc, obj, mid, granted_qos): print("Subscribed: "+str(mid)+" "+str(granted_qos)) def on_log(mqttc, obj, level, string): print(string) mqttc = mqtt.Client()