RoEdAl / asterisk-chan-quectel

Asterisk channel driver for Quectel and SimCOM modules
GNU General Public License v2.0
22 stars 7 forks source link

Add Quectel EP06 support #3

Closed RoEdAl closed 11 months ago

RoEdAl commented 1 year ago

Reported by @mpmc.

Quectel EP06 LTE - official downloads.

Known problems:

RoEdAl commented 1 year ago

Log from @mpmc.

<-- Here's the module dropping to HSPA before the call.. --->

[Jul 26 11:30:45] DEBUG[1717] src/at_queue.c: [quectel0][AT+QSPN] --> [AT+QSPN;+QNWINFO\r]
[Jul 26 11:30:45] VERBOSE[1717] src/at_response.c: [quectel0] Location area code: XXXX
[Jul 26 11:30:45] VERBOSE[1717] src/at_response.c: [quectel0] Cell ID: XXXX
[Jul 26 11:30:45] DEBUG[1717] src/at_response.c: [quectel0][AT+QSPN] <-- [+QSPN][+QSPN: \"AAAAA\",\"BBBBB\",\"CCCCC\",0,\"DDDDD\"]
[Jul 26 11:30:45] VERBOSE[1717] src/at_response.c: [quectel0] Operator: AAAAA/BBBBB/CCCCC
[Jul 26 11:30:45] DEBUG[1717] src/at_response.c: [quectel0][AT+QSPN] <-- [+QNWINFO][+QNWINFO: \"HSPA+\",\"AAAAA\",\"WCDMA 900\",BBBBB]
[Jul 26 11:30:45] VERBOSE[1717] src/at_response.c: [quectel0] Registered PLMN: AAAAA
[Jul 26 11:30:45] VERBOSE[1717] src/at_response.c: [quectel0] Band: WCDMA 900
[Jul 26 11:30:45] DEBUG[1717] src/at_response.c: [quectel0][AT+QSPN] <-- [OK][OK]

<-- DSCI notification -->

[Jul 26 11:30:46] DEBUG[1717] src/at_response.c: [quectel0] <-- [^DSCI][^DSCI: 2,1,4,0,079652xxxxx,129]
[Jul 26 11:30:46] DEBUG[1717] src/at_response.c: [quectel0] DSCI - idx:2 dir:1 type:0 state:4 number:079652xxxxx
[Jul 26 11:30:46] DEBUG[1717] src/at_response.c: [quectel0] CLCC idx:2 dir:1 state:4 mode:0 mpty:2 number:079652xxxxx type:129
[Jul 26 11:30:46] DEBUG[1717] src/cpvt.c: [quectel0] Create cpvt - idx:2 dir:1 state:initialize buffer_len:704

<-- long chanvars redacted --->

[Jul 26 11:30:46] DEBUG[1717] src/channel.c: [quectel0] Call - idx:2 mpty:0, [initialize] -> [incoming] has channel
[Jul 26 11:30:46] DEBUG[1717] src/channel.c: [quectel0] Call idx:2 was master
[Jul 26 11:30:46] DEBUG[1804][C-00000003] src/at_queue.c: [quectel0][AT+QHUP] --> [AT+QHUP=16,2\r]
[Jul 26 11:30:56] ERROR[1717] src/chan_quectel.c: [quectel0][AT+QHUP] Timeout [OK]

<--- here's where asterisk dies ;-< --->
mpmc commented 1 year ago

I think I might have figured out why it crashes/becomes unresponsive.

I have the modem setup as wwan on the same Pi 4. Configured using qmi-network & a ping test script.

As the modem drops to 3G (to make the call), the network for wwan goes down too, this causes qmi-network/scripts/systemd to restart wwan, which of course also uses the same ttyUSB2 data port as asterisk, causing a backlog!

If you set the modem to only use 3G it does not crash, and I suspect it won't if using 4G with working VoLTE.

I do have another EP06 with another SIM that has working VoLTE. Oddly I did manage to get VoLTE working with this modem/SIM but it just random decided to stop working. I may reflash the firmware/swap modems & SIMs.

I also found a different "bug"(?) - Update not a bug!

The issue was due to the fact that asterisk had to translate gsm to slin - which apparently is quite costly!

RoEdAl commented 1 year ago

Instead of QMI network mode you may try NDIS one. This solution seems more stable to me. In this mode standard network interface should appear. In my case this is usb0:

# ip a

...
9: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000
    link/ether 42:d1:d4:e4:a7:8a brd ff:ff:ff:ff:ff:ff

Then you configure this interface as DHCP client.


AT commands required to activate NDIS mode:

AT+QCFG="usbnet",3
AT+CGDCONT=1,"IPV4V6","YOUR_APN"
AT+CGACT=1,1
AT+CFUN=1,1

In the second command you should specify your APN name. The last command just resets module. After reset new network interface should appear.

See also: QCFG AT Commands Manual.