Hi, new member here, using RUT360.
I am trying to use a script and mosquitto_pub to send detailed mobile service stats into to my broker. MQTT publisher is enabled, configured, and responding properly with router/get topics from external requests.
I would like to script some extra data uploads using mosquitto_pub, but it appears to have been replaced with mqtt_pub which simply hangs whether called alone or with parameters. Is there a wiki or manual for mqtt_pub? I can’t find it.
I’ve also attempted to install mosquitto-client-ssl from opkg (How to use MQTT from CLI - I need to publish from CLI) but that fails too.
Thanks…
Hello,
The mosquitto-client-ssl should work fine. However, could you please clarify what ‘detailed mobile services stats’ are you trying to send to your broker?
I would suggest taking a look at data to server here. It is possible to send GSM and Mobile usage data to your broker over MQTT periodically without any additional scripts:
Kind Regards,
Hi
I now have achieved what I wanted, despite several difficulties.
Firstly, your update system is broken. ‘opkg update’ fails and returns an error “Downloading https://downloads.openwrt.org/releases/21.02.0/packages/mips_24kc/vuci/Packages.gz *** Failed to download the package”
Despite that I was able to install “opkg install moquitto-client-ssl libmosquitto-ssl” and get mosquitto_pub working.
I am now using a small script run every minute under cron to pull LTE staus using ‘gsmctl -E’ and send to my server with MQTT.
For your information…
#!/bin/sh
#
# get modem status and sent to monitor server via MQTT
#
server_url=“xxx”
server_port=8883
server_user=xxx
server_psk=“xxx”
# get comprehensive modem status
status=gsmctl -E
# extract JSON string
json=echo $status | sed 's/^[^{]*//;s/[^}]*$//'
mosquitto_pub -h $server_url --psk $server_psk --psk-identity $server_user --port $server_port -t router/gsmstatus -m “$json”
Hi
In order to see if your solution was better than mine, I just spent an hour looking everywhere for the Data to Server menu option - it would have been helpful if you had mentioned it is a package that needs to be installed in the RUT360.
Now I have Data to Server entry, and tried to Add a Data Sender. The menu looks nothing like either your post or the RUT360_Data_to_Sender page, and there are “No data sources available”.
At this time I’m giving up on your recommended solution as your instructions are either unclear of for a different device?
Thanks anyway.
Hello,
From the image, it seems that you are using an older firmware version.
If you would like to use new data to server functionalities, you will need to update the firmware of you device. The latest firmware for RUT360 can be downloaded from here. However, if you decide to update the device, please keep in mind that since your current firmware is at least 2 major releases older than the latest version, the recommendation is to update the device with ‘keep settings’ option disabled to avoid any potential migration issues. This means your current configurations, including third-party files like scripts, will be erased, but it will ensure a smooth update process.
Kind Regards,
My system Firmware version is RUT36X_R_00.07.04.5, Kernel version 5.4.229 and looking at the change log it definitely needs upgrading!
I have only had the device fro a couple of weeks so I thought it would be up to date. I’ll save my changes and do an upgrade in the next few days.
Thanks.
I have now updated to RUT36X_R_00.07.06.6 , and it is working well. I did a backup of my configuration, clean install, and restored the configuration. I hope this was correct.
I set up ‘Data to Server’ Type: GSM, Format type: json and am getting the data I require without any other customization.
The only question I have now is why does RSRP always say ‘No Signal’ on LTE?
Thanks
Steve
Hello,
Glad to hear that it is working properly now!
The red ‘no signal’ RSRP value in the WebUI simply indicates that the RSRP of your cellular signal is poor. I recommend checking our articles here and here to learn more about it.
Kind Regards,
This topic was automatically closed after 15 days. New replies are no longer allowed.