I have purchased this 4G HAT and I'm using it with this module in a raspberry 4. I use the USB connection.
I installed a ppp connection and everything is working correctly. My problem is: how do I send AT commands? I want to test several things, such as send sms or put the module in sleep mode.
I tried solutions like the ones shown here. However I don't know which device I should choose (in the example ttyACM0) and I tried a few but it gives the error:
serial.serialutil.SerialException: [Errno 16] could not open port /dev/ttyUSB3: [Errno 16] Device or resource busy: '/dev/ttyUSB3'
EDIT. The output for lusb:
pi@raspberrypi:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 003: ID 2a7a:9a18
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
and dmesg (the section of correspondent to the GSM card)
[ 3.212448] usbcore: registered new interface driver usbserial_generic
[ 3.212527] usbserial: USB Serial support registered for generic
[ 3.234675] usbcore: registered new interface driver cdc_wdm
[ 3.239163] usbcore: registered new interface driver option
[ 3.239260] usbserial: USB Serial support registered for GSM modem (1-port)
[ 3.239749] option 1-1.4:1.0: GSM modem (1-port) converter detected
[ 3.248897] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB0
[ 3.250162] option 1-1.4:1.1: GSM modem (1-port) converter detected
[ 3.252576] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB1
[ 3.253795] option 1-1.4:1.2: GSM modem (1-port) converter detected
[ 3.255273] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB2
[ 3.257057] option 1-1.4:1.3: GSM modem (1-port) converter detected
[ 3.257961] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB3
[ 3.299767] qmi_wwan 1-1.4:1.4: cdc-wdm0: USB WDM device
[ 3.300850] qmi_wwan 1-1.4:1.4 wwan0: register 'qmi_wwan' at usb-0000:01:00.0-1.4, WWAN/QMI device, 5a:d7:9a:8e:3c:e9
[ 3.309017] usbcore: registered new interface driver qmi_wwan