Injecting Data via SMS from NOVA to Hologram Cloud Router

Hi,

I’d like to send data via sms from nova to the cloud router (my use case is for deployment in 2G-only area).

There are some online docs, but I haven’t fully comprehended them:

https://hologram.io/cloud-services-router-api-documentation-beta/

It seems like I can do this by issuing direct AT commands to the uBlox modem? Are there any CLI/Python SDK commands that could achieve this?

Thanks

It should be possible if you configure things properly, check: https://hologram.io/docs/guide/cloud/data-router/


As you can see from the picture when you send an SMS you can trigger a route using SMSOVERIP or SMS as for extracting the data from the SMS message that I will have to do some investigating about

Hi Dom,

Thanks for your reply. I’ve tried SMSOVERIP too, but I had an impression that the data payload is actually (1) sent via TCP/IP from NOVA to the Hologram Cloud server. (2) Subsequently, the server routes that out to another SMS sender service. Please correct me if I’m wrong.

For my case, I need the (1) step to be done via SMS instead…

I found a solution to do it via AT commands:
https://hologram.io/using-at-commands-with-the-huawei-e303/
But not sure how to read the data from the server/Hologram Route Service side

Thanks!

ah ok correct me if I am wrong about this but you want to do this:
Nova → send SMS → Hologram Receive SMS → Processed by Cloud Router…

AFAIK we do not have anything like that sort of service but it should be possible. For starters you should be able to send AT commands via the python SDK using this AT commands from the link in your post.

Unfortunately this interface isnt currently well documented in our sdk but this is what you would use to send it: hologram-python/Modem.py at master · hologram-io/hologram-python · GitHub

so something like:

from Hologram.HologramCloud import HologramCloud

hologram = HologramCloud(dict(), network='cellular')
hologram.network.modem.set("CMGW", "Number")
hologram.network.modem.serial_port.write("your message")

I think you would have to receive that message using a service or a device that would then forward it on to the cloud router. Not exactly the best setup but again AFAIK we don’t have a phone number tied to routing messages to our cloud services.

Hi Dom,

Right, that’s exactly what I wanted. Thanks!

I saw this number: 310000202 mentioned in the url https://hologram.io/cloud-services-router-api-documentation-beta/. Should I direct my message to that number? I did it for the AT commands, but apparently in your python snapshot that number is not explicitly written?

Just to clarify, my application is actually as following:
Nova → send JSON payload via SMS → Hologram / Router → external databse
I thought I could achieve this by doing the following:

(1) Nova-side
(a) either send the SMS-es via AT commands to 310000202 or (b) write your python code

hologram.network.modem.serial_port.write(“your message”)

(2) Hologram dashboard side
configure routing to forward my message to a custom webhook URL (this will the POST url for my external database)

I think I might have missed something out as you mentioned something about having another service in your last paragraph.

Thanks for your helpful advice by the way, appreciate it!

Huh I didn’t know we had that service haha. I will check in that it is still running since that documentation is not very recent… That number is not anywhere I have seen in any of our code though I am much newer than some of the other engineers.

I will look into this and get back to you but if we do still have that service running than what your are trying to do should be possible the way you describe. Just make sure that the number also has the country code so it should be like +1310000202 I believe

Just got word on this service. It is still active but the number has changed. Here is the product teams blurb:

To send an SMS to the dashboard:
Register our Hologram Cloud internal SMS phone number (+447937405250) as the recipient of the text instead of your personal mobile number.

Setting up a route:

  1. From the Hologram Dashboard, click ‘Routes’ on the side nav
  2. Add a new SMS Route
  3. Enter SMS_DO as the topic
  4. Enter your personal phone number with country code as recipient phone
  5. Try sending SMS to our Hologram Cloud SMS number (+447937405250) from the device
  6. SMS should appear in your device data log and forward to your phone

Let me know if you run into any problems :smiley:

1 Like

Hi Dom,

Thanks for your help!

Just wondering, since I’m not based in the US, do you know how will the sms fee works? I saw $0.19/sms lying somewhere in your website, does that apply here?

I’ll try your setup!

The depends on the plan you have active for the SIM you are sending SMSs from. you can go in and check the cost in the dashboard

1 Like

Hi Dom,

Sorry for troubling you again. I tried your python code, but got this error instead upon execution of hologram.network.modem.set(“CMGW” …)

(‘Error’, [’+CME ERROR: unknown’])

This AT commands work for me (are these equivalent to your python code?):
AT
AT+CMGF=1
AT+CMGW=“phone number” (returns a +CMGW:X)
AT+CMSS=X

Also, I presume the python sdk works with non-hologram sim cards?

Thanks,
Ed

Yes those commands should be the same, sorry I forgot the ‘+’

The serial write is because doing the AT command short hands like modem.set/read etc. will prepend the everything with AT last I checked.

I don’t believe the SDK will work out of the box with 3rd party sims, I think you will have to change the APN in the chatscript to whatever the carrier provides you with. This is the default chatscript the SDK uses:

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