This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data Dongle or tethered phone for remote MQTT ?
#1
Hi all
I want to setup a mobile/GSM data connection so that I can remotely monitor my boat. 
I've setup the MQTT stuff on the Pi and I can monitor it when the Pi is connected to a WiFi network but I now want to connect the Pi to the internet using GSM 3G or 4G.
I have a Vodafone/Huawei K4203 dongle and a number of old phones which I could use but have no idea how to connect/set them up on Raspbian/Linux/OpenPlotter
Bye the way, I am in the UK and the boat is in Greece

So ... if you have this sort of connection setup Id be very interested to hear how you set it up. 

Thanks
Steve
Reply
#2
(2018-07-01, 08:29 AM)affinite Wrote: Hi all
I want to setup a mobile/GSM data connection so that I can remotely monitor my boat. 
I've setup the MQTT stuff on the Pi and I can monitor it when the Pi is connected to a WiFi network but I now want to connect the Pi to the internet using GSM 3G or 4G.
I have a Vodafone/Huawei K4203 dongle and a number of old phones which I could use but have no idea how to connect/set them up on Raspbian/Linux/OpenPlotter
Bye the way, I am in the UK and the boat is in Greece

So ... if you have this sort of connection setup Id be very interested to hear how you set it up. 

Thanks
Steve

I've done this  before with a Huawei K3772 on OpenWRT (Linux with only 4MB footprint) installed on a cheap travel router (having an USB port).
It was quite hard to do. With a smartphone, the config would be zero on Openlotter, just connect and activate USB tethering.

Here below how I did for the Huawei.
Starting point: openwrt-15.05.1-ar71xx-generic-tl-mr3020-v1-squashfs-sysupgrade.bin (= very basic Linux kernel with router function)
Installed following packages from
http://archive.openwrt.org/chaos_calmer/...ages/base/

chat
comgt
librt
libpthread
libusb
usb-modeswitch
kmod-usb-serial
kmod-usb-serial-wwan
kmod-usb-serial-option

http://www.draisberghof.de/usb_modeswitc...php?t=1006

Changed the file /etc/usb-mode.json
Replaced a Huawei (vendor 4817) its product number (eg. 5321) to 5327 (HEX
for 14cf), HuweiNew left in place
Executed usbmode -s -v -c /etc/usb-mode.json

Add lines to /etc/config/network

config interface 'wan'
        option proto '3g'
        option service 'umts_only'
        option device '/dev/ttyUSB0'
        option apn 'www.iamgprs2.ma'
        option pincode '0000'

Change dial number in /etc/chatscripts/3g.chat to *99#

Reboot router, wait, if needed, execute manual usb_modeswitch command, try
to connect, wait, try again

Last step: create zone WAN, set forwarding from lan to wan

Useful commands: dmesg, cat /sys/kernel/debug/usb/devices, usbmode -l,
ifup wan, logread
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)