ravi134
Posts: 11
Joined: Thu Jul 03, 2014 5:05 am

Raspberry Pi and 3G

Sat Aug 11, 2018 10:49 am

I want to connect a SIM card to Raspberry Pi 3. My requirement is stable connection of 3G so that my Pi can operate outdoor and connect to my remote servers. I read a lot about 3G Dongle but also heard about instability. Appreciate your help on this.

Buzz2006
Posts: 16
Joined: Sun Dec 18, 2016 5:16 pm

Re: Raspberry Pi and 3G

Sat Aug 11, 2018 11:03 am

Im no expert. Try connecting your raspberry pi to a mobile hotspot on your phone. I know this works with Apple phones, but I'm clueless when it comes to Android.

fruitoftheloom
Posts: 20755
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Raspberry Pi and 3G

Sat Aug 11, 2018 11:11 am

ravi134 wrote:
Sat Aug 11, 2018 10:49 am
I want to connect a SIM card to Raspberry Pi 3. My requirement is stable connection of 3G so that my Pi can operate outdoor and connect to my remote servers. I read a lot about 3G Dongle but also heard about instability. Appreciate your help on this.

Different countries have different standards, but a HAT may suffice:

https://www.pianywhere.com
Retired disgracefully.....

Heater
Posts: 13367
Joined: Tue Jul 17, 2012 3:02 pm

Re: Raspberry Pi and 3G

Sat Aug 11, 2018 1:27 pm

I have a bunch of devices, including Pi, that are in remote locations and communicate with servers in google cloud via 3G or 4G. Both in the USA and in Europe.

In most cases the Pi or other device connects to a cellular modem or dongle using WiFi.

In general these systems have worked well. However one will always get occasional disconnects and connection failures of the cellular network.

In the USA they like to put data caps on everything so every month we get informed that we have used our limit for the month and data rate will be throttled to 200K bytes per second. That's OK our devices are only streaming at 100KBs.

If your Pi are at remote locations were it is hard or expensive to visit and fix them be sure to take some precautions to ensure reliability...

Use the hardware watchdog on the Pi to reboot the thing in case of an OS crash or other catastrophe.
Make your root file system read only so as to avoid file system corruption and failure to reboot after power interruptions.
Think about arranging that the cellular modem can be power cycled. Some times they get stuck and that is all one can do.
Memory in C++ is a leaky abstraction .

ravi134
Posts: 11
Joined: Thu Jul 03, 2014 5:05 am

Re: Raspberry Pi and 3G

Sat Aug 11, 2018 3:25 pm

Heater wrote:
Sat Aug 11, 2018 1:27 pm
I have a bunch of devices, including Pi, that are in remote locations and communicate with servers in google cloud via 3G or 4G. Both in the USA and in Europe.

In most cases the Pi or other device connects to a cellular modem or dongle using WiFi.

In general these systems have worked well. However one will always get occasional disconnects and connection failures of the cellular network.

In the USA they like to put data caps on everything so every month we get informed that we have used our limit for the month and data rate will be throttled to 200K bytes per second. That's OK our devices are only streaming at 100KBs.

If your Pi are at remote locations were it is hard or expensive to visit and fix them be sure to take some precautions to ensure reliability...

Use the hardware watchdog on the Pi to reboot the thing in case of an OS crash or other catastrophe.
Make your root file system read only so as to avoid file system corruption and failure to reboot after power interruptions.
Think about arranging that the cellular modem can be power cycled. Some times they get stuck and that is all one can do.
First of all Thanks a ton for replying in details. You got my problem and scenario so well.. Thanks again
Few questions again:
1) I will try USB dongle. Do you think there is any custom made board to connect SIM card to Pi?
2) Any suggestions for hardware watchdog?
3) My Pi wont requires much of data in most of the case but I have to make a design in such a way that in some situation it can use. What best I can do to do for the reliability, like force reboot etc.? (Think it goes back to my #2)

Appreciate your help.

ravi134
Posts: 11
Joined: Thu Jul 03, 2014 5:05 am

Re: Raspberry Pi and 3G

Sat Aug 11, 2018 3:31 pm

fruitoftheloom wrote:
Sat Aug 11, 2018 11:11 am
ravi134 wrote:
Sat Aug 11, 2018 10:49 am
I want to connect a SIM card to Raspberry Pi 3. My requirement is stable connection of 3G so that my Pi can operate outdoor and connect to my remote servers. I read a lot about 3G Dongle but also heard about instability. Appreciate your help on this.

Different countries have different standards, but a HAT may suffice:

https://www.pianywhere.com
Thank you for the post, I got that too but it is not fitting in my requirement as 1) it is expensive (as I expect to use many Pis) and 2) I want to create something (if possible).
Thanks again for your reply : -)

Heater
Posts: 13367
Joined: Tue Jul 17, 2012 3:02 pm

Re: Raspberry Pi and 3G

Sat Aug 11, 2018 5:26 pm

ravi134,
1) I will try USB dongle. Do you think there is any custom made board to connect SIM card to Pi?
I cannot imagine there is any useful way to connect a SIM card to a Pi.

The SIM card goes in the GSM module/dongle/modem. The Pi connects to the GSM module/dongle/modem via ethernet, WiFi, USB.
2) Any suggestions for hardware watchdog?
The Pi has built in watchdog hardware. Use the watchdog package with it. Google it.

As for a real, external, hardware watchdog that can power cycle the Pi and anything connected to it, that is something I have discovered is essential for utmost failure recovery. It's also something I have yet to find or create.

As for cost, the cellular modems we are using range from a thousand Euro at the top end down to about 50 Euro for a domestic cellular "dongle".
Memory in C++ is a leaky abstraction .

mosespi
Posts: 508
Joined: Mon May 12, 2014 3:35 pm
Location: 34,-118
Contact: Website

Re: Raspberry Pi and 3G

Sat Aug 11, 2018 7:52 pm

Lots of inexpensive (less then $100) USB cell modems around, not the most reliable for unattended/sever use, but they work. I usually write scripts that power cycle the USB power on the Pi to reset these types of modems, it helps bring them back up most of the time.

Better reliability exists at a price.. there are industrial cellular modems like the following:
https://www.sierrawireless.com/products ... ways/rv50/
Pricing at around $600 in the US, not cheap but they are solid performers.

Here is a UPS of my own design that has an actual hardware watchdog: http://www.allspectrum.com/mopower/
It will cut and reapply power if it doesn't hear back from the Pi in a set amount of time.

Good luck.

Regards,
-Moses
Power problems? MoPower UPS for the Pi
http://www.allspectrum.com/mopower/

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7312
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Raspberry Pi and 3G

Sun Aug 12, 2018 8:19 am

Zte mf823 works nicely for me, and just shows up as a network interface instead of having to mess with wvdial or ppp setup.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “General discussion”