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 179 forks source link

Authenticated Messages #216

Closed bartremans closed 3 years ago

bartremans commented 3 years ago

Hi,

I can't find any documentation using LoginID and Password in gateway.conf of the MQTT-SNGateway.

I would like to send MQTT-messages to the Broker with a fixed username and password (the Broker requires this). The Broker is using a password-file with a user and password (test:test). I've set both the LoginID and Password in gateway.conf also to "test". A regular MQTT-client with username/password can connect to the Broker. But the MQTT-SNGateway always gives an error that the client is not authorized to connect?

When using without authentication (allow_anonymous is true and no password_file specified in the broker config-file) the MQTT-SN-client can connect.

I don't understand the use of LoginID and Password in gateway.conf. Is it used to create authenticated messages to the broker or? And if not, how would you authenticate the messages to the broker?

Kind regards,

Bart