Guide by Tim; 4G and GPS HAT For Raspberry Pi - Waveshare SIM7600X

So I tried it for l’arc.local and it doesn’t work. So only solution that works is in bashed with auto login. But that’s not the best because the script runs with every new opened terminal.

Still not a solution for turning on internet before login, but assuming you have autologin on, you could run the internet script by adding a button to the GPIO pins and running a script that awaits the button press at startup. this way you don’t need to put anything in bashrc

Hey Tim, I have an issue with the 4g hat connection. It connects to it on startup and have connection for about 5 seconds, then disconnects and has no internet connection. How do I fix this?

Another issue is that every time it starts the gps code, it restarts the 4G internet connection. Not sure why this is happening. Can they not run at the same time?

Hey Nathan,

Can you share your setup so we can help out (some images/code would be a great starting point)

Hi @Tim thank you for the resource it is very good .I have bought a new SIM7600X can please provide me resource how I can use the 4G network from the 4G hat to use it for internet browsing in raspberry pi

Thank you

A improvement to the installation commands would be to replace “pi” with “$USER”, that would make it generic.

1 Like

Hey mate :slight_smile:
I looked at the video and the comments. This guide looks very impressive.

In my case I am already using a HAT on my Raspberry Pi 4 model B for CAN communication.

Would this guide work with the 4G dongle of Waveshare ?

It is using the same 4G module but if I understood correctly, you are using the serial to send command to the SIM7600. With the dongle can we easily use the USB port to send the command instead ?

If yes, could you please describe how to do this ? I am beginer as a Linux user.

Thanks
Regards,
Pierre

1 Like

Hi @Pierre262828 - if you can manage to open a serial interface over USB then great! There’s a bit of ambiguity about whether the USB interface presents as a COM port. If it does, you ought to be able to select that COM port and proceed as normal.

Though this guide is set up specifically for using hardware UART. If you run into trouble, it looks like your dongle supports a hardware UART connection, but hopefully it won’t be necessary

1 Like

Hi Michael,

Thank you for your feedback. As I said I am not a Linux expert so I doubt I will be abble to open a serial interface over USB.
I was hoping there was a way to send command to the SIM7600 by USB.
If your application running on the Raspberry Pi needs to send a sms, what would be the way to do it with the USB dongle ?

My goal is to send some sensor data, I guess and other option is to use the internet connection but I need to have a server somewhere to receive the data… which I might struggle to setup

1 Like

I don’t know @Pierre262828 - it’s uncharted territory and outside the scope of this guide. Hopefully its a simple as selecting the new COM port and using the code as-written… but I’m unsure. If you decide to give it a crack please let us know how you go.

1 Like

Hello Michael,

Thank you for your feedback. As to your comments my request doesn’t look very straight forward. As I am a beginer in Linux I will not go this route.
I think my best chance is to try to use the 4G network and learn how to create a server and send data to it.
As my data is quite light (< 1 Go) I might use AWS as I heard it is quite cheap. Do you have any recommandation or tutorial on this ? I already looked some tutorials on Youtube.

Thank you again.
Best regards,
Pierre

1 Like

Hi Pierre,

It looks like all is covered over on the Waveshare guide! https://www.waveshare.com/wiki/SIM7600G-H_4G_DONGLE#Setup_4G_Connection_for_Raspberry_Pi_.28Raspbian.29

AWS is definitely its own can of worms, Amazon themselves ought to have some pretty good guides on setting up a server of sorts.

There are many ways of doing this - what does your project invovle and we might be able to give you some easier to implement ideas!
Liam

What is the python code in Raspberry pi 5?

Hi Learner,

There have been a couple issues related to low-level library compatibility with the hardware of the Pi 5 and bookworm, so at this time a large number of projects (potentially including this one) aren’t necessarily supported on the Pi 5.

The main issue for anyone curious afaik is how the addressing for the internal registers that are referenced inside the RPi.GPIO library and similar older packages for interfacing with the GPIO have changed just slightly enough in the new hardware of the Pi 5 to be incompatible. There are a number of live discussions about this online:

GPIO Registers Failed on Raspberry Pi 5 - Raspberry Pi Forums.

There are alternative libraries such as GPIOZERO which I’ve linked below, although I expect more information to be made available about this incompatibility and how to transition projects in future:

https://gpiozero.readthedocs.io/en/latest/#gpiozero

You can try running this on a Pi 5 and see where/when you hit errors or error messages if you’ve already got the hardware, although I suspect a number of older projects such as this just won’t easily be possible on the new hardware for a while yet.

2 Likes

I tried to set up the internet (dial-up) connection by AT+CUSBPIDSWITCH=9011,1,1. but it stops working SMS, and all other AT Commands. Please give me the solution

2 Likes

Hi!

Welcome to the forum!

It sounds like the SIM7600 is still trying to run that command, where in the workflow are you having to enter the command?

FYI: Waveshare has this reply: https://www.waveshare.com/wiki/SIM7600E-H_4G_HAT#Documentation:~:text=Why%20return%20NO%20CARRIER%20after%20NDIS%20dialing%20on%20the%20computer%3F

Liam

1 Like

I follow all the steps according to the tutorial. everything is fine. Call, SMS, and GPS are all working. when I started the internet by applying AT+CUSBPIDSWITCH=9011,1,1 command through ttyS0 or ttyUSB2. then all the ports get busy and stop responding. After that, I can not give any AT command. neither for SMS nor for call. Please tell me how can i run the internet and AT commands at the same time.
i am using SIM7600E-H (do i need to change it to SIM7600G-H)