#  Need Help with 4G Hat for Raspberry Pi 0

**URL:** <https://forum.core-electronics.com.au/t/need-help-with-4g-hat-for-raspberry-pi-0/19821>\
**Category:** Uncategorized\
**Created:** [30 April 2024 06:56 UTC](https://forum.core-electronics.com.au/t/need-help-with-4g-hat-for-raspberry-pi-0/19821 "2024-04-30T06:56:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simone270504](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Simone270504](https://forum.core-electronics.com.au/u/Simone270504)\
**Post date:** [30 April 2024 06:56 UTC](https://forum.core-electronics.com.au/t/need-help-with-4g-hat-for-raspberry-pi-0/19821/1 "2024-04-30T06:56:18Z")

</div>

Hello to everyone,  
I hope you’re all having a great day! I am currently trying to set up a 4G hat [SIM7600X 4G HAT(B)] for my Raspberry Pi 0, and I am following the guide found [here:](https://forums.raspberrypi.com/viewtopic.php?t=224355)

I have followed all the instructions carefully, but I have encountered an error that I cannot seem to resolve. When I enter the command `sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='ibox.tim.it',ip-type=4" --client-no-release-cid` in the terminal, I receive the following error message:

[https://imgur.com/XFplRXr](https://imgur.com/XFplRXr)  
[https://pastebin.com/aZ6C09M0](https://pastebin.com/aZ6C09M0)

I have tried searching for a solution to this error message, but I have not been successful. I was wondering if anyone in this community could help me out. I would greatly appreciate any advice or guidance you can provide.

### Troubleshooting Attempts

I have attempted to connect using SIM cards from the Italian providers TIM and Wind, which offer data services, but encountered issues with both. Interestingly, when they switched to a Vodafone SIM card that supports both data and voice calls, they were able to connect without any problems. This leads them to wonder if there is a distinct process for connecting data-only SIMs, such as those from TIM and Wind, compared to SIMs that support both data and voice calls, like the Vodafone SIM they used.

Thank you in advance for your help!

Best regards,

- Simone

---

<div class="post-metadata">

**Author:** ![Pixmusix](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/pixmusix/32/9719_2.png) [@Pixmusix](https://forum.core-electronics.com.au/u/Pixmusix)\
**Post date:** [30 April 2024 07:49 UTC](https://forum.core-electronics.com.au/t/need-help-with-4g-hat-for-raspberry-pi-0/19821/2 "2024-04-30T07:49:56Z")

</div>

Hey Simone.

Welcome to the forums.  
Good to have you with us.

4G networks can be super tricky.

The first thing I’d want to check is the contents of raw\_ip file.  
You’re looking for a provider IP, but often it defaults to “127.0.0.1”.  
It should also contain some kind of Auth Keyword like “1” or “Y” or “OK”.  
Looking at your guide, the command you want is

```bash
# "cat" gets a list of prams and writes the contents to standard-output
cat /sys/class/net/wwan0/qmi/raw_ip

```

You’re welcome to paste it here but just scan through it to make sure it doesn’t contain anything you consider to be private or personal information.

Hope we can get this working for you.  
Pix ❣

---

<div class="post-metadata">

**Author:** ![Simone270504](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Simone270504](https://forum.core-electronics.com.au/u/Simone270504)\
**Post date:** [2 May 2024 11:43 UTC](https://forum.core-electronics.com.au/t/need-help-with-4g-hat-for-raspberry-pi-0/19821/3 "2024-05-02T11:43:43Z")

</div>

Hello Pix,  
thank you very much for your response. Following the guide, there is a part where it tells me to set raw IP to yes:

> sudo ip link set wwan0 down  
> echo ‘Y’ | sudo tee /sys/class/net/wwan0/qmi/raw\_ip  
> sudo ip link set wwan0 up

I have also verified with a “cat” command that raw\_ip is set to Y, but in any case, I still encounter the same error.

---

<div class="post-metadata">

**Author:** ![Samuel](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/samuel/32/11763_2.png) [@Samuel](https://forum.core-electronics.com.au/u/Samuel)\
**Post date:** [6 May 2024 06:12 UTC](https://forum.core-electronics.com.au/t/need-help-with-4g-hat-for-raspberry-pi-0/19821/4 "2024-05-06T06:12:25Z")

</div>

Hey Simone,

A few generic troubleshooting suggestions to check everything is correct up to this point:

Use `ls /dev/cdc-wdm0` to check that your device is showing up in the correct location. This will list the available devices in this path and the HAT should be listed here.

Is the APN correct? Here you’re using `ibox.tim.it` which would be correct for the Italian TIM provider but may need to be changed if your using WIND instead.

I’m not super familiar with these 4G HATS so hopefully someone can jump in with some better advice but at least this will cover any command line syntax related issues.

---

<div class="post-metadata">

**Author:** ![Simone270504](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Simone270504](https://forum.core-electronics.com.au/u/Simone270504)\
**Post date:** [6 May 2024 12:50 UTC](https://forum.core-electronics.com.au/t/need-help-with-4g-hat-for-raspberry-pi-0/19821/5 "2024-05-06T12:50:46Z")

</div>

Hi, thanks so much for the reply.  
Sisi, the name is correct. I already checked it before.  
actually just today I found a way to make it work, even if it’s all absolutely illogical.  
basically after having followed the entire procedure as per the manual:

- Run sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net=‘net-raw-ip|net-no-qos-header’ --wds-start-network=“apn=‘ibox .tim.it’,ip-type=4” --client-no-release-cid
- Run sudo ip link set wwan0 down and then up again (note that if I do it first it doesn’t work)
- finally I relaunch sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net=‘net-raw-ip|net-no-qos-header’ --wds-start-network=“apn=’ ibox.tim.it’,ip-type=4” --client-no-release-cid.

So my chain of commands is this:

> sudo systemctl unmask ModemManager.service  
> sudo systemctl disable ModemManager.service  
> sudo systemctl stop ModemManager.service  
> sudo ip link set wwan0 down  
> echo ‘Y’ | sudo tee /sys/class/net/wwan0/qmi/raw\_ip  
> sudo ip link set wwan0 up  
> sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net=‘net-raw-ip|net-no-qos-header’ --wds-start-network=“apn=‘ibox.tim.it’,ip-type=4” --client-no-release-cid  
> sudo ip link set wwan0 down  
> sudo ip link set wwan0 up  
> sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net=‘net-raw-ip|net-no-qos-header’ --wds-start-network=“apn=‘ibox.tim.it’,ip-type=4” --client-no-release-cid  
> sudo udhcpc -i wwan0.

I can’t understand the logic of this but ok

---

<div class="post-metadata">

**Author:** ![Samuel](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/samuel/32/11763_2.png) [@Samuel](https://forum.core-electronics.com.au/u/Samuel)\
**Post date:** [8 May 2024 02:02 UTC](https://forum.core-electronics.com.au/t/need-help-with-4g-hat-for-raspberry-pi-0/19821/6 "2024-05-08T02:02:12Z")

</div>

Hey @Simone270504,

Working with 4G like this is always a tricky thing to do. If that solution works for you then I would consider that a success.

I can’t make sense of why those commands in that specific order would work either but a win is a win, well done!

---

<div class="post-metadata">

**Author:** ![Simone270504](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@Simone270504](https://forum.core-electronics.com.au/u/Simone270504)\
**Post date:** [20 May 2024 12:08 UTC](https://forum.core-electronics.com.au/t/need-help-with-4g-hat-for-raspberry-pi-0/19821/7 "2024-05-20T12:08:45Z")

</div>

The company I work for has just changed service provider. 🙄 Now, even with the new SIM cards, this trick doesn’t work.  
Any ideas?

---

<div class="post-metadata">

**Author:** ![Samuel](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/samuel/32/11763_2.png) [@Samuel](https://forum.core-electronics.com.au/u/Samuel)\
**Post date:** [22 May 2024 01:50 UTC](https://forum.core-electronics.com.au/t/need-help-with-4g-hat-for-raspberry-pi-0/19821/8 "2024-05-22T01:50:41Z")

</div>

Hmmm that’s a pain.

If you are forced into using a new provider it couldn’t hurt to go back to square one and start the setup process again.

Maybe that will catch anything that gave you trouble the first time through and wouldn’t be a bad idea to make sure your new SIM has the best chance it can get to work.
