eclipse / paho.mqtt-sn.embedded-c

Paho C MQTT-SN gateway and libraries for embedded systems. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
315 stars 178 forks source link

MQTT-SN Gateway over ZigBee #168

Closed Yamnkelani closed 4 years ago

Yamnkelani commented 4 years ago

Hi

I have an issue starting up my MQTT-SN Gateway over ZigBee

I downloaded the paho MQTT-SN gateway and attempted running the gateway over ZigBee. I simply configured the gateway as follows:

BrokerName=iot.eclipse.org
BrokerPortNo=1883
BrokerSecurePortNo=8883

ClientAuthentication=NO
AggregatingGateway=NO
QoS-1=NO
Forwarder=NO

PredefinedTopic=NO

GatewayID=1
GatewayName=PahoGateway-01
KeepAlive=900

# XBee
Baudrate=38400
SerialDevice=/dev/ttyUSB0
ApiMode=2

# LOG
ShearedMemory=NO;

However, when I run the gateway, I get the following error message

terminate called after throwing an instance of 'MQTTSNGW::Exception' what(): Can't open the sensor network.

I don't know what I am missing.

ty4tw commented 4 years ago

Hi,

iot.eclipse.org was move to mqtt.eclipse.org. So, change BrokerName=iot.eclipse.org to BrokerName=mqtt.eclipse.org

2019年11月15日(金) 16:02 Yamnkelani notifications@github.com:

Hi

I have an issue starting up my MQTT-SN Gateway over ZigBee

I downloaded the paho MQTT-SN gateway and attempted running the gateway over ZigBee. I simply configured the gateway as follows:

BrokerName=iot.eclipse.org BrokerPortNo=1883 BrokerSecurePortNo=8883

ClientAuthentication=NO AggregatingGateway=NO QoS-1=NO Forwarder=NO

PredefinedTopic=NO

GatewayID=1 GatewayName=PahoGateway-01 KeepAlive=900

XBee

Baudrate=38400 SerialDevice=/dev/ttyUSB0 ApiMode=2

LOG

ShearedMemory=NO;

However, when I run the gateway, I get the following error message

terminate called after throwing an instance of 'MQTTSNGW::Exception' what(): Can't open the sensor network.

I don't know what I am missing.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eclipse/paho.mqtt-sn.embedded-c/issues/168?email_source=notifications&email_token=AB3X2BCHWARFUMO4S5UO52LQTZCQTA5CNFSM4JNWQRMKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HZQ2KSQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3X2BFLG2PF5OQRUFQZXH3QTZCQTANCNFSM4JNWQRMA .

Yamnkelani commented 4 years ago

Hi .

I changed the broker name. It still throws the error

ty4tw commented 4 years ago

Hi, It might be a setting problem of XBee module. check the baudrate and API mode are same as gateway.conf.

Yamnkelani commented 4 years ago

I got it to work. I changed the "SENSORNET:=udp" to "SENSORNET:=xbee" on the makefile and rebuilt the gateway. Thanks

ty4tw commented 4 years ago

Hi,

You don't need to change the Makefile. Just enter make SENSORNET=xbee