2

I am developing a connected device with a raspberry pi over a 3G connection. My 3G offer gives me a 50 MB max data usage as a limit. I want to be able to exchange very small amount of data with the raspberry Pi from the Internet (eg ~5 kB per day) but I want to be able to communicate with it 24/7.

Of course with the 3G connection, I have no public IP and I cannot do any NAT to access my raspberry directly. Question: how can I communicate with the Rapsberry Pi without using more than 50 MB/month?

I tried an OpenVPN connection but it needs 200 MB per month to keep-alive the connection. I also tried socket.io with node.js to keep a link between my raspberry Pi and my server but again it needs ~ 200 MB per month.

Any idea for sending some kind of notifications with small payloads instantaneously without having a data expensive keep-alive connection?

alexislg
  • 1,018
  • 13
  • 20

2 Answers2

1

One way I did something similar, was to use XMPP. I created an account on Google for my Pi and then wrote a small python app that will log into Gtalk (XMPP) using this account and process the messages received. Of course, using this method does have some overhead as the Pi will 'ping' the Google server every now and then, but probably not as much as 50MB (but then, it could be, I never checked).

Morne
  • 21
  • 2
0

Afetr many researchs and tests, and thanks to Morne answer I found out 2 solutions for my need:

  • XMPP: protocol used for instant messaging. Do keep alive connections ~30 MB/month
  • MQTT: protoco l used for M2M commubnciations and used by Facebook Messenger. After some tests it uses only 12 MB/month for a keepalive. It has been designed especially for small bandwidth communications. I'll use that. There are some python and node.js packages
alexislg
  • 1,018
  • 13
  • 20