Posts: 3
Joined: Mon Oct 08, 2018 10:31 pm

4G Hat

Mon Oct 08, 2018 10:59 pm


I've got a Pi model 3 B, and I've purchased the following 4G hat, however I'm unsure how to actually establish an internet connection through it.. so hoping for a little assistance, or peoples suggestions.

2G/3G/4G GSM GPRS GNSS SIM GPS Extension Board for Raspberry Pi 2 3B B+ ZeroW GM

I can query the card using minicom -D /dev/ttyS0 and see that its got signal, query the carrier etc. However I'm unsure how to go about setting it up as either a modem or other network device to access the internet.

I've also tried using the USB port (not the one labelled UART), and I get a wwan0 adapter, however it only get a self-assigned IP. Upon connecting it to my Windows computer through the same USB port, I get several devices install, one of which is a network adapter but it shows that the cable is 'unplugged' - I haven't really tried anything further through Windows as this stage.

What I would like to achieve is have the Pi connected to the internet via the 4G hat, and be able to query the GPS part of the card to get the location - I'm not fussed if thats just by command line. I'd like to have it connected via the GPIO pins, but not fussed if it also needs to be connected via USB as well (the manual didn't seem to show how it should be connected unless I missed something?)

here is a link to the manual: Waveshare Wiki

Forum Moderator
Forum Moderator
Posts: 3266
Joined: Wed Dec 28, 2011 11:45 pm

Re: 4G Hat

Tue Oct 09, 2018 1:59 am

A quick search for "SIM7600 linux" found https://techship.com/faq/how-to-use-sim ... -over-usb/ which looks like it may be helpful.

Posts: 3
Joined: Mon Oct 08, 2018 10:31 pm

Re: 4G Hat

Wed Oct 10, 2018 1:05 am

Cheers - thanks for that.. I hadn't seen that one..

I have gotten it working, possibly a little easier than what those instructions said, probably not 100% ideal but it works.

I've got it connected via the GPIO pins + the USB connection..

On boot I've got a script running which initialises the card via the GPIO. The 4G modem then appears as a "mobile broadband" connection in Network manager.

I've started work on the GPS chip, which is enabled with minicom -D /dev/ttyS0 and then the command AT+CGPS =1 then running minicom -D /dev/ttyUSB1 you can see the GPS data scrolling through. I'm just looking at my options now to see how (if) I can go about getting the latitude + longitude from the GPS in terminal.

Posts: 3
Joined: Mon Oct 08, 2018 10:31 pm

Re: 4G Hat

Sat Oct 13, 2018 5:17 am

Update on my last post.. it wasn't 100% working. I had been able to see the mobile broadband device, it was reading the provider from the sim card, and was showing signal strength however it would fail immediately when I tried to connect.

I've gone through and followed the instructions from the link and another page which said how to pull the IP info, and manually assign it to the wwan0 interface, however it doesn't give me a connection to the internet. I've got two sim cards with different providers, and I've checked the APNs as well..

I did read an article that said it could be a driver issue, but the only driver for linux I've found has Chinese installation instructions.

Posts: 1
Joined: Tue Oct 23, 2018 1:10 pm

Re: 4G Hat

Tue Oct 23, 2018 1:23 pm

Hello Damo_C

I am at the moment starting my IoT project, using the same both devices as you: Raspberry Pi 3B+, plus the SIM7600 4G HAT (which I did not receive yet). Great that your project is also running almost simultaneously, in order to share support between us.

Up to this moment, I would like to ask you about the tool https://techship.com/faq/how-to-use-sim ... -over-usb/ you implemented.

Did you get it to implement it 100% ?
I do not understand which advantage this offers, over my original idea: just sending AT commands to the HAT device through UART (RPi GPIOs). Could you please roughly describe it to me?

Thanks in advance.

Return to “Networking and servers”