asalles / asterisk-chan-dongle

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

Preferred Message Storage AT+CPMS in ME not suuported by Huawei E352 #137

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
hi!

didn't have any success using Huawei E352 together with chan_dongle. in 
Asterisk I always get the following errors.

raspbx*CLI> 
    -- [dongle0] Trying to connect on /dev/ttyUSB2...
    -- [dongle0] Dongle has connected, initializing...
    -- [dongle0] Dongle has disconnected
    -- [dongle0] Trying to connect on /dev/ttyUSB2...
    -- [dongle0] Dongle has connected, initializing...
    -- [dongle0] Dongle has disconnected
raspbx*CLI> 

this is Asterisk 11.3.0 in FreePBX 2.11.0.4 on Linux 3.6.11+ on a Raspberry Pi. 
just using the distribution of http://www.raspberry-asterisk.org/.

done stracing on AT commands with strace -f -v -tt -p <pidofasterisk> 2>&1 | 
egrep "(write\(27|readv\(27)"
[pid  4868] 15:15:29.407192 write(27, "4814 27", 7) = 7
[pid  4956] 15:15:29.437565 write(27, "AT\r", 3) = 3
[pid  4956] 15:15:29.444475 readv(27, 
[{"\r\nOK\r\nR\0\n\"002B003400330036003700"..., 2048}], 1) = 6
[pid  4956] 15:15:29.446766 write(27, "ATZ\r", 4) = 4
[pid  4956] 15:15:29.458470 readv(27, 
[{"\r\nOK\r\nR\0\n\"002B003400330036003700"..., 2048}], 1) = 6
[pid  4956] 15:15:29.460746 write(27, "ATE0\r", 5) = 5
[pid  4956] 15:15:29.472521 readv(27, 
[{"\r\nOK\r\nR\0\n\"002B003400330036003700"..., 2048}], 1) = 6
[pid  4956] 15:15:29.474901 write(27, "AT+CGMI\r", 8) = 8
[pid  4956] 15:15:29.486632 readv(27, 
[{"\r\nhuawei\r\n\r\nOK\r\n3400330036003700"..., 2048}], 1) = 16
[pid  4956] 15:15:29.488964 write(27, "AT+CGMM\r", 8) = 8
[pid  4956] 15:15:29.500963 readv(27, 
[{"\r\nE352\r\n\r\nOK\r\n\0\n3400330036003700"..., 2048}], 1) = 14
[pid  4956] 15:15:29.503290 write(27, "AT+CGMR\r", 8) = 8
[pid  4956] 15:15:29.516589 readv(27, 
[{"\r\n21.106.04.00.55\r\n\r\nOK\r\n6003700"..., 2048}], 1) = 25
[pid  4956] 15:15:29.518900 write(27, "AT+CMEE=0\r", 10) = 10
[pid  4956] 15:15:29.530595 readv(27, 
[{"\r\nOK\r\n06.04.00.55\0\n\r\nOK\0\n6003700"..., 2048}], 1) = 6
[pid  4956] 15:15:29.532884 write(27, "AT+CGSN\r", 8) = 8
[pid  4956] 15:15:29.547946 readv(27, 
[{"\r\n35423404xxxxxxx\r\n\r\nOK\r\n6003700"..., 2048}], 1) = 25
[pid  4956] 15:15:29.550362 write(27, "AT+CIMI\r", 8) = 8
[pid  4956] 15:15:29.562402 readv(27, 
[{"\r\n23203xxxxxxxxxx\r\n\r\nOK\r\n6003700"..., 2048}], 1) = 25
[pid  4956] 15:15:29.564832 write(27, "AT+CPIN?\r", 9) = 9
[pid  4956] 15:15:29.577446 readv(27, [{"\r\n+CPIN: 
READY\r\n\r\nOK\r\nK\0\n6003700"..., 2048}], 1) = 22
[pid  4956] 15:15:29.579786 write(27, "AT+COPS=0,0\r", 12) = 12
[pid  4956] 15:15:29.591866 readv(27, [{"\r\nOK\r\nN: 
READY\0\n\r\nOK\0\nK\0\n6003700"..., 2048}], 1) = 6
[pid  4956] 15:15:29.594235 write(27, "AT+CREG=2\r", 10) = 10
[pid  4956] 15:15:29.606199 readv(27, [{"\r\nOK\r\nN: 
READY\0\n\r\nOK\0\nK\0\n6003700"..., 2048}], 1) = 6
[pid  4956] 15:15:29.608491 write(27, "AT+CREG?\r", 9) = 9
[pid  4956] 15:15:29.620948 readv(27, [{"\r\n+CREG: 
2,1,\"E310\",\"6CA7\"\r\n\r\nOK"..., 2048}], 1) = 34
[pid  4956] 15:15:29.623297 write(27, "AT+CNUM\r", 8) = 8
[pid  4956] 15:15:29.635403 readv(27, [{"\r\n+CNUM: 
\"0045006900670065006E00"..., 2048}], 1) = 103
[pid  4956] 15:15:29.637824 write(27, "AT^CVOICE?\r", 11) = 11
[pid  4956] 15:15:29.649390 readv(27, [{"\r\n^CVOICE: 0, 8000, 16, 
20\r\n\r\nOK"..., 2048}], 1) = 34
[pid  4956] 15:15:29.651743 write(27, "AT+CSCA?\r", 9) = 9
[pid  4956] 15:15:29.663652 readv(27, [{"\r\n+CSCA: 
\"002B003400330036003700"..., 2048}], 1) = 59
[pid  4956] 15:15:29.666087 write(27, "AT+CSSN=1,1\r", 12) = 12
[pid  4956] 15:15:29.677850 readv(27, [{"\r\nOK\r\nA: 
\"002B003400330036003700"..., 2048}], 1) = 6
[pid  4956] 15:15:29.679975 write(27, "AT+CMGF=0\r", 10) = 10
[pid  4956] 15:15:29.691805 readv(27, [{"\r\nOK\r\nA: 
\"002B003400330036003700"..., 2048}], 1) = 6
[pid  4956] 15:15:29.694166 write(27, "AT+CSCS=\"UCS2\"\r", 15) = 15
[pid  4956] 15:15:29.705841 readv(27, [{"\r\nOK\r\nA: 
\"002B003400330036003700"..., 2048}], 1) = 6
[pid  4956] 15:15:29.708116 write(27, "AT+CPMS=\"ME\",\"ME\",\"ME\"\r", 23) = 23
[pid  4956] 15:15:29.719998 readv(27, 
[{"\r\nERROR\r\n\"002B003400330036003700"..., 2048}], 1) = 9

clearly AT+CPMS="ME","ME","ME" causes an ERROR and afterwards dongle is 
disconnected.

but Huawei E352 only supports Preferred Message Storage on SIM.

atz
OK
ati
Manufacturer: huawei
Model: E352
Revision: 21.106.04.00.55
IMEI: 35423404xxxxxxx
+GCAP: +CGSM,+DS,+ES
OK
at+cpms=?
+CPMS: ("SM"),("SM"),("SM")
OK

adapt your SMS handling that its not depending on where SMS will be stored.

gre3tings, Klaus

Original issue reported on code.google.com by klaus.m....@gmail.com on 6 Jul 2013 at 3:03

GoogleCodeExporter commented 9 years ago
Thanks for response, Klaus

Original comment by bg_...@mail.ru on 30 Jul 2013 at 7:05

GoogleCodeExporter commented 9 years ago
Great. Thanks Klaus for this info.

I have simply binary patched the chan_dongle.so file an exchanged "ME" with 
"SM". 
Now the dongle (E352s-5) does not disconnect anymore.

Original comment by c.w...@mail.de on 2 Dec 2013 at 4:26

GoogleCodeExporter commented 9 years ago
Editing the binary worked for me as well on a E173L (VTR Chile).

Original comment by t...@carlin.com on 31 Jul 2014 at 7:43