Uknown Error for .sendMessage() Raspberry Pi


I am using a Huawei e303 and a raspberry pi to attempt to connect to the Hologram cloud. I believe I have that connected correctly. The e303 shows it is connected and my lsusb shows the following (attached image).

When I try to send a message however using the tutorial script or commands from the SDK it returns an “Unknown error” or a -1. I have attached my script below. Since it is unknown I don’t really know where to start looking as far as debugging goes. (Some commands are commented out in the script shown. These commands() throw errors such as “AttriubutError: ‘NoneType’ object has no attribute ‘connect’”. I was told in another thread that I do not need this command since my e303 is connected to the Hologram network so I removed them. I am assuming that is normal for using the e303 and the hologram network.)

I would appreciate any help you can give on how to fix this error and how to start sending messages to the hologram cloud.


Can you post the output of ifconfig and route?

Thanks for the reply Reuben!

Here it is. It doesn’t look like I have anything connected but I am not sure what to add for the e303 connection. If I enable the wifi so I have a wlan0 connection it doesn’t seem to use the e303 at all. Do you know what I need to do?


Ah yeah, so you can add it by typing sudo dhclient eth1

This tutorial has info at the end on how to make it automatically mount when the modem is plugged in: Connect Raspberry Pi to Cellular with Huawei E303 Modem -

Sorry, I am a little confused.

So I have followed that tutorial but I believe in order to make it show up as eth1 I have to switch the e303 mode so that it is not in storage mode (i.e. not in 1f01 but in HiLink mode or 12d1:14db). But when I do that I get errors saying it cannot find the modem. So in another thread we decided it needed to be in storage mode so Hologram would configure the connections on its own instead of using the modem website.

Due to that I don’t think I can have both. I can either have it in the hologram storage mode or I can change the mode and configure it through the website but then get a modem error. Am I missing something that would combine them both? Or I am completely off base?


Hmm yeah I thought the conclusion of that other thread was that you were going to keep it in HiLink mode and use network agnostic mode in the SDK.

The error that you’re getting is because you are setting network='' in your constructor so the SDK is not managing the network and so the connect function won’t work.

If you don’t want to use HiLink mode, then do network='cellular' in there and it should use PPP to setup a network connection and send the message each time.

P.S. You would need to put those connect calls back after doing that I think

Gotcha. Ok, so to summarize I can either keep it in HiLink mode or storage mode (sorry I am blanking on a better name).

If I go to HiLink mode I will keep the network as ’ ', not use connect calls, and simply call send message on a Hologram cloud object.

If I put it in the other mode I need to specify network as ‘cellular’, use connect calls, and then call sendMessage on the Hologram cloud object.



I’d probably call it serial modem mode. It starts in storage mode but then when you run the modeswitch command it enables that serial port for it.

It worked!! You are the best!


Nice, glad to hear it. Happy to help out.