TRB142 do not have a feature which would allow it to send serial data over MQTT. This would require additional development.
But you could try making a custom scripts which for example would log serial data to file, and then another script would take that info and with the help of mosquitto package you could try and send that data over MQTT.
Here are some ideas how those scripts could potentially look like:
- Logging serial data:
microcom /dev/rs232 > /tmp/serialtomqtt.txt
- Sending data over MQTT:
if [ -s /tmp/serialtomqtt.txt ]
mosquitto_pub -h 192.168.1.244 -p 8800 -m "$(cat /tmp/serialtomqtt.txt)" -t testas
echo -n "" > /tmp/serialtomqtt.txt
mosquitto_pub -h 192.168.1.244 -p 8800 -t testas -m Nothning_Received
You might need to install mosquitto package via opkg.
Please, keep in mind this is only a theory and we are not sure if this solution will work, so please test with "pinch of salt".