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
314 stars 178 forks source link

Client CONNECT sending will topic and message not working #248

Closed IzacPS closed 2 years ago

IzacPS commented 2 years ago

I'm implementing the connection setup as described in the specifications for mqtt-sn 1.2. When connecting, I receive WILLTOPICREQ but when I send the will topic the client is disconnected and the error "Error: MQTTSNGWClientRecvTask ard0 is not connecting." shows. gateway error I checked the packets but I can't see no errors.

My gateway.conf file

GatewayID=1 GatewayName=PahoGateway-01 MaxNumberOfClients=30 KeepAlive=60 -#LoginID=your_ID -#Password=your_Password

BrokerName=mqtt.eclipseprojects.io BrokerPortNo=1883 BrokerSecurePortNo=8883

-# -# CertsKey for TLS connections to a broker -#

-#RootCAfile=/etc/ssl/certs/ca-certificates.crt -#RootCApath=/etc/ssl/certs/ -#CertsKey=/path/to/certKey.pem -#PrivateKey=/path/to/privateKey.pem

-# -# When AggregatingGateway=YES or ClientAuthentication=YES, -# All clients must be specified by the ClientList File -#

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

ClientsList=/path/to/your_clients.conf PredefinedTopicList=/path/to/your_predefinedTopic.conf

-#============================== -# SensorNetworks parameters -#============================== -# -# UDP | DTLS -#

GatewayPortNo=10000 MulticastPortNo=1883 MulticastIP=225.1.1.1 MulticastTTL=1

-# -# UDP6 | DTLS6 -#

GatewayIPv6PortNo=10000 MulticastIPv6PortNo=1883 MulticastIPv6=ff1e:feed:caca:dead::1 MulticastIPv6If=wlp4s0 MulticastHops=1

-# -# DTLS | DTLS6 -#

DtlsCertsKey=/etc/ssl/certs/gateway.pem DtlsPrivKey=/etc/ssl/private/privkey.pem

-# -# XBee -#

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

-# -# LoRaLink -#

BaudrateLoRaLink=115200 DeviceRxLoRaLink=/dev/loralinkRx DeviceTxLoRaLink=/dev/loralinkTx

-# -# Bluetooth RFCOMM -#

RFCOMMAddress=60:57:18:06:8B:72.*

-# -# LOG -#

ShearedMemory=YES

ty4tw commented 2 years ago

Hi IzacPS,

Thank you for your contribution. I'll fix it soon.

anshul7z commented 1 year ago

Hi I am not able to find these changes in the master branch. When we can se these changes in the master branch?

trivialkettle commented 7 months ago

Issue still exists on master. e263dc3 was only pushed to develop.