Modified source for Hologram CLI, want to build from scratch

Hi,

I’m trying to sniff the AT command messages sent from the Hologram CLI to the modem, as I want to eventually switch over to issuing the same AT command messages using UART.

I’m trying to modify the logging callback as suggested here. But when I make any modifications (e.g. inserting print statements), I see no difference - probably because I’m building the local source incorrectly or not actually building the source at all.

What’s the right way to go about building a local version of the Hologram CLI?

Can you post a code example its hard to really diagnose anything without something to go off of.

If you are curious about how the cli works its all open source and the cli particularly is done using these scripts: https://github.com/hologram-io/hologram-python/tree/develop/scripts

and the logging is set here: https://github.com/hologram-io/hologram-python/blob/develop/scripts/hologram#L147

Yeah and you can just run run with -vv to log everything to the console.

@Reuben exactly what I was looking for, thanks :slight_smile:

Now I’m running into a separate issue …

From the command line, I run sudo hologram send "hello world" -vv and get a verbose output which includes the AT commands being sent to the modem. When I mimic the exact same command sequence using screen /dev/ttyUSB1 (using a raspberry pi), I get a +CME ERROR: Operation not allowed.

Specifically, the command sequence:

AT+USOCR=6
AT+USOCO=0,"cloudsocket.hologram.io",9999
AT+UDCONF=1,1
AT+USOWR=b'0,66,"[edited]"'

succeeds per the verbose output from sudo hologram send "hello world" -vv but, when I enter the commands manually through screen /dev/ttyUSB1, each step returns OK except for the final write command which returns a +CME ERROR: Operation not allowed. and the socket immediately closes.

Any ideas on why this might be happening?

the b' is a python artifact. get rid of that and the final '

P.S. There’s actually some authentication information in that line so I edited your post

that works, thanks :slight_smile:

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