How to send AT commands to the RM520N-GL

I’m using a RM520N-GL 5G modem, how can I send AT commands to the RM520N-GL modem by USB in Ubuntu?

Thank you.

Please check whether you can see the ttyUSBx.
If the USB serial driver is ready, then you can use serial tool such as
microcom/minicom to send AT command.

  1. Please check
    lsusb -t
    If the usb driver is not ready
    sudo modprobe option
    echo 2C7C 0801 FF | sudo tee /sys/bus/usb-serial/drivers/option1/new_id
    2.Stop the ModemManager
    sudo systemctl stop ModemManager
  2. Send AT command
    busybox micorcom /dev/ttyUSB2 -s 115200

I’m not sure if this operation is correct. I used UART with PuTTY to execute the following commands, but afterward, the keyboard stopped responding to any input. However, PuTTY didn’t crash and is still outputting device messages.


It means that the device is recognized.
You need a serial tool.

sudo apt install -y minicom
sudo apt install -y busybox

You can open the ttyUSB AT port with
minicom -D /dev/ttyUSB2

You have connected the PC with another usb serial device ,and the ttyUSB2 might not be the AT port.

Thanks your feedback, but i don’t know how to using minicom command. as picture: command not found.

sudo apt update 
sudo apt install -y minicom

Is the PC X86_64 arch?

The PC is ARM64 arch.
$dpkg --print-architecture
arm64

Into minicom,
I tried serial device: /dev/ttyUSB0 through ttyUSB3, I just input “AT”, but no any reponse from AT commands.
It’s also no any reponse as following manualcommand on ubuntu.
sudo echo -en “AT\r\n” > /dev/ttyUSB2;cat /dev/ttyUSB2

Maybe the ttyUSB2 and ttyUSB3 is not the AT port.
I notice that there is another USB serial device connect with the Ubuntu.

I connected only a CP2102 (USB to UART). I found ttyUSB, including ttyUSB0 to ttyUSB3. I tested all of them in minicom with the serial device set to /dev/ttyUSB0 through /dev/ttyUSB3. However, when I input “AT,” there was no response to the AT commands.

Please remove the cp210 and connect with the RM520N.
The RM520N is not connected, why you try to send AT command?

The purpose of using AT commands is to query and debug information related to the modem. The CP2102 (USB to UART) cable is used to connect via PuTTY for this purpose.

https://forums.quectel.com/uploads/default/original/2X/6/60d2b84d0d7ede8f346e9778b6ae54b4e73a5630.png
But we can see it before but we cannot see it now

Please check

dmesg | grep -i usb

log.txt (18.6 KB)
The purpose of using AT commands is to query and troubleshoot modem-related information. Is there an easy way to use AT commands without connecting via PuTTY, and can they be executed directly on the DUT?

Thanks

For example

	Line 157: [   16.191827] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB0
	Line 159: [   16.201027] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB1
	Line 164: [   16.211475] usb 1-2.2: FTDI USB Serial Device converter now attached to ttyUSB3
	Line 167: [   16.211929] usb 1-2.2: FTDI USB Serial Device converter now attached to ttyUSB4
	Line 171: [   16.212537] usb 1-2.2: FTDI USB Serial Device converter now attached to ttyUSB5
	Line 174: [   16.212995] usb 1-2.2: FTDI USB Serial Device converter now attached to ttyUSB6
	Line 175: [   16.216908] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB2
	Line 176: [   16.224125] usb 2-4: GSM modem (1-port) converter now attached to ttyUSB7

the ttyUSB2 and ttyUSB7 could work as AT port.

1 Like

Choosing ttyUSB7 works, but I still don’t understand why it’s ttyUSB7.
Thanks.

You could check that whether the ttyUSB2 is a Linux character device.
ls /dev/ttyUSB* -la

And on the other hand, please check wether there is any other proccess that already opened the ttyUSB2.

fuser /dev/ttyUSB2
lsof | grep ttyUSB