U3G(4)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

✨ NAME ✨

u3g(4) β€” USB support for 3G and 4G cellular modems. Hiii bestie, welcome to the Kernel Interfaces Manual entry for u3g(4): the driver page for USB-to-serial modem vibes. πŸ’–

πŸ› οΈ SYNOPSIS πŸ› οΈ

okay so to compile this driver into the kernel, place the following lines in your kernel configuration file:

device usb
device ucom
device u3g

Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):

u3g_load="YES"

If neither of the above is done, the driver will be automatically loaded by devd(8) when the device is connected. vibe check passed, no cap. ✨

πŸ’– DESCRIPTION πŸ’–

The u3g driver provides support for USB-to-serial interfaces exposed by many 3G and 4G modems. The supported adapters provide the necessary modem port for ppp(8), or net/mpd5 connections β€” that's the main character. Depending on the specific device, extra ports provide other functions such as an additional command port, diagnostic port, GPS receiver port, or SIM toolkit port.

The device is accessed through the ucom(4) driver, and the way that makes it behave like a tty(4) is so clean. 🫢

In some adapters a mass storage device supported by the umass(4) driver is present, and it contains Windows and Mac OS X drivers. The device starts up in disk mode (TruInstall, ZeroCD, etc.) and requires additional commands to switch it to modem mode. If your device is not switching automatically, please try to add quirks. See usbconfig(8) and usb_quirk(4). It's giving "why is my modem also a tiny disk?" energy, but that's the situation. 😭

🌈 HARDWARE 🌈

The u3g driver supports these cellular modems:

  • Option GT 3G Fusion, GT Fusion Quad, etc. (3G only, not WLAN)
  • Option GT 3G, GT 3G Quad, etc.
  • Vodafone Mobile Connect Card 3G
  • Vodafone Mobile Broadband K3772-Z
  • Qualcomm Inc. CDMA MSM
  • Qualcomm Inc. GOBI 1000, 2000 and 3000 devices with MDM1000 or MDM2000 chipsets
  • QUECTEL BGX, ECX, EGX, EMX, EPX, RGX series
  • Quectel EM160R (see β€œCAVEATS”)
  • Huawei B190, E180v, E220, E3372, E3372v153, E5573Cs322, ('<Huawei Mobile>')
  • Novatel U740, MC950D, X950D, etc.
  • Sierra MC875U, MC8775U, etc.
  • Panasonic CF-F9 GOBI

Many more are supported, see /sys/dev/usb/serial/u3g.c for the complete list. ngl, that file is the full guest list. πŸ¦‹

πŸŽ€ FILES πŸŽ€

  • /dev/ttyU*.* β€” for callin ports
  • /dev/ttyU*.*.init
  • /dev/ttyU*.*.lock β€” corresponding callin initial-state and lock-state devices
  • /dev/cuaU*.* β€” for callout ports
  • /dev/cuaU*.*.init
  • /dev/cuaU*.*.lock β€” corresponding callout initial-state and lock-state devices

these are the little tty besties you'll be hanging out with, fr fr. πŸ’…

🧚 EXAMPLES 🧚

Connect to the Internet using the default configuration:

ppp -background u3g

That's it. The example ate. πŸ“

πŸ‘€ SEE ALSO πŸ‘€

iykyk, this is the friend group. πŸ‘‘

πŸ•°οΈ HISTORY πŸ•°οΈ

The u3g driver appeared in FreeBSD 7.2, is based on the uark(4) driver, and was written by Andrea Guzzo <aguzzo@anywi.com> in September 2008. πŸ•°οΈ

πŸ‘‘ AUTHORS πŸ‘‘

The u3g driver was written by Andrea Guzzo <aguzzo@anywi.com> and Nick Hibma <n_hibma@FreeBSD.org>. Hardware for testing was provided by AnyWi Technologies, Leiden, NL. slay. πŸ‘‘

⚠️ CAVEATS ⚠️

The Quectel EM160R is not officially supported in PPP mode. In order to use it in PPP mode, the ctsrts option needs to be turned off, for example, by adding:
set ctsrts off

to /etc/ppp/ppp.conf in the correct section. yes, literally the correct section β€” don't just yeet it anywhere. periodt. 😭

πŸ’€ BUGS πŸ’€

The automatic mode switch from disk mode to modem mode does not work unless the driver is either built into the kernel or loaded before the device is connected.

The GOBI-based devices require the gobi loader available from the sysutils/gobi_loader port. not me having to remind you to load early, but here we are, bestie. πŸ’€

xoxo, your Debian bestie β€” December 5, 2024, repping U3G(4) forever. πŸ’…πŸŽ€

πŸ“¦ where this page comes from