FAQ For Huawei 3G USB Modem and Asterisk
FAQ For Huawei 3G USB Modem and Asterisk
Introduction
chan_dongle is an Asterisk channel driver for Huawei UMTS/3G USB modems (dongles). At this moment, the supported features are: Voice calls, dialling by modem name, group, round robin, provider name, IMEI or IMSI. Call waiting Call holding Conference (multiparty) call Send SMS from CLI, asterisk manager and dialplan Receive SMS (latin charset and multiline included) Send USSD Receive USSD (latin charset and multiline included) Send DTMF (excluding A,B,C,D letters not supported by Huawei) Receive DTMF -----------------------------------------------------------------------------------------------List of Supported Models At this moment, only Huawei models are supported. ZTE is on the road Note: Some users report bad voice quality using Centos 5 (i.e. Elastix). So, please, be careful with old kernels (i.e. 2.6.18) Huawei Device Model Voice SMS USSD Note E150 - ? ? One way voice 1) E153 + ? ? E1550 + + + E1552 + + + E156 ? ? ? test required E160 ? ? ? test required E1612 - + + E166 ? ? ? test required E169 + + + E1692 + + + E169G - ? ? test required E171 + ? + E172 - ? ? test required E173 + + - 2) E175X + + + E1752C + + + Several interfaces 3) E178 ? ? ? test required E180 + + + ok by ramoncio E220 - + +
E270 - + + EG162G ? ? ? test required K3520 + + + K3565 - - - zte model? K3715 + + + K3765 + + + Same model as E1762 USB 2.0 For voice call feature, it's highly recommended the use of USB version 2.0 Power specs and USB hubs According to vendor specs, most usb modems have: 5V/500mA 2.5 W Almost every computer has USB ports where you can plug devices such as pen drives, bluetooth dongles, portable hard disks, etc. 3G modems can also be plugged, but power source may be a serious limitation. If your computer has several USB ports, you must check it can deliver all the power needed for your devices at the same time. Normally, USB ports can deliver only 500 mA, so if you have more than one modem (or other hungry devices) plugged, it's possible you get stuck with strange problems. Also, USB hubs can be a source of problems if you connect more than one 3G modem. 500 mA is not enough current for 2 or more dongles. In this case, external powered USB hub is recommended to avoid strange behavior, but be very careful with this, not any model is ok for this task. Some of them have serious problems with RF interferences from GSM side, making impossible to use chan_dongle. Please, check list of compatible USB hubs 1) See one way audio e150 2) May be cusd_use_7bit_encoding get correct USSD 3) Depending on value for at^u2diag, this modem show 3 or 4 interfaces -----------------------------------------------------------------------------------------------How to unlock Huawei modems? Modems are often bought from mobile operators and maybe have lock to prevent using SIM cards from other operators. If you do not plan to use SIM cards from other operators, skip this section. You have different ways to unlock: Unlock code using free calculators, help from people on other forums or buy code online. Once you have the code, enter to modem manually with programs like putty,
Once you have the code, enter to modem manually with programs like putty, terminal or minicom and use AT^CARDLOCK= < code > command Using tools like dc-unlocker or other similar tool Unlock tools: Huawei unlock Free Calculators: Huawei codes ZTE codes Update firmware The main source of firmware files are in dc-files. You can browse for your model and download firmware update (normally zip containing .exe file). For update, need windows computer (xp, vista or w7). The process is very straightforward, only execute exe file and follow indications. Some models need unlock code to flash firmware. You can use unlock huawei tools for that. After upgrade process, run dc-unlocker client to check if voice is enabled. How to activate voice on Huawei modems? There is a lot of different models from Huawei vendor. Primarly, they are used for data connection to internet, but some of them are voice capable. This means, that you can make calls with the right software. Some telcos include this piece of software, but, in any case, you can use Mobile Partner for that purpose in Windows systems. Only need to upgrade firmware and install tool. To know if your dongle supports voice, you can use two methods: Dc-Unlocker software Download latest version (only for windows) and check if your modem is voice capable or not. If supported, you can pay some money and activate automatically. Find DDSETEX and CVOICE chains Go to http://www.dc-files.com and download any stable firmware for your model. Firmware is .exe file, so you must edit (use any text editor like notepad or nano) and look for ^DDSETEX and ^CVOICE chains. If found, that means your modem is voice capable. The final step is to check if voice is enabled. A good solution is to use dc-unlocker client for that purpose. Models k3520, e169, k3765 and k3715 have voice enabled if you upgrade firmware. E1750 needs dc-unlocker voice activation. ------------------------------------------------------------------------------------------------
Installation Chan_dongle runs only in asterisk 1.6.2 and asterisk 1.8. Asterisk 1.4 is not supported.
A ei
Be ca ef
e 5060) a d RTP (
10000-20000) if
eeded f
ia i
fa ei a e ib e -de ib c e 5-de
a e - ` gcc g++
a.A ei
1.6 i e
ai ed, b
1.8
i ia .
ge h ://d ad .a e i . g/ b/ e e h 1.6.2.13. a .g a f a e i -1.6.2.13. a .g If i e F eePBX, he i a a e i -add ge h ://d add -1.6.2.2. a .g a f a e i -add N c ie ad .a e i . g/ -1.6.2.2. a .g b/ e e h
/a e i / e ea e /a e i -
/a e i / e ea e /a e i -
d c
&&
a e &&
a e i
a &&
a e
ge
Obtain source code If you installed asterisk as described here, go ahead. Anyway, check some dependencies like automake and autoconf. Also must have asterisk sources and development tools like make, gcc and so on. SVN Method svn checkout http://asterisk-chan-dongle.googlecode.com/svn/trunk/ dongle-readonly cd dongle-read-only autoconf && automake -a Compressed package Go to http://code.google.com/p/asterisk-chan-dongle/downloads/list and download .tgz package, then tar -zxvf chan_donle_%VERSION.r%REVISION.tgz cd chan_donle_%VERSION.r%REVISION Set Build options configure options: --enable-debug --disable-debug --enable-manager --disable-manager --enable-apps --disable-apps --with-asterisk=/path_to_source/asterisk.h usefull environment variables DESTDIR CFLAGS LDFLAGS Examples DESTDIR= /usr/lib/asterisk/modules ./configure ./configure with-asterisk=/usr/src/asterisk-1.6.2.13/include CFLAGS= -I /usr/src/asterisk-1.6.2.13/include ./configure ./configure --enable-debug ./configure --disable-apps --disable-manager CFLAGS= -O0 -g ./configure CFLAGS= -Os ./configure default is ./configure --disable-debug --enable-apps --enable-manager DESTDIR searching in /usr/lib/asterisk/modules /usr/local/lib/asterisk/modules /opt/local/lib/asterisk/modules and
Fo compile and b ild o ce o mod le make In alla ion Fo in all p ope config ed and b ild mod le:
do make in all Mod le Config a ion Once in alled, cop e ample file dongle- ead-onl /e c/dongle.conf /pa h_ o_a e i k_config/ (i.e. /e c/a e i k/). Config e i a de i ed and a e i k. To load, op o e a chan_dongle: CLI>mod le load chan_dongle. o CLI>mod le nload chan_dongle. o CLI>mod le eload chan_dongle. o -----------------------------------------------------------------------------------------------o a
chan_dongle config a ion All he info ma ion needed /pa h_ o_a e i k_config/dongle.conf. dongle.conf [gene al] in e al=15 ; N mbe of econd be een ing o connec o de ice b chan_dongle i o ed in
;------------------------------ JITTER BUFFER CONFIGURATION -------------------------;jbenable = e ; Enable he e of a ji e b ffe on he ecei ing ide of a ; Dongle channel. Defa l o "no". An enabled ji e b ffe ill ; be ed onl if he ending ide can c ea e and he ecei ing ; ide can no accep ji e . The Dongle channel can' accep ji e , ; h an enabled ji e b ffe on he ecei e Dongle ide ill al a ; be ed if he ending ide can c ea e ji e . ;jbfo ce = no ; Fo ce he e of a ji e b ffe on he ecei e ide of a Dongle ; channel. Defa l o "no". ;jbma i e = 200 ; Ma leng h of he ji e b ffe in milli econd .
;jb e
nc h e hold = 1000 ; J mp in
he f ame
ime amp
o e
hich
he
; ; ; ; ; ; ;( ; ; ;T ; ; ; ; = .T , .U / .D ;J
= 1000 ; J , , 1000. , ) " IAX2). D -" "( . ' 40, 40 . , . , = ' . " D
= 40 ; T .
) ^U2DIAG = ; = _ :// = . ; -
ID _ . SMS = ' SMS PDU . DTMF DTMF DTMF ' ' ; ; / / ID . E SMS . B .
; TEXT = =
settings ; if 'no' waiting calls just ignored disable=no ; if 'yes' no load this device and just ignore this section exten=+1234567890 ; exten for start incoming calls, only in case of Subscriber Number not available!, ; also set to CALLERID(dnid) dtmf=relax ; control of incoming DTMF detection, possible values: ; off - off DTMF tone detection, voice data passed to asterisk unaltered ; use this value for gateways or if you do not use IVR in diaplan ; inband - do DTMF tones detection ; relax - like inband but with relaxdtmf option ; default is 'relax' for backward compatibility
; dongle required settings [dongle0] audio=/dev/ttyUSB1 ; tty port for audio connection; data=/dev/ttyUSB2 ; tty port for AT commands; ; or you can omit both audio and data parameters and use imei=123456789012345 and/or imsi=612849384756451 ; imei and imsi must contain exactly 15 digits ! ; imei/imsi discovery is available on Linux only imei=123456789012345 imsi=612849384756451 ; if you set audio and data parameter together with imei and/or imsi, audio and data is used. ; you can use both imei and imsi together. In this case exact match by imei and imsi is required. Dialplan examples extensions.conf ; this is chunks of Asterisk extensions.conf file for show some chan_dongle features [general] [dongle-incoming] ; example of ussd receive exten => ussd,1,Set(type=${USSD_TYPE ) ; values from 0 till 5 ; 0 - USSD Notify ; 1 - USSD Request ; 2 - USSD Terminated by network ; 3 - Other local client has responded ; 4 - Operation not supported ; 5 - Network time out
; 5 - Network time out exten => ussd,n,Set(typestr=${USSD_TYPE_STR ) ; type in string, see above exten => ussd,n,Set(ussd=${USSD ) ; USSD text, but may be truncated by first \n exten => ussd,n,Set(ussd_multiline=${BASE64_DECODE(${USSD_BASE64 ) ) ; USSD text, may be multiline ; Note: this exten run in Local channel not attached to anything, also all CALLERID() is empty
; example of sms receive exten => sms,1,Set(sms=${SMS ) ; SMS text, but may be truncated by first \n exten => sms,1,Set(sms_multiline=${BASE64_DECODE(${SMS_BASE64 ) ) ; SMS text, may be multiline ; Note: this exten run in Local channel not attached to anything, also CALLERID(num) is address of SMS originator
; example of begining context execution from not default exten exten => +12345678901,1,Verbose(This exten executed if Subscriber Number is available and equal +12345678901 or exten setting value is +12345678901)
; example of channel variables setting by chan_dongle exten => s,1,Set(NAME_OF_DEVICE=${DONGLENAME ) ; for example 'dongle0' or 'dongle1' see dongle.conf exten => s,n,Set(NAME_OF_PROVIDE=${DONGLEPROVIDER ) ; for example see output of cli 'dongle show devices' column "Provider Name" exten => s,n,Set(IMEI_OF_DEVICE=${DONGLEIMEI ) ; for example see output of cli 'dongle show devices' column "IMEI" exten => s,n,Set(IMSI_OF_SIMCARD=${DONGLEIMSI ) ; for example see output of cli 'dongle show devices' column "IMSI" exten => s,n,Set(CNUM_NUMBER=${DONGLENUMBER ) ; Subscriber Number example see output of cli 'dongle show devices' column "Number" ; may be empty, use for save in SIM commands AT+CPBS="ON" and AT+CPBW=1,"+123456789",145 exten => s,n,Set(CNUM_NUMBER=${CALLERID(dnid) ) ; Set to Subscriber Number if available
; applications of chan_DONGLE exten => s,n,DongleStatus(dongle0,DONGLE0_STATUS) ; get status of device and store result in variable ; possible values of ${DONGLE0_STATUS ; -1 invalid argument ; 1 device not found ; 2 device connected ; 3 device connected and in use exten => s,n,DongleSendSMS(dongle0, "+18004005422", Hello how are you, Danila?, 1440, yes) ; send SMS on selected device and to specified number ; device name of Dongle device ; destination number in International format with leading '+' or w/o leading '+' ; message maximum 70 UCS-2 symbols ; validity period in minutes, will be round up to nearest possible value, optional default is 3 days ; report request if true report for this SMS is required, optional default is not
; functions of chan_dongle exten => s,n,GotoIf($["${CHANNEL(callstate) " == "waiting"]?waiting-call) ; now we provide channel function argument callstate ; possible values ; active ; enjoy and speek ; held ; this call is held ; dialing ; for outgoing calls ; alerting ; for outgoing calls, number dialed and called party ringing ; incoming ; for incoming calls ; waiting ; for incoming waiting calls; ; if callwaiting=no channels for waiting calls never created ; initialize ; never appear ; released ; never appear ; Answer on waiting call activate this call and place any other active calls ; on hold, but execution of dialplan for these calls not break stopped or frozen ; When active call terminated one of held becomes active. exten => s,n,Set(CHANNEL(callstate)=active) ; if callstate is 'held' you can assign new value 'active' ; its mean activate this call and place on hold all other active calls but ; execution of dialplan for these calls not break stopped or frozen
e en => ,n,Dial(Dongle/g1/holdo he :+79139131234) e en => ,n,Dial(Dongle/ 1/holdo he :+79139131234) e en => ,n,Dial(Dongle/p:PROVIDER NAME/holdo he :+79139131234) e en => ,n,Dial(Dongle/i:123456789012345/holdo he :+79139131234) e en => ,n,Dial(Dongle/ :25099/holdo he :+79139131234) ; no e add op ion 'holdo he ' fo dialing ; hi op ion do ; 1) When looking fo a ailable de ice b g o p, p o ide IMEI, ; IMSI p efi no igno e de ice i h ho e a e doe no ; p ohibi a ne o going call hen o he call place on hold ; ; 2) Befo e ac al dialing place ac i e call on hold ; b e ec ion of dialplan fo he e call no b eak opped o f o en ; 3) Thi call ill be ac i e if cce f ll an e ed ; BUG !!! ; e ed fo call ai ing and hold fea e H a ei E1550 ha a ne b g: ; When local ide hang p an call incl ding held call ALL o he call LOST o nd ; When emo e ide hang p ac i e call ALL o he call LOST o nd ; Plea e do ble check e hi fo o o no ; If e ed ce age of hi ef l fea e e en => ,n,Dial(Dongle/g1/confe ence:+79139131234) e en => ,n,Dial(Dongle/ 1/confe ence:+79139131234) e en => ,n,Dial(Dongle/p:PROVIDER NAME/confe ence:+79139131234) e en => ,n,Dial(Dongle/i:123456789012345/confe ence:+79139131234) e en => ,n,Dial(Dongle/ :25099/confe ence:+79139131234) ; and al o op ion 'confe ence' added ; hi op ion do ; 1) When looking fo a ailable de ice b g o p, p o ide IMEI, ; IMSI p efi no igno e de ice i h ho e a e doe no ; p ohibi a ne o going call hen o he call place on hold ; ; 2) Befo e ac al dialing place ac i e call on hold ; b e ec ion of dialplan fo he e call no b eak opped o f o en ; 3) If an e ed a ach hold call o con efence (in e m of GSM) ; Al o if c ea ed o going channel place call on ame de ice ha incoming channel ; bo h incoming and o going channel become eadonl o a oid he oice loop. ; ; ee al o BUG !!! no e abo e ------------------------------------------------------------------------------------------------
U age of chan_dongle Mod le managemen in A e i k Fo man al managemen of mod le a e i k CLI: o can e he follo ing command in
mod le load chan_dongle. o Load mod le in o A e i k. Config i ead f om /pa h_ o_a e i k_config/dongle.conf mod le nload chan_dongle. o Unload mod le f om A e i k. All modem a e de-a ached mod le eload chan_dongle. o Reload config a ion f om config file. If an change i done ince la load, hen i ill be applied no . I i e ac l ha dongle eload g acef ll chan_dongle CLI command chan_dongle p o ide he follo ing CLI command :
dongle cmd Send o he fcomm po on he de ice i h he pecified dongle e e Send eboo command o modem AT+CFUN=1,1 dongle op g acef ll S op g acef ll . P e en ne incoming and o going call and SMS and o going USSD f om a ing p, b allo call /SMS/USSD in p og e o con in e. When all he call /SMS/USSD ha e fini hed, op dongle op no S op no . S op immedia el , ending an call /SMS/USSD in p og e dongle op hen con enien S op hen con enien . Wai n il ha no call /SMS/USSD in p og e , and hen i op . I doe no p e en ne call /SMS/USSD f om en e ing he . dongle ho de ice e ing Sho e ing fo dongle ho de ice a e Sho de ailed a e fo dongle ho de ice a i ic Sho a i ic fo dongle ho de ice Sho mma i ed a e fo all de ice dongle ho e ion Sho mod le e ion dongle m Send SMS o i h he ing dongle pd Send PDU ing dongle d Send USSD command ing dongle a S a if no emo ed f om befo e. dongle e a g acef ll P e en ne incoming and o going call and SMS and o going USSD f om a ing p in , b allo call /SMS/USSD in p og e o con in e. When call/SMS/USSD ha fini hed, e a . Re a mean fi op de ice and econd eopen and ini iali e. dongle e a no Re a immedia el , ending an call /SMS/USSD in p og e . dongle e a hen con enien
dongle restart when convenient Waits until has no calls/SMS/USSD in progress, and then it restarts . It does not prevent new calls/SMS/USSD from entering the . dongle remove gracefully Prevents new incoming and outgoing calls and SMS and outgoing USSD from starting up in , but allows calls/SMS/USSD in progress to continue. When call/SMS/USSD has finished, stopping and removed from module. dongle remove now Remove from Asterisk immediately. dongle remove when convenient Waits until has no calls/SMS/USSD in progress and then remove . It does not prevent new calls/SMS/USSD from entering the . dongle reload gracefully Reloads the chan_dongle configuration gracefully dongle reload now Reloads the chan_dongle configuration now dongle reload when convenient Reloads the chan_dongle configuration when convenient. BUG: complete removed devices from dongle.conf not removed from module after reload. Use disable=yes as workaround. Dialplan applications The following applications are provided by chan_dongle: DongleStatus(, ) DongleSendSMS(, [,Message [, Validity [, Report]]]) Dialplan function The following functions are provided by chan_dongle: CHANNEL(callstate) when reading may has values active held dialing alerting incoming waiting initialize released unknown for example, you can separate incoming calls from waiting: [dongle-incoming] exten => s,1,GotoIf($["${CHANNEL(callstate) " = "waiting"]?waiting-call) Also, you can assign to this functions too, but this useful only when callstate changed from 'held' to 'active' and mean put on held other calls on this device and activate call linked with current asterisk channel. For example
ca
e e
i ai
f ee e
F each a e i ' cha e c ea ed b cha _d eg ) e cha e a iab e a e e DONGLENAME a e f de ice a e DONGLEPROVIDER a e a 'P ide Na e' c DONGLEIMEI a e a 'IMEI' c DONGLEIMSI a e a 'IMSI' c DONGLENUMBER a e a 'N be ' c F ' d' e e i fi c
g e (b h i c
i ga d
g i g
f 'd
ge h
a d
f 'd
ge h
a d
f 'd
ge h
a d
f 'd
ge h e
a d
i gc
a iab e a e e
USSD_TYPE be ic e f USSD Re
ef
0 i 5
e f ca
f USSD Re
e e c ded i gc e
Ba e64, e cha
ef e
he USSD i a iab e a e e
ii e
SMS C e
f SMS
Ba e64,
ef
he SMS i
ii e
ef
ge
TOA Type Of Address of SMS originator see also ${CALLERID(num)} Incoming calls On incoming call, chan_dongle tries to find matching exten in defined context (see dongle.conf). There is 3 different exten to search, in the following order: Subscriber Number stored in SIM. Number defined in variable exten in dongle.conf s exten To save Subscriber Number, you can write an entry for OWN NUMBERS storage on SIM. For example, in asterisk CLI dongle cmd dongle0 AT+CPBS=\"ON\" dongle cmd dongle0 AT+CPBW=1,\"+79139131234\",145 After restarting dongle0, incoming calls will start dialplan from exten exten => +79139131234,1,Noop() also variable CALLERID(dnid) will be set to +79139131234 If subscriber number is unknown, then you can set this in in dongle.conf exten = +79139131234 If subscriber number is unknown and there is no exten entry in dongle.conf, then s exten will be used as starting point in dialpan. Receive SMS and USSD You can handle received SMS and USSD using sms and ussd exten, respectively. Example for received sms [dongle-incoming-sms] exten => sms,1,Noop(Incoming SMS from ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})}) exten => sms,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} ${DONGLENAME} - ${CALLERID(num)}: ${BASE64_DECODE(${SMS_BASE64})}' >> /var/log/asterisk/sms.txt) exten => sms,n,Hangup() Example for received USSD [dongle-incoming-ussd] exten => ussd,1,Noop(Incoming USSD: ${BASE64_DECODE(${USSD_BASE64})}) exten => ussd,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} ${DONGLENAME}: ${BASE64_DECODE(${USSD_BASE64})}' >> /var/log/asterisk/ussd.txt) exten => ussd,n,Hangup() Also note, execution of this exten takes place in a Local channel.
Al a define m and d e en fo con e he e o handle incoming call fo dongle de ice! O he i e, incoming SMS o USSD can e ec e e en ion fo oice call i h np edic able e l . [dongle-incoming] incl de => dongle-incoming- m incl de => dongle-incomingd Al o no e ha h e en i e ec ed fo SMS/USSD j de o ed. Manage command Chan_dongle can p o ide he follo ing manage command : DongleSho De ice DongleSendUSSD DongleSendSMS DongleSendPDU DongleSe CCWA DongleRe e DongleRe a DongleS op DongleS a DongleRemo e DongleReload Manage E en Chan_dongle gene a e he follo ing manage e en :
DongleDe iceEn DongleSho De ice Comple e DongleUSSDS a DongleSMSS a DongleNe CUSD DongleNe USSD DongleNe USSDBa e64 DongleCEND DongleCallS a eChange DongleS a DongleNe CMGR DongleNe SMS DongleNe SMSBa e64 DonglePo Fail Con ole AT command Yo can end AT command CLI>dongle cmd Some ef l AT command : o an modem ing
W h a tt od oi ft t y U S Bn u m b e rc h a n g e ? F o re x a m p l e ,y o up l u gt w om o d e m sb u ti nd i f f e r e n to r d e r ,a n dw h e n p l u g m o d e m X f i r s t i t b e c o m e s / d e v / t t y U S B [ 0 2 ] ( d o n g l e 0 a s d e f i n e di nd o n g l e . c o n f ) B u ti fp l u gm o d e mYf i r s ti tb e c o m e s/ d e v / t t y U S B [ 0 2 ]( d o n g l e 0 ) a n dm o d e mXb e c o m e s/ d e v / t t y U S B [ 3 5 ]( d o n g l e 1 ) T h es a m ec a nh a p p e nw h e nr e b o o t i n gc o m p u t e r ,s o m e t i m e s Xb e c o m e s d o n g l e 0 ,b u ts o m e t i m e sd o n g l e 1 . T oa v o i dt h i si n d e t e r m i n a t i o ny o um a yu s e u d e vr u l e s C r e a t e/ e t c / u d e v / r u l e s . d / 9 9 h u a w e i l i n k . r u l e s w i t ht h ef o l l o w i n g l i n e s #a d ds y m l i n k sf o rd e v i c eb a s e do nU S Bb u sa d d r e s si . e .p h y s i c a l U S Bs l o t A C T I O N ! = " a d d | c h a n g e " ,G O T O = " d e v i c e _ h u a w e i _ e n d " # S U B S Y S T E M ! = " u s b " ,G O T O = " d e v i c e _ h u a w e i _ e n d " # A T T R S { i d V e n d o r } ! = " 1 2 d 1 " ,G O T O = " d e v i c e _ h u a w e i _ e n d " # A T T R S { i d P r o d u c t } = = " 1 4 4 6 " ,G O T O = " d e v i c e _ h u a w e i _ l i n k " # A T T R S { i d P r o d u c t } = = " 1 4 0 c " ,G O T O = " d e v i c e _ h u a w e i _ l i n k " # A T T R S { i d P r o d u c t } = = " 1 0 0 1 " ,G O T O = " d e v i c e _ h u a w e i _ l i n k " # G O T O = " d e v i c e _ h u a w e i _ e n d "
L A B E L = " d e v i c e _ h u a w e i _ l i n k "
L A B E L = " d e v i c e _ h u a w e i _ l i n k " #U S Bs l o tf r o ml e f tt or i g h t( b a c kl o o k ) #l e f t K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 1 : 1 . 0 " ,S Y M L I N K + = " h w m o d e m 0 " K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 1 : 1 . 1 " ,S Y M L I N K + = " h w a u d i o 0 " K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 1 : 1 . 2 " ,S Y M L I N K + = " h w d a t a 0 " K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 1 : 1 . 3 " ,S Y M L I N K + = " h w n e t 0 " #l e f tm i d d l e K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 2 : 1 . 0 " ,S Y M L I N K + = " h w m o d e m 1 " K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 2 : 1 . 1 " ,S Y M L I N K + = " h w a u d i o 1 " K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 2 : 1 . 2 " ,S Y M L I N K + = " h w d a t a 1 " K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 2 : 1 . 3 " ,S Y M L I N K + = " h w n e t 1 " #r i g h tm i d d l e K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 3 : 1 . 0 " ,S Y M L I N K + = " h w m o d e m 2 " K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 3 : 1 . 1 " ,S Y M L I N K + = " h w a u d i o 2 " K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 3 : 1 . 2 " ,S Y M L I N K + = " h w d a t a 2 " K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 3 : 1 . 3 " ,S Y M L I N K + = " h w n e t 2 " #r i g h t K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 4 : 1 . 0 " ,S Y M L I N K + = " h w m o d e m 3 " K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 4 : 1 . 1 " ,S Y M L I N K + = " h w a u d i o 3 " K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 4 : 1 . 2 " ,S Y M L I N K + = " h w d a t a 3 " K E R N E L = = " t t y U S B [ 0 9 ] * " ,I D = = " 1 4 : 1 . 3 " ,S Y M L I N K + = " h w n e t 3 " L A B E L = " d e v i c e _ h u a w e i _ e n d " I nt h i sc a s e ,I D= = i n d i c a t ew h a ti sd i s p l a y e di ny o u rd m e s g o u t p u ta f t e rp l u gt h em o d e mi nt h i sU S Bp o r ti nl i n e so fl i k e [ 4 8 5 4 . 3 4 4 4 6 0 ] o p t i o n 1 1 : 1 . 0 : G S M m o d e m ( 1 p o r t ) c o n v e r t e r d e t e c t e d I n d o n g l e . c o n fu s e t h i s s y m b o l i cl i n k s i n s t e a do f / d e v / t t y U S B x f i l e s [ d o n g l e 0 ] a u d i o = / d e v / h w a u d i o 0 d a t a = / d e v / h w d a t a 0 m o d e m sd i s c o v e r y S i n c e J a n 0 8 , 2 0 1 1 a n d r e v i s i o n 1 5 0 o f h t t p : / / c o d e . g o o g l e . c o m / p / a s t e r i s k c h a n d o n g l e y o u c a n u s e a l s o s i m p l e b u t p o w e r f u l f e a t u r e - d i s c o v e r y m o d e m s b y I M E I o r / a n d I M S In u m b e r s .F o re x a m p l e : [ d o n g l e 0 ] i m e i = 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 [ d o n g l e 1 ] i m s i = 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1
[ d o n g l e 2 ] i m e i = 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 i m s i = 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 E a c h t i m e b e f o r e d e v i c e o p e n i n g c h a n _ d o n g l e w i l l s e a r c h f o r d e v i c e sw i t hp r e d e f i n e dV e n d o r I D : P r o d u c t I Dp a i r s ,d e t e c tp o r t so r t h i sd e v i c e s ,a n dc h e c ki t sI M E Ia n dI M S I . m o d e md e t a c h i n gf r o ms y s t e mw h e nt r y i n gt oc a l l W h e nr e c e i v e di n c o m i n gc a l lo rb e g i n i n go u t g o i n gc a l lc h a n _ d o n g l e l o s tc o n n e c t i o nt od e v i c ea n dd e v i c ed i s a p p e a r sf r o ms y s t e m ,b u t a f t e raw h i l e ,i tc o m e sb a c k . I na s t e r i s kC L Ia p p e a r ss o m e t h i n gl i k et h a t - A t t e m p t i n g c a l l o n D o n g l e / d o n g l e 0 / 7 4 9 5 * * * * f o r a p p l i c a t i o n P l a y b a c k ( s i l e n c e / 1 0 )( R e t r y1 ) -D o n g l ed o n g l e 0h a sd i s c o n n e c t e d [ D e c3 01 6 : 1 2 : 0 9 ]N O T I C E [ 2 6 4 9 3 ] :p b x _ s p o o l . c : 3 3 9a t t e m p t _ t h r e a d : C a l lf a i l e dt og ot h r o u g h ,r e a s o n( 1 )H a n g u p d e b i a n * C L I > -D o n g l ed o n g l e 0t r y i n gt oc o n n e c to n/ d e v / t t y U S B 2 . . . -D o n g l ed o n g l e 0h a sc o n n e c t e d ,i n i t i a l i z i n g . . . -D o n g l ed o n g l e 0i n i t i a l i z e da n dr e a d y I nk e r n e ll o ga n dd m e s g D e c 3 0 1 5 : 1 4 : 1 0 V o i p G S M k e r n e l : [ 8 6 4 . 4 3 8 8 2 2 ] o p t i o n : o p t i o n _ i n s t a t _ c a l l b a c k :e r r o r8 4 D e c 3 0 1 5 : 1 4 : 1 0 V o i p G S M k e r n e l : [ 8 6 4 . 4 4 8 0 6 0 ] u s b 5 1 : U S B d i s c o n n e c t ,a d d r e s s3 D e c 3 0 1 5 : 1 4 : 1 0 V o i p G S M k e r n e l : [ 8 6 4 . 4 4 8 8 1 7 ] o p t i o n : o p t i o n _ i n s t a t _ c a l l b a c k :e r r o r1 0 8 A p o s s i b l e r e a s o n i s b a d f i r m w a r e 1 1 . 6 0 8 . 1 2 . 1 0 . 2 0 9 i n H u a w e i E 1 5 5 0 .T h i sv e r s i o no ff i r m w a r ea l l o wv o i c ec a l l si nW i n d o w sw i t h M o b i l eP a r t n e r ,b u ts e e m sn o tt ow o r ki nL i n u x: ) A n o t h e rr e a s o ni st h el a c ko fp o w e rf o rd e v i c ea tp e a kl o a dw h e n c a l li ss t a r t i n g . S M Sa n dU S S Dt r u n c a t e dt of i r s t\ ns y m b o l F o r e x a m p l e y o u s e n d H e l l o ! \ n H o w a r e y o u ? o n l y H e l l o ! b u t a s t e r i s k s h o w
T h er e a s o nf o rt h i sh i d d e ni na s t e r i s kv a r i a b l es u b s i t u t i o n ,a n d c a nb es o l v e db yu s eB A S E 6 4 _ D E C O D Ef u n c t i o n : $ { B A S E 6 4 _ D E C O D E ( $ { S M S _ B A S E 6 4 } ) } $ { B A S E 6 4 _ D E C O D E ( $ { U S S D _ B A S E 6 4 } ) }
C a l l e rp a r t yn o th e a r i n gr i n g b a c kt o n e W h e n f o r w a r d c a l l f r o m G S M r i n g b a c kt o n e . S I P c a l l e r p a r t y d o e s n o t h e a r
p h o n ei fa s t e r i s kb r i d g eG S Ma n dG S M . O n ew a yv o i c eo nH u a w e iE 1 5 0 B y d e f a u l t w i t h E 1 5 0 l o c a l p a r t y c a n l i s t e n w h a t t a l k i n g G S M p a r t y ,b u tG S Mp a r t yl i s t e ns i l e n c e . E 1 5 0r e q u i r ew r i t ez e r ol e n g t hf r a m ea f t e re a c h3 2 0b y t e s2 0 m so f v o i c ed a t aw r i t t e n .B u tl i n u xd r i v e rn a m e do p t i o n ,n o t h i n gk n o w a b o u tt h i sE 1 5 0' f e a t u r e ' . S o l u t i o ni sb u i l d s p e c i a lv e r s i o n so fo p t i o n d r i v e ra n dd r i v e r f o ro n l y d i a g n o s t i cp o r to f E 1 5 0 .T h e s o u r c e so ft h e s e c a nb e f o u n do nh t t p s : / / g i t h u b . c o m / N o v a x / k m o d h u a w e i v o i c e B r i e fi n s t r u c t i o nf o rd e b i a na n du b u n t u :I n s t a l lg i t s u d oa p t g e ti n s t a l lg i t I n s t a l ll i n u xk e r n e lh e a d e r sf o rv e r s i o no fy o u rk e r n e l s u d oa p t g e ti n s t a l ll i n u x h e a d e r s 2 . 6 . 3 5 2 2 I n s t a l ls o u r c e so fk m o d h u a w e i v o i c e c d/ u s r / s r c g i tc l o n eg i t : / / g i t h u b . c o m / N o v a x / k m o d h u a w e i v o i c e . g i t B u i l dk e r n e lm o d u l e c dk m o d h u a w e i v o i c e m a k e I n s t a l lm o d u l e( n o tf u l l yy e t ) / e t c / i n i t . d / a s t e r i s ks t o p r m m o do p t i o n i n s m o d. / o p t i o n . k o i n s m o d. / h u a w e i _ v o i c e . k o / e t c / i n i t . d / a s t e r i s ks t a r t R u n n i n ga s t e r i s ka sn o n r o o t Al o to fp e o p l ei sr u n n i n gA s t e r i s ka s a s t e r i s k u s e r .T h i sm a y c a u s e c h a n _ d o n g l e n o t d e t e c t i n g U S B m o d e m s . I n t h a t c a s e , y o u n e e d t o g i v e p e r m i s s i o n s f o r t t y U S B p o r t s . Y o u c a n d o t h a t a u t o m a t i c a l l yb y c r e a t i n gf i l e/ e t c / u d e v / r u l e s . d / 9 2 d o n g l e . r u l e s a n da d d i n g : K E R N E L = = " t t y U S B * " ,M O D E = " 0 6 6 6 " ,O W N E R = " a s t e r i s k " ,G R O U P = " u u c p " O t h e r s o l u t i o n s e t r u n u s e r / r u n g r o u p s e t t i n g s i n a s t e r i s k . c o n f f i l e . r u n g r o u p=d i a l o u t I n o t h e rw o r d s o w n e r , g r o u p ,p e r m i s s i o n s o n/ d e v / t t y U S B x f i l e s m u s ta l l o wr e a da n dw r i t eo p e r a t i o n sf o ra s t e r i s k ' sE U I D ,E G I D
m u s ta l l o wr e a da n dw r i t eo p e r a t i o n sf o ra s t e r i s k ' sE U I D ,E G I D H e l pa n dS u p p o r t F o ra n o t h e rq u e s t i o no rs u p p o r t , o uc a nf i n dm o r eh e l po n h t t p : / / g r o u p s . g o o g l e . c o m / g r o u p / c h a n _ d o n g l e -
P o r t i n gi n s t r u c t i o n sf r o mc h a n _ d a t a c a r dt oc h a n _ d o n g l e M o d u l ec o n f i g u r a t i o nc h a n g e s c h a n g ec o n f i gf i l en a m ef r o md a t a c a r d . c o n ft od o n g l e . c o n f c h a n g ep a r a m e t e rf r o m' r e s e t d a t a c a r d 't o' r e s e t d o n g l e ' r e s e t d a t a c a r d =e s r e s e t d o n g l e =e s D i a l p l a nc h a n g e s c h a n g ec h a n n e lt e c h n o l o g f r o m' D a t a c a r d 't o' D o n g l e ' D i a l ( D a t a c a r d / d 1 / + 7 9 1 3 9 1 3 1 2 3 4 ) D i a l ( D o n g l e / d 1 / + 7 9 1 3 9 1 3 1 2 3 4 ) c h a n g e d e v i c e s t a t u s f u n c t i o n f r o m ' D a t a c a r d S t a t u s ' t o ' D o n g l e S t a t u s ' D a t a c a r d S t a t u s ( d 1 , V A R ) D o n g l e S t a t u s ( d 1 , V A R ) c h a n g e S M S s e n d f u n c t i o n f r o m ' D a t a c a r d S e n d S M S ' t o ' D o n g l e S e n d S M S ' D a t a c a r d S e n d S M S ( d 1 , + 7 9 1 3 9 1 3 1 2 3 4 , " H e l l o h o w a r e o u , D a n i l a ? " , 1 4 4 0 ,e s ) D o n g l e S e n d S M S ( d 1 , + 7 9 1 3 9 1 3 1 2 3 4 , " H e l l o h o w a r e o u , D a n i l a ? " , 1 4 4 0 ,e s ) c h a n g ec h a n n e lv a r i a b l e s D A T A C A R Dt oD O N G L E N A M E P R O V I D E Rt oD O N G L E P R O V I D E R I M E It oD O N G L E I M E I I M S It oD O N G L E I M S I C N U M B E Rt oD O N G L E N U M B E R C L Ic h a n g e s a l lc o m m a n d so fd a t a c a r dc h a n g e dt od o n g l el i k e d a t a c a r ds h o wd e v i c e s d o n g l es h o wd e v i c e s M a n a g e r ' sc h a n g e s
A d dac o m m e n t
E n t e ry o u rc o m m e n t . . .