简体   繁体   中英

How to configure the modem connected to usb in linux?

I have a separate Linux board built via Buildroot. now I would like to connect the modem to the usb port on the board. from the modem side I have a DB9 socket so I used the RS232-USB adapter. However, after connecting, it does not detect the device and the diodes on the adapter show that there is no data exchange (TxD and RxD). The "Active" LED is also off. I found an article on how to configure a USB modem:

https://www.maketecheasier.com/setup-usb-modem-linux/

but I have no access to the GUI unfortunately. I have to do this at the terminal. How to configure and connect to the modem? When I connect the modem, I have no additional devices in the path /dev/

If your RS232-USB adapter is recognized by the kernel, it will create a virtual UART device usually named /dev/ttyUSB0 - this is your device to the modem. Note that nothing happens automatically to a modem you connect to the RS232-UART adapter, it's up to you to set it all up correctly.

To verify that the modem is OK and the UART link works, run a serial terminal and send it a few AT commands. I can recommend screen as a really simple serial terminal, eg: screen /dev/ttyUSB0 115200 (use sequence "Ctrl+A, \" to quit). Or minicom , which is the original modem client, but using this one requires reading the docs.

If your manual tests confirm that the modem is OK and can go online, it's time to configure a dial-up service. This depends on which network manager you've chosen. If all you have is the good old ifup/ifdown scripts in /etc/network/ then either use raw pppd or set up some helper like wvdial . Google is full of practical examples.

If you're running something like NetworkManager or connman/ofono, follow their documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM