首页 > 代码库 > dongle0

dongle0

*CLI> -- [dongle0] Trying to connect on /dev/ttyUSB2...

插拔dongle
[Jan 13 23:42:20] WARNING[3443]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory
-- [dongle0] Trying to connect on /dev/ttyUSB2...
[Jan 13 23:42:35] WARNING[3443]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory
dongle show devices
ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number
dongle0 0 Not connec 0 0 0 NONE Unknown
*CLI> -- [dongle0] Trying to connect on /dev/ttyUSB2...
[Jan 13 23:42:50] WARNING[3443]: chan_dongle.c:215 opentty: unable to open /dev/ttyUSB2: No such file or directory
-- [dongle0] Trying to connect on /dev/ttyUSB2...
-- [dongle0] Dongle has connected, initializing...
[Jan 13 23:43:06] WARNING[3591]: at_response.c:384 at_response_error: [dongle0] Error checking subscriber phone number
-- [dongle0] Dongle needs to be reinitialized. The SIM card is not ready yet
-- [dongle0] Error initializing Dongle
-- [dongle0] Dongle has disconnected
-- [dongle0] Trying to connect on /dev/ttyUSB2...
-- [dongle0] Dongle has connected, initializing...
-- [dongle0] Dongle initialized and ready

 

dongle show devices

*CLI> dongle show devices
ID Group State RSSI Mode Submode Provider Name Model Firmware IMEI IMSI Number
dongle0 0 Free 31 3 2 SmarToneVodafo E1750 11.126.13.00.157 354818044123401 460020108953736 Unknown

 

*CLI> dongle sms dongle0 《电话号码》 test
[dongle0] SMS queued for send with id 0x2881970
*CLI> -- [dongle0] Successfully sent SMS message 0x2881970
[Jan 13 23:48:36] NOTICE[3602]: at_response.c:257 at_response_ok: [dongle0] Successfully sent SMS message 0x2881970

 

 

dongle show device settings dongle0
------------- Settings ------------
Device : dongle0
Audio : /dev/ttyUSB1
Data : /dev/ttyUSB2
IMEI : 123456789012345
IMSI : 123456789012345
Channel Language : en
Context : default
Exten : +1234567890
Group : 0
RX gain : 0
TX gain : 0
U2Diag : -1
Use CallingPres : Yes
Default CallingPres : Presentation Allowed, Passed Screen
Auto delete SMS : Yes
Disable SMS : No
Reset Dongle : Yes
SMS PDU : Yes
Call Waiting : auto
DTMF : relax
Minimal DTMF Gap : 45
Minimal DTMF Duration : 80
Minimal DTMF Interval : 200
Initial device state : start

 

自动接听电话

*CLI> == Starting Dongle/dongle0-0100000000 at default,+1234567890,1 failed so falling back to exten ‘s‘
-- Executing [s@default:1] Wait("Dongle/dongle0-0100000000", "1") in new stack
-- Executing [s@default:2] Answer("Dongle/dongle0-0100000000", "") in new stack
-- Executing [s@default:3] Set("Dongle/dongle0-0100000000", "TIMEOUT(digit)=5") in new stack
-- Digit timeout set to 5.000
-- Executing [s@default:4] Set("Dongle/dongle0-0100000000", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10.000
-- Executing [s@default:5] BackGround("Dongle/dongle0-0100000000", "demo-congrats") in new stack
-- <Dongle/dongle0-0100000000> Playing ‘demo-congrats.gsm‘ (language ‘en‘)
== Spawn extension (default, s, 5) exited non-zero on ‘Dongle/dongle0-0100000000‘

 

 

dongle show device state dongle0
-------------- Status -------------
Device : dongle0
State : Free
Audio : /dev/ttyUSB1
Data : /dev/ttyUSB2
Voice : Yes
SMS : Yes
Manufacturer : huawei
Model : E1750
Firmware : 11.126.13.00.157
IMEI : 354818044123401
IMSI : 460020108953736
GSM Registration Status : Registered, roaming
RSSI : 14, -85 dBm
Mode : WCDMA
Submode : WCDMA
Provider Name : SmarToneVodafone
Location area code : 1F4A
Cell ID : 657CCC
Subscriber Number : Unknown
SMS Service Center : +8613800755500
Use UCS-2 encoding : Yes
USSD use 7 bit encoding : Yes
USSD use UCS-2 decoding : No
Tasks in queue : 0
Commands in queue : 0
Call Waiting : Disabled
Current device state : start
Desired device state : start
When change state : now
Calls/Channels : 0
Active : 0
Held : 0
Dialing : 0
Alerting : 0
Incoming : 0
Waiting : 0
Releasing : 0
Initializing : 0

*CLI> dongle cmd dongle0 AT
[dongle0] ‘AT‘ Command queued for execute
*CLI> [dongle0] Got Response for user‘s command:‘OK‘
[Jan 13 23:56:02] NOTICE[3602]: at_response.c:1716 at_response: [dongle0] Got Response for user‘s command:‘OK‘

接受短信测试

*CLI> [dongle0] Got SMS from xxxx: ‘hello‘
== Starting Local/sms@default-5cb3;1 at default,sms,1 failed so falling back to exten ‘s‘
-- Executing [s@default:1] Wait("Local/sms@default-5cb3;1", "1") in new stack
-- Executing [s@default:2] Answer("Local/sms@default-5cb3;1", "") in new stack
-- Executing [s@default:3] Set("Local/sms@default-5cb3;1", "TIMEOUT(digit)=5") in new stack
-- Digit timeout set to 5.000
-- Executing [s@default:4] Set("Local/sms@default-5cb3;1", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10.000
-- Executing [s@default:5] BackGround("Local/sms@default-5cb3;1", "demo-congrats") in new stack
[Jan 13 23:57:08] WARNING[3639]: channel.c:3895 set_format: Unable to find a codec translation path from 0x1 (g723) to 0x2 (gsm)
[Jan 13 23:57:08] WARNING[3639]: file.c:953 ast_streamfile: Unable to open demo-congrats (format 0x1 (g723)): No such file or directory
[Jan 13 23:57:08] WARNING[3639]: pbx.c:8866 pbx_builtin_background: ast_streamfile failed on Local/sms@default-5cb3;1 for demo-congrats
-- Executing [s@default:6] BackGround("Local/sms@default-5cb3;1", "demo-instruct") in new stack
[Jan 13 23:57:08] WARNING[3639]: channel.c:3895 set_format: Unable to find a codec translation path from 0x1 (g723) to 0x2 (gsm)
[Jan 13 23:57:08] WARNING[3639]: file.c:953 ast_streamfile: Unable to open demo-instruct (format 0x1 (g723)): No such file or directory
[Jan 13 23:57:08] WARNING[3639]: pbx.c:8866 pbx_builtin_background: ast_streamfile failed on Local/sms@default-5cb3;1 for demo-instruct
-- Executing [s@default:7] WaitExten("Local/sms@default-5cb3;1", "") in new stack
-- Timeout on Local/sms@default-5cb3;1, going to ‘t‘
-- Executing [t@default:1] Goto("Local/sms@default-5cb3;1", "#,1") in new stack
-- Goto (default,#,1)
-- Executing [#@default:1] Playback("Local/sms@default-5cb3;1", "demo-thanks") in new stack
[Jan 13 23:57:18] WARNING[3639]: channel.c:3895 set_format: Unable to find a codec translation path from 0x1 (g723) to 0x2 (gsm)
[Jan 13 23:57:18] WARNING[3639]: file.c:953 ast_streamfile: Unable to open demo-thanks (format 0x1 (g723)): No such file or directory
[Jan 13 23:57:18] WARNING[3639]: app_playback.c:471 playback_exec: ast_streamfile failed on Local/sms@default-5cb3;1 for demo-thanks
-- Executing [#@default:2] Hangup("Local/sms@default-5cb3;1", "") in new stack
== Spawn extension (default, #, 2) exited non-zero on ‘Local/sms@default-5cb3;1‘

*CLI>

 

dongle0