# Balena OS + raspberry pi not working with Huawei dongle anymore

**URL:** <https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450>\
**Category:** balenaOS\
**Tags:** raspberrypi3\
**Created:** [January 14, 2020, 10:35am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450 "2020-01-14T10:35:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgirotto](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@tgirotto](https://forums.balena.io/u/tgirotto)\
**Post date:** [January 14, 2020, 10:35am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/1 "2020-01-14T10:35:10Z")

</div>

Hello,  
I think there might have been some breaking changes in the balena OS versions released in the last months that caused it to stop working on Huawei dongles that had always worked before. I’ve been having to go back to the old versions to have them work, so I thought of dropping a link to the exact product here:

[https://www.amazon.it/gp/product/B011YZZ6Q2/ref=ppx\_od\_dt\_b\_asin\_title\_s00?ie=UTF8&psc=1](https://www.amazon.it/gp/product/B011YZZ6Q2/ref=ppx_od_dt_b_asin_title_s00?ie=UTF8&psc=1)

It was working until June 2019, then something happened… any advice?

Thank you for the support!

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [January 14, 2020, 11:27am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/3 "2020-01-14T11:27:25Z")

</div>

Hi, for using the Huawei modem in new OS versions, you would need to add a NM connection profile for it.  
See here for details [https://www.balena.io/docs/reference/OS/network/2.x/#cellular-modem-setup](https://www.balena.io/docs/reference/OS/network/2.x/#cellular-modem-setup)  
Can you try this on a machine and let us know if that fixes your problem?

---

<div class="post-metadata">

**Author:** ![SplitIce](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SplitIce](https://forums.balena.io/u/SplitIce)\
**Post date:** [January 23, 2020, 1:12am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/5 "2020-01-23T01:12:06Z")

</div>

We had a similar issue. We reverted back to cdc\_ether.

Our BalenaOS (meta-balena) patch we appended follows:

```
diff --git a/usb_modeswitch.d/12d1:1f01 b/usb_modeswitch.d/12d1:1f01

index 84fa96e..c7a9b5f 100644

--- usb-modeswitch-data-20170806.orig/usb_modeswitch.d/12d1:1f01

+++ usb-modeswitch-data-20170806/usb_modeswitch.d/12d1:1f01

@@ -1,6 +1,6 @@

# Huawei E353 (3.se) and others

TargetVendor=0x12d1

TargetProductList="14db,14dc"

-#HuaweiNewMode=1

-MessageContent="55534243123456780000000000000011063000000100010000000000000000"

+HuaweiNewMode=1

+#MessageContent="55534243123456780000000000000011063000000100010000000000000000"

```

The change this reverts is a nasty change for deployed fleets since the mode only changes on dongle power cycle, we missed it in QA and only started seeing it after the first power outage ☹

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [February 6, 2020, 1:11pm UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/7 "2020-02-06T13:11:20Z")

</div>

@tgirotto @SplitIce this has now been reverted in release 2.47 so it uses again cdc\_ether by default so no need to do any additional changes.

---

<div class="post-metadata">

**Author:** ![SplitIce](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SplitIce](https://forums.balena.io/u/SplitIce)\
**Post date:** [February 6, 2020, 9:55pm UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/8 "2020-02-06T21:55:25Z")

</div>

@floion Thanks @brdrcol noticed the change in meta-balena in our team and reverted our patch. Looks good.

---

<div class="post-metadata">

**Author:** ![tgirotto](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@tgirotto](https://forums.balena.io/u/tgirotto)\
**Post date:** [March 6, 2020, 10:43am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/10 "2020-03-06T10:43:44Z")

</div>

@floion still not working with version 2.47.

 ![photo_2020-03-06 13.41.50](https://global.discourse-cdn.com/balena/original/2X/b/b8d842d24fe1aa887b915c80588e114d43d9b73a.jpeg)

Here is my gsm connection, as modified in the system-connections folder:

```auto
[connection]
id=soracom
type=gsm
autoconnect=true

[gsm]
apn=soracom.io
number=*99***1#
password-flags=1

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

```

---

<div class="post-metadata">

**Author:** ![chrisys](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/chrisys/32/1731_2.png) [@chrisys](https://forums.balena.io/u/chrisys)\
**Post date:** [March 6, 2020, 11:25am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/12 "2020-03-06T11:25:30Z")

</div>

Hey there @tgirotto, can you share any specific details about the problems you’re facing now? As @SplitIce confirmed the reverted change resolved their issue above, perhaps what you’re hitting is something else entirely.

What debugging steps have you tried so far? You could try `journalctl -u NetworkManager` from a terminal to the hostOS and see if that shows anything useful. Do you know if the modem is successfully establishing a connection to the cell network but not connecting to the internet, or is it not even getting that far?

---

<div class="post-metadata">

**Author:** ![SplitIce](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SplitIce](https://forums.balena.io/u/SplitIce)\
**Post date:** [March 7, 2020, 12:53am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/14 "2020-03-07T00:53:13Z")

</div>

The balena team also overrode the upstream change. This results in an effect the same as ours. In turn we have removed our patch and are back with the balena team on this one.

It’s now fine to use the latest balenaOS (or meta-balena-common).

---

<div class="post-metadata">

**Author:** ![tgirotto](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@tgirotto](https://forums.balena.io/u/tgirotto)\
**Post date:** [March 9, 2020, 7:33am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/15 "2020-03-09T07:33:09Z")

</div>

@chrisys unfortunately I do not have access to the physical device, so debugging is a little difficult. If it can help, I am actually using open balena, and the last working release for me was 2.46.1+rev1. Is there any repo where I can get a copy of that release and see whether it works?

Thank you!

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [March 9, 2020, 1:32pm UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/21 "2020-03-09T13:32:16Z")

</div>

@tgirotto You can download balenaOS releases from [https://www.balena.io/os/](https://www.balena.io/os/)  
The source code is here [https://github.com/balena-os/balena-raspberrypi/](https://github.com/balena-os/balena-raspberrypi/)

---

<div class="post-metadata">

**Author:** ![zvin](https://avatars.discourse-cdn.com/v4/letter/z/a5b964/32.png) [@zvin](https://forums.balena.io/u/zvin)\
**Post date:** [March 9, 2020, 1:37pm UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/22 "2020-03-09T13:37:33Z")

</div>

@tgirotto 2.46.1+rev1 for rpi3 is here [https://resin-production-img-cloudformation.s3.amazonaws.com/resinos/raspberrypi3/2.46.1%2Brev1.prod/image/balena.img.zip](https://resin-production-img-cloudformation.s3.amazonaws.com/resinos/raspberrypi3/2.46.1%2Brev1.prod/image/balena.img.zip)

---

<div class="post-metadata">

**Author:** ![tgirotto](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@tgirotto](https://forums.balena.io/u/tgirotto)\
**Post date:** [March 12, 2020, 10:16am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/24 "2020-03-12T10:16:29Z")

</div>

Ok I tried using the image posted by @zvin with the following settings in system-connections

```auto
[connection]
id=cellular
type=gsm
autoconnect=true

[gsm]
apn=soracom.io
number=*99***1#

[serial]
baud=115200

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

```

So far we know that:

- the modem works on a mac, so the modem and the sim card work. Also, there is connectivity;
- the raspberry pi could connect to wifi on balena cloud;
- the app on open balena that we are using is ok, because it is already being used by other devices;
- the configuration above works with other devices (we are using the exact same).

My self-hosted version of open balena seems to work, as I can access data about all the other devices in my fleet. No logs in the docker showing anything weird…

---

<div class="post-metadata">

**Author:** ![iamsolankiamit](https://avatars.discourse-cdn.com/v4/letter/i/a88e4f/32.png) [@iamsolankiamit](https://forums.balena.io/u/iamsolankiamit)\
**Post date:** [March 12, 2020, 10:34am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/25 "2020-03-12T10:34:39Z")

</div>

Hi Tgirotto,

Can you clarify that it does work on raspberry pi or not with the image provide before?  
Also it doesn’t matter what you are connected to, it should work the same with both openBalena and balenaCloud.

---

<div class="post-metadata">

**Author:** ![tgirotto](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@tgirotto](https://forums.balena.io/u/tgirotto)\
**Post date:** [March 12, 2020, 10:53am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/27 "2020-03-12T10:53:46Z")

</div>

Thanks for the support.

I tried using the image from the link above (2.46). It does not work, which is weird, because I have used exactly the same image in the past. I am attaching a screenshot of my current fleet. Maybe it can give more insight?

 ![Screen Shot 2020-03-12 at 1.52.37 PM](https://global.discourse-cdn.com/balena/original/2X/c/cadca2ecafcff69b0bb7e5845db0c5ae2dd8098b.png)

Since I have been trying for days now, I have tried configuring the image by @zvin above to work with ah18-spagna because I know that one works already, but the technician on the ground is telling me it only blinks in green, which means it’s looking for network…

---

<div class="post-metadata">

**Author:** ![iamsolankiamit](https://avatars.discourse-cdn.com/v4/letter/i/a88e4f/32.png) [@iamsolankiamit](https://forums.balena.io/u/iamsolankiamit)\
**Post date:** [March 12, 2020, 11:10am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/28 "2020-03-12T11:10:20Z")

</div>

Hi

As you can see from the docs, we don’t test this modem. You can try one of the supported modems instead. If you’d still like to debug the issue, we recommend you to connect the said device to wifi/ethernet and then shh into the device to get a better sense of why it’s not working by reviewing the system logs.

```auto
journalctl -u ModemManager

```

---

<div class="post-metadata">

**Author:** ![tgirotto](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@tgirotto](https://forums.balena.io/u/tgirotto)\
**Post date:** [March 12, 2020, 11:12am UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/29 "2020-03-12T11:12:47Z")

</div>

Mm I will see if I can have someone on the field connect it to a wifi. However, we have been using that exact modem for more than a year and it never created problems. I will write back in case we figure it out.

Thanks.

---

<div class="post-metadata">

**Author:** ![TJvV](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@TJvV](https://forums.balena.io/u/TJvV)\
**Post date:** [March 12, 2020, 12:00pm UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/31 "2020-03-12T12:00:56Z")

</div>

Hi,  
I have also been having issues with the new cellular setup using a Huawei E3131h-2 and E3533s-2 on Balena 2.47.0+rev1.  
I ended up reverting the E3533s-2 to cdc\_ether.  
It is important to note that I have never had the E3131h-2 as a cdc\_ether device.

What I noticed was that when running with just the dongle, ModemManager would quite often not see any devices (within a reasonable timeframe); when running with ethernet connected, it would much more often/faster detect the device.

What I have done now as a workaround for this issue, is to periodically (every 30 seconds) query ModemManager through dbus to check if it has any devices; if it doesn’t, I restart ModemManager (dbus query to systemd).  
For now this seems to work for me, YMMV.

---

<div class="post-metadata">

**Author:** ![tgirotto](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@tgirotto](https://forums.balena.io/u/tgirotto)\
**Post date:** [March 12, 2020, 12:33pm UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/32 "2020-03-12T12:33:07Z")

</div>

@zvin where can I find Balena OS 2.3x versions? is there a repo with all the old versions?

I have just tried connecting RPI 3B+ to wifi through open balena and it worked, which means it is something that has to do with network manager (I have tested every other bit of the system separately).

@TJvV how can I change cdc\_ether?

thank you

---

<div class="post-metadata">

**Author:** ![majorz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/majorz/32/639_2.png) [@majorz](https://forums.balena.io/u/majorz)\
**Post date:** [March 12, 2020, 1:35pm UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/34 "2020-03-12T13:35:22Z")

</div>

I just checked and unfortunately we do not list older OS versions for vanilla balena OS versions that are suitable for openBalena. I raised this to our product team as an issue now. Probably the easiest way to get an older OS version currently is by checking which versions are available in from our cloud dashboard and then download manually by modifying the URL from the latest. E.g. switch `https://files.resin.io/resinos/raspberrypi3/2.47.0%2Brev1.dev/image/balena.img.zip` to `https://files.resin.io/resinos/raspberrypi3/2.46.1%2Brev1.dev/image/balena.img.zip`.

---

<div class="post-metadata">

**Author:** ![TJvV](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@TJvV](https://forums.balena.io/u/TJvV)\
**Post date:** [March 12, 2020, 2:27pm UTC](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450/36 "2020-03-12T14:27:34Z")

</div>

I simply needed to add the correct usb\_modeswitch message in the udev rules.  
This way it overrides the usb\_modeswitch default.

In this case it was.

> #huawei e3533  
> ACTION==“add”, SUBSYSTEM==“usb”, ATTRS{idVendor}==“12d1”, ATTRS{idProduct}==“157d”, RUN+=“/usr/sbin/usb\_modeswitch -v 0x12d1 -p 0x157d -M ‘55534243123456780000000000000a11062000000000000100000000000000’”

You will need to modify the config.json as specified in the [documentation](https://www.balena.io/docs/reference/OS/configuration/#udevrules).

Note that this is similar to what @SplitIce did, just configured in a different place.

You can reload and trigger the udev rules through udevadm, but this won’t affect the dongle if it has already been configured. You will need to reconnect the dongle, or power cycle the whole device.

[Next page](https://forums.balena.io/t/balena-os-raspberry-pi-not-working-with-huawei-dongle-anymore/56450.md?page=2)
