Using the sodaq sara aff r412m (updated to the latest firmware) and trying the mqtt sketch (modified and adding r4x.mqttSetAuth) I noticed that with some services (example cloudmqtt) it works and with others instead (allthingstalk, ubitodots, cayenne) because they have set a username greater than 30 characters which is the limit of the field (both for username and password)
The latest firmware for the R412 is the M01.10 A02.14
Unfortunately, the 30 character limit is a restriction Ublox have set in their firmware. This can only be changed if they release new firmware with a fix for this.
We have also run into a number of problems with the built in MQTT stack on the R412. I would recommend that you look for a MQTT library that works directly over a TCP socket.
the problem is only the login at the cloud service, the library where it connects works perfectly, transmits data quickly and easily and publishes everything with mqttPublish
This uses a direct MQTT implementation over TCP sockets. The main limitation at this point is the size of the topic payloads which are currently limited to 127 bytes.
Thanks for the information, I will consider this implementation for the next projects.
I solved using cloudmqtt which sets username and password <30 characters and then I realized all the graphical interface (which would have given me the other online services ready) with node-red.
I don’t think we have an example for that. The main difference is that there are additional provisioning and configuration steps required in order to setup a secure TCP connection.