atefsaeed2010 / asterisk-chan-dongle-01

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

E173 not detected by IMEI #96

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When the modem configured by "data=" and "audio" the modem works fine
but wen i configure the modem with IMEI it's not detected by chan_dongle, i am 
using Ubuntu 12.04.1 LTS and asterisk 1.6.20

BTW: other modems works fine by IMEI only the E173 does not working

Original issue reported on code.google.com by mabbas....@gmail.com on 15 Oct 2012 at 6:18

GoogleCodeExporter commented 9 years ago
i think you not use mode_switch for yours E173 

Original comment by bg_...@mail.ru on 21 Nov 2012 at 8:35

GoogleCodeExporter commented 9 years ago
Issue 90 has been merged into this issue.

Original comment by bg_...@mail.ru on 21 Nov 2012 at 8:44

GoogleCodeExporter commented 9 years ago
Could you provide output from "lsusb" to see, which Vendor and Product IDs you 
have.

Original comment by artem.g....@gmail.com on 4 Sep 2013 at 8:07

GoogleCodeExporter commented 9 years ago
Well, I spent some time today to investigate this issue. Seems some (may be 
all) E173 modems after modeswitch become 12d1:1436 instead of well known 
12d1:140c or any other. Solution is simple as usual - add line to device_ids:
{ 0x12d1, 0x1436, { 4, 3, /* 0 */ } },<><------>/* E173 */
this modem also have different audio/data interface numbers comparing to other 
modems. So, just apply diff and it will work :)

For information:
dmesg:

[2174885.572020] usb 7-6: new high-speed USB device number 81 using ehci-pci
[2174885.705884] usb 7-6: New USB device found, idVendor=12d1, idProduct=1436
[2174885.705888] usb 7-6: New USB device strings: Mfr=4, Product=3, 
SerialNumber=0
[2174885.705891] usb 7-6: Product: HUAWEI Mobile
[2174885.705894] usb 7-6: Manufacturer: HUAWEI Technology
[2174885.708883] option 7-6:1.0: GSM modem (1-port) converter detected
[2174885.709011] usb 7-6: GSM modem (1-port) converter now attached to ttyUSB0
[2174885.710567] cdc_ether 7-6:1.1 wwan0: register 'cdc_ether' at 
usb-0000:00:1a.7-6, Mobile Broadband Network Device, 02:50:f3:00:00:00
[2174885.710733] option 7-6:1.3: GSM modem (1-port) converter detected
[2174885.710812] usb 7-6: GSM modem (1-port) converter now attached to ttyUSB1
[2174885.710927] option 7-6:1.4: GSM modem (1-port) converter detected
[2174885.710999] usb 7-6: GSM modem (1-port) converter now attached to ttyUSB2
[2174885.711403] scsi1112 : usb-storage 7-6:1.5
[2174885.711773] scsi1113 : usb-storage 7-6:1.6
[2174886.709659] scsi 1112:0:0:0: CD-ROM            HUAWEI   Mass Storage     
2.31 PQ: 0 ANSI: 2
[2174886.710654] scsi 1113:0:0:0: Direct-Access     HUAWEI   SD Storage       
2.31 PQ: 0 ANSI: 2
[2174886.710834] sd 1113:0:0:0: Attached scsi generic sg7 type 0
[2174886.713646] sd 1113:0:0:0: [sdg] Attached SCSI removable disk
[2174886.714894] sr1: scsi-1 drive
[2174886.715204] sr 1112:0:0:0: Attached scsi CD-ROM sr1
[2174886.715897] sr 1112:0:0:0: Attached scsi generic sg8 type 5
[2174898.028010] option1 ttyUSB0: option_instat_callback: error -108

lsusb:
Bus 007 Device 082: ID 12d1:1436 Huawei Technologies Co., Ltd.

ps: any methods with modeswith found on forums related to this is issue does 
not work. I tried many different messages, ids and so on.

Original comment by sergey.b...@gmail.com on 18 Oct 2013 at 6:44

Attachments:

GoogleCodeExporter commented 9 years ago
Oh, forgot discovery log before I set proper port numbers:

[Oct 18 10:31:22] DEBUG[30794]: chan_dongle.c:536 pvt_discovery: [dongle0] 
Trying ports discovery for IMEI 3565XXXXXXXXXXX
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/1-1
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:411 pdiscovery_lookup_ids: 
[dongle0 discovery] found /sys/bus/usb/devices/1-1 is idVendor 046e idProduct 
5250
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/7-6
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:411 pdiscovery_lookup_ids: 
[dongle0 discovery] found /sys/bus/usb/devices/7-6 is idVendor 12d1 idProduct 
1436
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:699 pdiscovery_check_device: 
[dongle0 discovery] should ports <-> interfaces map for 12d1:1436 voice=02 
data=03
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:378 pdiscovery_interfaces: 
[dongle0 discovery] found InterfaceNumber 00 port /dev/ttyUSB0
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:378 pdiscovery_interfaces: 
[dongle0 discovery] found InterfaceNumber 03 port /dev/ttyUSB1
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:378 pdiscovery_interfaces: 
[dongle0 discovery] found InterfaceNumber 04 port /dev/ttyUSB2
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/3-0:1.0
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/4-0:1.0
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/5-0:1.0
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/6-0:1.0
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/7-0:1.0
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/7-6:1.0
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/7-6:1.1
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/7-6:1.2
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/7-6:1.3
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/7-6:1.4
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/7-6:1.5
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/7-6:1.6
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/1-0:1.0
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/1-1:1.0
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/1-1:1.1
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/8-0:1.0
[Oct 18 10:31:22] DEBUG[30794]: pdiscovery.c:722 pdiscovery_request_do: 
[dongle0 discovery] checking /sys/bus/usb/devices/2-0:1.0
[Oct 18 10:31:22] DEBUG[30794]: chan_dongle.c:564 pvt_discovery: [dongle0] Not 
found ports for IMEI 3565XXXXXXXXXXX

Original comment by sergey.b...@gmail.com on 18 Oct 2013 at 6:47

GoogleCodeExporter commented 9 years ago
That is similar to what I've done with my E173 modems. 

If you switch dongle to modem only mode using "AT^U2DIAG=0" - this will change 
its ProductID and USB port numbers. 

I have 2 E173 modems. Both set to modem only mode, and here is how it is 
detected by the system:
Bus 001 Device 002: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 
LTE/UMTS/GSM Modem/Networkcard
Bus 001 Device 004: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 
HSDPA Modem

asterisk*CLI> dongle show devices
ID           Group State      RSSI Mode Submode Provider Name  Model      
Firmware          IMEI             IMSI             Number
dongle0      0     Free       13   0    0       life:)         E173       
21.157.71.00.388  86xxxxxxxxxxxxx  25506xxxxxxxxxx  Unknown
dongle1      0     Free       19   3    3       Kyivstar       E173       
11.126.16.04.174  86xxxxxxxxxxxxx  25503xxxxxxxxxx  +38097xxxxxxx

As you can see - they have different firmware versions 21 and 11. 

Here is how I've changed pdiscovery.c:

//      { 0x12d1, 0x1001, { 2, 1, /* 0 */ } },          /* E1550 and generic */
        { 0x12d1, 0x1001, { 0, 1, /* 0 */ } },          /* E1550 and generic */
        { 0x12d1, 0x1506, { 0, 2, /* 0 */ } },          /* Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard */

Also, for modems with firmware "21." I had to add command "AT^PORTSEL=1" to the 
initialization sequence (this was done in at_command.c and at_command.h).

Hope this info will help somebody to resolve issues with E173 modems. Good 
luck! :)

Original comment by artem.g....@gmail.com on 18 Oct 2013 at 11:45

GoogleCodeExporter commented 9 years ago
I've the same modem
12d1:1506 Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard
pdiscovery.c has:
static const struct pdiscovery_device device_ids[] = {
    { 0x12d1, 0x1001, { 2, 1, /* 0 */ } },      /* E1550 and generic */
//  { 0x12d1, 0x1465, { 2, 1, /* 0 */ } },      /* K3520 */
    { 0x12d1, 0x140c, { 3, 2, /* 0 */ } },      /* E17xx */
    { 0x12d1, 0x1436, { 4, 3, /* 0 */ } },      /* E1750 */
    { 0x12d1, 0x1506, { 1, 2, /* 0 */ } },      /* E171 firmware 21.x : thanks Sergey Ivanov */
};

I understand that the model 1506 has already been added...
But I dont know where to put the AT^PORTSEL=1

Original comment by betore...@gmail.com on 10 Feb 2015 at 5:43

GoogleCodeExporter commented 9 years ago
Hello, I am trying to configure (below) but really can´t make asterisk 
recognize it, tried different asterisk versions and debians. can some wone 
assist me? thanks a lot.

Manufacturer: huawei
Model: E173
Revision: 21.015.01.04.266
12d1:1c05 Huawei Technologies Co., Ltd. E173s 3G broadband stick (modem on)

Original comment by miltonro...@gmail.com on 15 Feb 2015 at 7:16