Tethering

Tethering is a feature in Device OS 6.2.0 that allows another device to communicate with the Internet using a Particle B-Series SoM cellular modem. This can be used from a Raspberry Pi, for example, to allow it to access the Internet through the Particle B-SoM cellular device.

Requirements

LTE Cat 1 cellular module

This features requires a LTE Cat 1 cellular module, available on these SKUs.

SKU Description Modem Region Gen Lifecycle
B504MEA B-Series LTE CAT-1/3G (NorAm, EtherSIM), [x1] EG91-NAX NORAM 3 GA
B504MTY B-Series LTE CAT-1/3G (NorAm, EtherSIM), [x50] EG91-NAX NORAM 3 GA
B524MEA B-Series LTE CAT-1/3G/2G (Europe, EtherSIM) [x1] EG91-E EMEAA 3 GA
B524MTY B-Series LTE CAT-1/3G/2G (Europe, EtherSIM), Tray [x50] EG91-E EMEAA 3 GA

You cannot use a LTE Cat M1 module, such as the B404X, Boron 404X, or M404.

Serial connection

Tethering uses a UART serial connection between the other device (such as a Rasbperry Pi) and the Particle device. Hardware flow control (RTS/CTS) is recommended, as is using a high baud rate.

All current Particle devices have 3.3V logic on UART ports, so if your other device is a 5V device, it would need level shifters. Raspberry Pi devices are 3.3V.

PPP support

Over this serial connection PPP (point-to-point protocol) is used. This allows the other device to get an IP address and use features like TCP, UDP, and DNS to transmit data to and from the Internet.

It is not restricted to using the Particle cloud, but it cannot establish permanent listening sockets for TCP or UDP because these are not supported by the cellular networks.

Note that the other device must support PPP, so you cannot use this for devices like Arduino that do not support PPP over UART serial as a network connection.

Data usage

Tethering can use a very large amount of cellular data. Caution should be used with the existing Particle data plans as you can easily exceed your allowed cellular data limit.

Contact sales if you have a need for higher data allowances.

Application firmware

In order to use tethering, it must be enabled:

#include "Particle.h"

SerialLogHandler dbg(115200, LOG_LEVEL_INFO);

SYSTEM_MODE(SEMI_AUTOMATIC);

SYSTEM_THREAD(ENABLED);

/* executes once at startup */
void setup() {
    // waitUntil(Serial.isConnected);
    // Enable Cellular
    Cellular.on();
    Cellular.connect();
    // Bind Tether interface to Serial1 @ 921600 baudrate with default settings (8n1 + RTS/CTS flow control)
    Tether.bind(TetherSerialConfig().baudrate(921600).serial(Serial1));
    // Turn on Tether interface and bring it up
    Tether.on();
    Tether.connect();
}

void loop() {
}

For information about the Tether class, see the Device OS API reference.

Raspberry Pi

If using a Raspberry Pi as the other device, you must configure it to establish a PPP connection over its serial port instead of Ethernet or Wi-Fi.

A script to automate this will be provided in the future, but if you'd like to attempt it yourself now, you can follow the brief notes below.

Manual Linux setup notes