Conversion from Ascii to Decimal/hexadecimal

Asked by Venkates Velayutham

Hi,
We are using modem AT$MSGSND(enfora modem) command to send data through wireless modem to mosquitto broker running on the internet. Since AT$MSGSND command can send only ASCII data, we need to convert some of the decimal/hexadecimal values that are sent as part of the message(to mosquitto broker) to ASCII. So we need to convert these converted ASCII values(only the decimal and hexadecimal values and NOT the topic and message values) at the mosquitto broker end back to decimal/hexadecimal value. We would like to see if we need to change the mosquitto broker code for this requirement or is there a way where we can attach a handler code to broker to do this conversion.

Thanks,

Venky

Question information

Language:
English Edit question
Status:
Answered
For:
mosquitto Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Roger Light (roger.light) said :
#1

Hi Venky,

This is the kind of task that would be well suited to a "subscribe-process-publish" style client. There's an overview from around slide 4 on http://www.slideshare.net/andysc/the-house-that-twitters (which is worth watching in its entirety anyway), but essentially your client would subscribe to the raw AT commands, do the conversion from ASCII and republish the message on a new topic.

Don't forget, the broker, as the name suggests, is just a means of getting messages from publishing clients to other interested (subscribing) clients. It never does anything with the messages themselves.

Cheers,

Roger

Can you help with this problem?

Provide an answer of your own, or ask Venkates Velayutham for more information if necessary.

To post a message you must log in.