Third party app, send/receive SMS

I’m looking to write a custom application to run on a TRB246 that will need to send and receive SMS messages.

I have used the API successfully from the application running on a LAN connected device, but wondered if there are alternative methods when I have the app running on the TRB246 directly?

Hello,

It is possible to run API calls directly on the device itself. You can use the same API structure you’ve already tested from a LAN connected device. For example, to send an SMS directly from the device, you can use:

api post /messages/actions/send '{"data":{"number":"string","message":"string","modem":"<string>"}}'

"modem" parameter can be found with the following command:

cat /etc/board.json | jsonfilter -e '@.modems[0].id'

This approach allows your custom application running on the TRB246 to send and receive SMS messages without relying on an external client.

Best regards,

Thank you for the help, that’s a really useful command.

I have managed to get new received message notifications using ubus which seems to be working well.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.