
Vì module này giá thành khá rẻ và hỗ trợ sóng 5G ở VN, nên mình viết bài này để hướng dẫn cách chuyển kết nối từ USB sang PCI với board mạch mình tự thiết kế dùng driver LAN RTL8125
Đầu tiên kết nối với board mạch vào PC, ở đây mình dùng Ubuntu
Dùng minicom tool cho việc gửi nhận lệnh AT-command
Cài đặt minicom
sudo apt-get install minicom
chạy minicom với cổng mặc định AT command là ttyUSB2 và baudrate 115200
sudo minicom -D /dev/ttyUSB2 -b 115200
Ảnh khi khởi động module RM500U-CN

Với module hiện tại sử dụng chip điều khiển của Quectel/Spreadtrum ta dùng lệnh phía dưới để chuyển sang mode PCI
AT+QCFG="pcie/mode",1
AT+QCFG="ethernet",1
AT+QNETDEVCTL=1,1,1
AT+QCFG="nat",0
Restart module và cắm dây LAN vào PC hoặc router để kiểm tra kết quả
Testing với window
Cài đặt driver

Máy tính chưa được cài driver
Nếu máy chưa cài driver các bạn tải driver tại đây

Cài đặt phần mền terminal để sử dụng ATcommand.
Ở đây mình dùng phần mền terminal Hercules các bạn có thể download tại đây
Sử dụng câu lệnh sau để chuyển mode USB net sang sử dụng mode PCI LAN
AT+QCFG="pcie/mode",1
AT+QCFG="ethernet",1
AT+QNETDEVCTL=1,1,1
AT+QCFG="nat",0

Test sóng 5G với mạng viettel

Cách chuyển lại dùng internet LAN sang dùng internet qua cổng USB
ở đây mình hướng dẫn chuyển qua RNDIS Dial-up Internet Access
AT+QENG="servingcell"
AT+QCFG="ethernet",0
AT+QCFG="nat",1
AT+QCFG="usbnet",3
AT+QNETDEVCTL=2,3,1
AT+CFUN=1,1
Hình ảnh test thực tế

Sử dụng với router MT7621

Một số tập lệnh AT dùng cho RM500U-CN tham khảo
Command | Description | Return |
---|---|---|
AT | AT Test Command | OK |
ATE | ATE1 sets echo ATE0 turns off echo | OK |
AT+CGMI | Query module manufactor | OK |
AT+CGMM | Query module model | OK |
AT+CGSN | Query product serial number (IMEI) | OK |
AT+CSUB | Query module version and chip | OK |
AT+QGMR | Query firmware version serial number | OK |
AT+IPR? | Set module hardware serial port baudrate | +IPR: OK |
AT+CFUN=1,1 | Reset module | OK |
AT+QUIMSLOT? | Query SIM card selection: Return 1, select SIM card 1; Return 2, select SIM card 2 | +QUIMSLOT: 1/2 OK |
AT+CPIN? | Query SIM card status, return READY, SIM card can normally identify | +CPIN: READY |
AT+COPS? | Query the current operator, after normally connecting to the network, it will return the operator’s information | +COPS: OK |
AT+CEREG? | Query the network registration status | +CEREG: OK |
AT+C5GREG? | Query 5G network registration status | +C5GREG: OK |
AT+QENG=”servingcell” | Query UE system information | |
AT+QNWPREFCFG=”mode_pref”,AUTO | Auto-network mode | OK |
AT+QNWPREFCFG=”mode_pref”,NR5G | Prioritize 5G network | OK |
AT+QNWPREFCFG=”nr5g_band”,79 | Fixed N79 frequency band | OK |
AT+QNWPREFCFG=”mode_pref”,LTE | Prioritize 4G network | OK |