RoEdAl / asterisk-chan-quectel

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

OpenWRT 23.03 and SIM7600E not connect #26

Open igodor opened 1 week ago

igodor commented 1 week ago

I installed your version of the chan-quectel plugin on a router with OpenWRT with a Simcom SIM7600E modem. Asterisk 20.5.2, openwrt 23.05.3 Cannot establish a connection to the modem, a connection error occurs and constantly reconnects.

-- [quectel0] Trying to connect on /dev/ttyUSB2... -- [quectel0] Connected, initializing... -- [quectel0] Manufacturer: SIMCOM INCORPORATED [quectel0] SimCOM module == [quectel0] Model: SIMCOM_SIM7600E == [quectel0] Revision identification: LE11B04SIM7600M21-A == [quectel0] IMEI: 800000000000000 == [quectel0] IMSI: 250000000000000 [quectel0] Location area code: 4E2B [quectel0] Cell ID: 16F45B1 == [quectel0] SMS service centre: +79000000000 == [quectel0] ICCID: +CCID: 8970000000000000000 == [quectel0] ICCID: 8970000000000000000 [Jun 19 11:50:03] NOTICE[7136]: src/at_response.c:2629 at_response_cpcmreg: [quectel0] SimCom - Voice channel inactive [Jun 19 11:50:03] ERROR[9437]: src/monitor_thread.c:119 check_dev_status: [quectel0][DATA] Lost connection: I/O error -- [quectel0] Error initializing channel [Jun 19 11:50:03] WARNING[9437]: src/tty.c:32 tty_close_lck: [TTY] Unable to disable exlusive mode for /dev/ttyUSB2: I/O error -- [quectel0] Disconnected -- [quectel0] Trying to connect on /dev/ttyUSB2... -- [quectel0] Connected, initializing... -- [quectel0] Manufacturer: SIMCOM INCORPORATED [quectel0] SimCOM module == [quectel0] Model: SIMCOM_SIM7600E == [quectel0] Revision identification: LE11B04SIM7600M21-A == [quectel0] IMEI: 800000000000000 == [quectel0] IMSI: 250000000000000 [quectel0] Location area code: 4E2B [quectel0] Cell ID: 16F45B1 == [quectel0] SMS service centre: +79000000000 == [quectel0] ICCID: +CCID: 8970000000000000000 == [quectel0] ICCID: 8970000000000000000 [Jun 19 11:51:03] NOTICE[7136]: src/at_response.c:2629 at_response_cpcmreg: [quectel0] SimCom - Voice channel inactive [Jun 19 11:51:03] ERROR[9628]: src/monitor_thread.c:119 check_dev_status: [quectel0][DATA] Lost connection: I/O error -- [quectel0] Error initializing channel [Jun 19 11:51:03] WARNING[9628]: src/tty.c:32 tty_close_lck: [TTY] Unable to disable exlusive mode for /dev/ttyUSB2: I/O error -- [quectel0] Disconnected -- [quectel0] Trying to connect on /dev/ttyUSB2... -- [quectel0] Connected, initializing... -- [quectel0] Manufacturer: SIMCOM INCORPORATED [quectel0] SimCOM module == [quectel0] Model: SIMCOM_SIM7600E == [quectel0] Revision identification: LE11B04SIM7600M21-A == [quectel0] IMEI: 800000000000000 == [quectel0] IMSI: 250000000000000 [quectel0] Location area code: 4E2B [quectel0] Cell ID: 16F45B1 == [quectel0] SMS service centre: +79000000000 == [quectel0] ICCID: +CCID: 8970000000000000000 == [quectel0] ICCID: 8970000000000000000 [Jun 19 11:52:03] NOTICE[7136]: src/at_response.c:2629 at_response_cpcmreg: [quectel0] SimCom - Voice channel inactive [Jun 19 11:52:03] ERROR[9637]: src/monitor_thread.c:119 check_dev_status: [quectel0][DATA] Lost connection: I/O error -- [quectel0] Error initializing channel [Jun 19 11:52:03] WARNING[9637]: src/tty.c:32 tty_close_lck: [TTY] Unable to disable exlusive mode for /dev/ttyUSB2: I/O error -- [quectel0] Disconnected

Everything works correctly on the original plugin(https://github.com/IchthysMaranatha/asterisk-chan-quectel). Can you tell me what settings need to be made?

RoEdAl commented 1 week ago
igodor commented 1 week ago

How to check if another process is in use on this ttyUSB2 port? Only 1 device quectel0 is configured in quectel.conf: data=/dev/ttyUSB2 audio=/dev/ttyUSB4 Asterisk was started by the user ssterisk and dialout,audio groups User "asterisk" has been added to the dialout and audio groups No problem with power supply

RoEdAl commented 1 week ago

How to check if another process is in use on this ttyUSB2 port?

This is OpenWRT with rather limited number of services. Also, lsof utility may be used.

No problem with power supply

Have you at least checked output of logread (dmesg) command?

mpmc commented 1 week ago

I had something similar to this on the GL-XE300 on Openwrt with the EC25, turns out I had made two mistakes.

That was a fun evening on lack of sleep!

Mostly off-topic (but slighty related?) I also had some fun trying to power the SIM7600G [4G pi hat and USB version of the same thing from Waveshare], and two Quectel EP06! No matter what USB3 hubs/power supplies/routers I've tried so far, (3 so far and a Belkin RT1800 AX router, all the hubs can power a 2a + USB hard drive no problem). Still, the bloody modules would boot up then reset when I tried to use them. I've yet to find a reliable way to power them without resetting/looping due to the power draw bursts. I think having a wiki page of known good methods to power the modules might be a good idea?
RoEdAl commented 1 week ago
Mostly off-topic * It is a good idea to get persistent TTY device names using [udev rules](https://chan-dongle.blogspot.com/2018/08/what-to-do-if-ttyusb-number-change.html). On OpenrWRT you may try [my hotplug script](https://github.com/RoEdAl/persistent-tty). * You may try [this](https://www.olimex.com/Products/USB-Modules/USB-CAP/) little gadget from *Olimex*.