iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🐕

How to Fix Missing /dev/ttyUSB2 When Connecting Quectel BG96 Mini PCIe to a Linux Box

に公開

Hi, I'm takipone.
When connecting the BG96 Mini PCIe module—which allows for easy LTE-M communication—to a Linux Box such as a Raspberry Pi, I sometimes encountered a situation where only two device files were generated, as shown below. This article demonstrates how to add device files so that you can operate the module using AT commands.

$ ls /dev/ttyUSB*
/dev/ttyUSB0  /dev/ttyUSB1
$

Solution

You can fix this by running the following command:

echo '2c7c 0296' | sudo tee /sys/bus/usb-serial/drivers/option1/new_id

It looks like this when executed:

$ echo '2c7c 0296' | sudo tee /sys/bus/usb-serial/drivers/option1/new_id
2c7c 0296
$ ls /dev/ttyUSB*
/dev/ttyUSB0  /dev/ttyUSB1  /dev/ttyUSB2
$

The content to echo is the Device ID/Product ID, which can be verified with the lsusb command (this is common for BG96):

$ lsusb
Bus 001 Device 009: ID 2c7c:0296 Quectel Wireless Solutions Co., Ltd. BG96 CAT-M1/NB-IoT modem
Bus 001 Device 004: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$

Now that ttyUSB2 has been created for communicating via AT commands, you can freely interact with it.

sudo screen /dev/ttyUSB2 115200

It's very helpful to have Introduction to AT Commands with SORACOM by my colleague ogu on hand.

Reference URLs

Discussion