asalles / asterisk-chan-dongle

Automatically exported from code.google.com/p/asterisk-chan-dongle
Other
0 stars 0 forks source link

Custom init string (to send at^portsel=1 for E173) #152

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. buy Huawei E173 by life:) (Ukraine)
2. Install usb_modeswitch and etc... modem switched VID:PID from 12d1:14fe to 
12d1:1506
3. Configure according to wiki/docs/whatever 
4a. try to call to dongle - inbound call is not detected. 
4b. try to make outbound call - it gets released/terminated due to timeout on 
response

Root cause: 
Default value for ^portsel=0 which means that proactive event reports are sent 
to "PCUI port". chan_donle do not listen to this port. 

Workaround: set ^portsel=1 before attaching modem to asterisk

Solution (Enhancement): Need an ability to send custom init string during 
initialization phase OR make chan_dongle to listen PCUI port as well. 

Original issue reported on code.google.com by artem.g....@gmail.com on 22 Sep 2013 at 7:55

GoogleCodeExporter commented 9 years ago
This also cause problems with receiving SMS described in "Issue 147":
https://code.google.com/p/asterisk-chan-dongle/issues/detail?id=147

As a workaround I've changed at_command.c in the following way: 

/usr/src/asterisk-chan-dongle-asterisk11# diff at_command.c.orig at_command.c
129c129
<       static const char cmd16[] = "AT+CNUM\r";
---
> //    static const char cmd16[] = "AT+CNUM\r";
138a139
>       static const char cmd25[] = "AT^PORTSEL=1\r";
158c159
<               ATQ_CMD_DECLARE_ST(CMD_AT_CNUM, cmd16),         /* Get 
Subscriber number */
---
> //            ATQ_CMD_DECLARE_ST(CMD_AT_CNUM, cmd16),         /* Get 
Subscriber number */
171a173
>               ATQ_CMD_DECLARE_ST(CMD_AT_PORTSEL, cmd25),              /* 
Proactive event report port => 1 = Modem port; 0 = PCUIPort */

Original comment by artem.g....@gmail.com on 12 Nov 2013 at 10:28

GoogleCodeExporter commented 9 years ago
custom init is good idea.
current workaround is - run scripts from udev when device attached 

Original comment by bg_...@mail.ru on 30 Dec 2013 at 9:41