Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discovery by imei problem. #37

Open
laigor opened this issue Jul 17, 2017 · 8 comments
Open

Discovery by imei problem. #37

laigor opened this issue Jul 17, 2017 · 8 comments

Comments

@laigor
Copy link

laigor commented Jul 17, 2017

in dongle.conf:
[dongle0]
imei=867455001874393

[dongle3]
imei=867455001874393

All modems huawei e173
asterisk console:
[Jul 17 15:58:26] ERROR[18905]: at_response.c:118 at_response_ok: [dongle0] Received unexpected 'OK'
[Jul 17 15:58:28] ERROR[18943]: chan_dongle.c:440 do_monitor_phone: [dongle3] timedout while waiting 'OK' in response to 'AT'
[Jul 17 16:08:20] ERROR[18942]: at_response.c:118 at_response_ok: [dongle3] Received unexpected 'OK'
[Jul 17 16:08:22] ERROR[18904]: pdiscovery.c:570 pdiscovery_do_cmd: [dongle0 discovery] failed to get valid response from /dev/ttyUSB8 in 500 msec
It seems the messages destined for the dongle3 are sent to the wrong com port...

Centos 7 x64 asterisk 13.16.0

@wdoekes
Copy link
Owner

wdoekes commented Jul 24, 2017

Too little info. I can't deduce any cause from these error messages alone.

@CpServiceSpb
Copy link

If I disable or remove
audio=/dev/......
data=/dev/......
and add or enable
imei = ...............
I will not my dongle connected to dongle chan.
That is dongle show devices is empty.

@gamba47
Copy link

gamba47 commented Aug 28, 2017

When you start asterisk without any dongle configured, you can search for a device with this command:

Asterisk *CLI> dongle discovery 
; discovered device
[dc_0177_0724](defaults)
;audio=/dev/ttyUSB1
;data=/dev/ttyUSB2
imei=35921103712xxxx
imsi=72234124377xxxx

As you can see, there is "imei" but "imsi" is important too. Those lines show a common configuration for dongle.conf. Showing the actual ttyUSB# used by audio and data.

You need to put both lines in your dongle.conf

Best regards.

Emiliano - gamba47

@oooo1
Copy link

oooo1 commented Aug 30, 2017

How is to specify /dev/............. ?
I reassigned /dev/ttyUSB9 to /dev/devModem.
Even not /dev/ttyUSB1.
But dongle discovery requests /dev/ttyUSB1 only.
The error message is:
at_read.c:101 at_read: [/dev/ttyUSB1] at cmd receive buffer overflow
pdiscovery.c:565 pdiscovery_do_cmd: [MyHuawei discovery] read from /dev/ttyUSB1 failed: Inappropriate ioctl for device

I knew imei and imsi through minicom, specified it at dongle.conf and noone dongle appeared by 'dongle show devices' . More correctly,device from dongle.conf is shown but as not connected.

@gamba47
Copy link

gamba47 commented Aug 31, 2017

Post the output of this commands (as root):

  • lsusb
  • asterisk -rx "dongle show devices"
  • asterisk -rx "dongle discovery"
  • cat /etc/asterisk/dongle.conf

best regards.

@oooo1
Copy link

oooo1 commented Sep 1, 2017

Here is:

**lsusb**
Bus 002 Device 005: ID 04d8:f94f Microchip Technology, Inc.
Bus 002 Device 011: ID 1076:8002 GCT Semiconductor, Inc. LU150 LTE Modem
Bus 002 Device 010: ID 19d2:0031 ZTE WCDMA Technologies MSM MF110/MF627/MF636
Bus 002 Device 007: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard
Bus 002 Device 008: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard
Bus 002 Device 006: ID 14cd:8601 Super Top
Bus 002 Device 004: ID 2109:2813 VIA Labs, Inc.
Bus 002 Device 003: ID 0d3d:0040 Tangtop Technology Co., Ltd PS/2 Adapter
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0557:2221 ATEN International Co., Ltd Winbond Hermon
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

**asterisk -rx "dongle show devices"**
ID           Group State      RSSI Mode Submode Provider Name       Model      Firmware          IMEI        IMSI             Number
Huawei007     0     Free       14   0    0       My carrier          E367       11.838.01.00.1131 My imei    My imsi        Unknown

My carrier, my imei, my imsi are changed from real correct values.
**asterisk -rx "dongle discovery"**
; discovered device
[dc__](defaults)
;audio=/dev/ttyUSB2
;data=/dev/ttyUSB1
imei=
imsi=
**cat /etc/asterisk/dongle.conf**
[general]

interval=15                     ; Number of seconds between trying to connect to devices

[Huawei007]

context=DID_007          ; context for incoming calls
group=0                         ; calling group
rxgain=4                        ; increase the incoming volume; may be negative
txgain=4                        ; increase the outgoint volume; may be negative
autodeletesms=yes               ; auto delete incoming sms
resetdongle=yes                 ; reset dongle during initialization with ATZ command
u2diag=-1                       ; set ^U2DIAG parameter on device (0 = disable everything except modem function) ; -1 not use ^U2DIAG command
usecallingpres=yes              ; use the caller ID presentation or not
callingpres=allowed_passed_screen ; set caller ID presentation          by default use default network settings
disablesms=no                   ; disable of SMS reading from device when received
                                ;  chan_dongle has currently a bug with SMS reception. When a SMS gets in during a
                                ;  call chan_dongle might crash. Enable this option to disable sms reception.
                                ;  default = no
language=ru                     ; set channel default language
smsaspdu=yes                    ; if 'yes' send SMS in PDU mode, feature implementation incomplete and we strongly recommend say 'yes'
mindtmfgap=45                   ; minimal interval from end of previews DTMF from begining of next in ms
mindtmfduration=80              ; minimal DTMF tone duration in ms
mindtmfinterval=200             ; minimal interval between ends of DTMF of same digits in ms

callwaiting=yes                 ; if 'no' waiting calls just ignored

disable=no                      ; OBSOLETED by initstate: if 'yes' no load this device and just ignore this section

initstate=start         ; specified initial state of device, must be one of 'stop' 'start' 'remote'

exten=007                ; exten for start incoming calls, only in case of Subscriber Number not available!, also set to CALLERID(ndid)

dtmf=relax                      ; control of incoming DTMF detection, possible values:
                                ;   off    - off DTMF tones detection, voice data passed to asterisk unaltered
                                ;              use this value for gateways or if not use DTMF for AVR or inside dialplan
                                ;   inband - do DTMF tones detection
                                ;   relax  - like inband but with relaxdtmf option
                                ;  default is 'relax' by compatibility reason

audio=/dev/Modem007Audio  ; Only if such port is mapped at /etc/udev folder               ; tty port for audio connection;        no default value
data=/dev/Modem007Data         ; Only if such port is mapped at /etc/udev folder               ; tty port for AT commands;             no default value

@gamba47
Copy link

gamba47 commented Sep 4, 2017

Ok, dongle discovery only show new and unconfigured modems at your server.

Please do this:

  1. Edit dongle.conf and comment audio and data lines (the last two lines of this)
  2. restart asterisk
  3. check "asterisk -rx "dongle show devices". You need to see this empty
  4. Then run "asterisk -rx "dongle discovery" and you will see your IMEI and IMSI.

Best regards.

Emiliano -

@oooo1
Copy link

oooo1 commented Sep 6, 2017

Nothing changed.

asterisk -rx "dongle show devices"
ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number

asterisk -rx "dongle discovery"

; discovered device
[dc__](defaults)
;audio=/dev/ttyUSB2
;data=/dev/ttyUSB1
imei=
imsi=

shalzz pushed a commit to shalzz/asterisk-chan-dongle that referenced this issue Apr 23, 2022
# This is the 1st commit message:

Create DONATIONS.txt
# This is the commit message wdoekes#2:

Update README.md
# This is the commit message wdoekes#3:

Update DONATIONS.txt
# This is the commit message wdoekes#4:

Update DONATIONS.txt
# This is the commit message wdoekes#5:

Update DONATIONS.txt
# This is the commit message wdoekes#6:

Update chan_quectel.h
# This is the commit message wdoekes#7:

Update README.md
# This is the commit message wdoekes#8:

Update cpvt.h
# This is the commit message wdoekes#9:

Add files via upload
# This is the commit message wdoekes#10:

Delete DONATIONS.txt
# This is the commit message wdoekes#11:

Update README.md
# This is the commit message wdoekes#12:

Update README.md
# This is the commit message wdoekes#13:

Update README.md
# This is the commit message wdoekes#14:

Add files via upload
# This is the commit message wdoekes#15:

Update README.md
# This is the commit message wdoekes#16:

Update README.md
# This is the commit message wdoekes#17:

Update README.md
# This is the commit message wdoekes#18:

Update README.md
# This is the commit message wdoekes#19:

Update README.md
# This is the commit message wdoekes#20:

Update README.md
# This is the commit message wdoekes#21:

Update README.md
# This is the commit message wdoekes#22:

Update README.md
# This is the commit message wdoekes#23:

Add files via upload

Added Simcom support
# This is the commit message wdoekes#24:

Update README.md
# This is the commit message wdoekes#25:

Update README.md
# This is the commit message wdoekes#26:

Added support for Quectel UAC configuration
# This is the commit message wdoekes#27:

Conf file when using UAC
# This is the commit message wdoekes#28:

Update README.md
# This is the commit message wdoekes#29:

Update README.md
# This is the commit message wdoekes#30:

Quectel CREG correction

chan_dongle code assumes 4 parameters in response to command and 3 for URC. However quectel provides 5 and 4 respectively. This fix helps pass on correct status of registration.
# This is the commit message wdoekes#31:

No force registration status

Due to CREG parse issues, earlier registration status was always kept on, now will show unregistered if not connected to network
# This is the commit message wdoekes#32:

Create readme.md
# This is the commit message wdoekes#33:

For compilation with openwrt sdk
# This is the commit message wdoekes#34:

Support for openwrt sdk compilation
# This is the commit message wdoekes#35:

Fix for lac and cell id

Ref IchthysMaranatha#6
Post fix values may have a trailing double quote for quectel devices
# This is the commit message wdoekes#36:

Updated call ids for simcom

Add call termination for call ids 1 and 2
# This is the commit message wdoekes#37:

comment for simcom audio

Added default audio port for simcom in comment
# This is the commit message wdoekes#38:

Integrated ALSA support for UAC

Integrated driver for ALSA added, no need for bridging additional Asterisk ALSA channel when using UAC mode. Please use non-ALSA integrated branch if there is no need for UAC and you wish to avoid alsa dependency when compiling and running
# This is the commit message wdoekes#39:

Update COPYRIGHT.txt

Attribute copyright for alsa code copied from chan_alsa.c https://github.com/asterisk/asterisk/blob/master/channels/chan_alsa.c
# This is the commit message wdoekes#40:

Update README.md
# This is the commit message wdoekes#41:

Conf file with UAC device support
# This is the commit message wdoekes#42:

UAC mode conf file
# This is the commit message wdoekes#43:

Added alsa-lib for compilation
# This is the commit message wdoekes#44:

Delete Makefile.in
# This is the commit message wdoekes#45:

alsa-lib dependency addition
# This is the commit message wdoekes#46:

Fix for simcom audio issues with immediate answer in dialplan
# This is the commit message wdoekes#47:

Note for Quectel serial audio

Added remark to disable gps messages
# This is the commit message wdoekes#48:

Added note for Pi users
# This is the commit message wdoekes#49:

Quectel creg formatting fix

Removed trailing double quotes in reporting lac/cid
# This is the commit message wdoekes#50:

add gitattributes
# This is the commit message wdoekes#51:

Send DTMF using AT command

Corrected at command for dtmf generation
# This is the commit message wdoekes#52:

Fix for busy on call rejection for simcom

For those who receive 'busy' additionally on call rejection when dialling out. Author only receives 'no carrier' on rejection. Reported and solved by @mpmc here IchthysMaranatha#22
# This is the commit message wdoekes#53:

Removal of redundant closetty
# This is the commit message wdoekes#54:

Update busy fix for call rejection

Updated fix as submitted by @mpmc here IchthysMaranatha#22
Author does not receive busy response on call rejection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants