[Freeswitch-users] mod_gsmopen serial init failed

Mi Ke mi.ke at null.net
Tue Aug 21 15:18:08 MSD 2012


It appears that selinux policies prevented freeswitch user from accessing /dev/ttyUSB*

 [root at freeswitch ~]# ls -l /dev/ttyUSB*
 crw-rw----. 1 root dialout 188, 0 Aug 21 10:57 /dev/ttyUSB0
 crw-rw----. 1 root dialout 188, 1 Aug 21 10:48 /dev/ttyUSB1
 crw-rw----. 1 root dialout 188, 2 Aug 21 10:48 /dev/ttyUSB2

 so adding freeswitch user to dialout group by running "usermod -a -G dialout freeswitch" worked for me.

 Have a nice day
 Mike
----- Original Message -----
From: Mi Ke
Sent: 08/21/12 12:58 PM
To: FreeSWITCH Users Help
Subject: [Freeswitch-users] mod_gsmopen serial init failed

Hi All,

 I have problems getting mod_gsmopen to see my E1550. Both minicom and wvdial see the dongle on /dev/ttyUSB0:

 ttyUSB0<*1>: ATQ0 V1 E1 -- OK
 ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK
 ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK
 ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
 ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
 ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
 ttyUSB0<*1>: Modem Identifier: ATI -- Manufacturer: huawei
 ttyUSB0<*1>: Speed 9600: AT -- OK
 ttyUSB0<*1>: Max speed is 9600; that should be safe.
 ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

 Welcome to minicom 2.3

 OPTIONS: I18n
 Compiled on Aug 19 2010, 05:50:19.
 Port /dev/ttyUSB0

 Press CTRL-A Z for help on special keys
 AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
 OK 

 at+cpin?
 +CPIN: READY
 OK

 but mod_gsmopen does not want to see it:

 2012-08-21 09:18:18.973501 [NOTICE] mod_gsmopen.cpp:1203 rev ccae5cd|07bc7ba[(nil)|37 ][NOTICA 1203 ][none ][-1,-1,-1] GSMOPEN Charset Output Test 0 èéòàù
 2012-08-21 09:18:18.973501 [NOTICE] mod_gsmopen.cpp:1204 rev ccae5cd|07bc7ba[(nil)|37 ][NOTICA 1204 ][none ][-1,-1,-1] GSMOPEN Charset Output Test 1 ç°§^£
 2012-08-21 09:18:18.973501 [NOTICE] mod_gsmopen.cpp:1205 rev ccae5cd|07bc7ba[(nil)|37 ][NOTICA 1205 ][none ][-1,-1,-1] GSMOPEN Charset Output Test 2 новости
 2012-08-21 09:18:18.973501 [NOTICE] mod_gsmopen.cpp:1206 rev ccae5cd|07bc7ba[(nil)|37 ][NOTICA 1206 ][none ][-1,-1,-1] GSMOPEN Charset Output Test 3 ﺎﻠﺠﻤﻋﺓ
 2012-08-21 09:18:18.973501 [NOTICE] mod_gsmopen.cpp:1207 rev ccae5cd|07bc7ba[(nil)|37 ][NOTICA 1207 ][none ][-1,-1,-1] GSMOPEN Charset Output Test 4 ראת
 2012-08-21 09:18:18.973501 [NOTICE] mod_gsmopen.cpp:1208 rev ccae5cd|07bc7ba[(nil)|37 ][NOTICA 1208 ][none ][-1,-1,-1] GSMOPEN Charset Output Test 5 לק
 2012-08-21 09:18:18.973501 [NOTICE] mod_gsmopen.cpp:1209 rev ccae5cd|07bc7ba[(nil)|37 ][NOTICA 1209 ][none ][-1,-1,-1] GSMOPEN Charset Output Test 6 人大
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1226 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1226 ][none ][-1,-1,-1] globals.debug=0
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1228 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1228 ][none ][-1,-1,-1] globals.debug=8
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1234 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1234 ][none ][-1,-1,-1] globals.dialplan=XML
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1240 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1240 ][none ][-1,-1,-1] globals.context=external
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1231 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1231 ][none ][-1,-1,-1] globals.hold_music=
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1237 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1237 ][none ][-1,-1,-1] globals.destination=5000
 2012-08-21 09:18:18.973501 [WARNING] mod_gsmopen.cpp:1653 rev ccae5cd|07bc7ba[(nil)|37 ][WARNINGA 1653 ][gsm00 ][-1, 0, 0] STARTING interface_id=1
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1654 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1654 ][gsm00 ][-1, 0, 0] id=1
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1655 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1655 ][gsm00 ][-1, 0, 0] name=gsm00
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1656 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1656 ][gsm00 ][-1, 0, 0] hold-music=
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1657 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1657 ][gsm00 ][-1, 0, 0] context=default
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1658 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1658 ][gsm00 ][-1, 0, 0] dialplan=XML
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1659 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1659 ][gsm00 ][-1, 0, 0] destination=5000
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1660 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1660 ][gsm00 ][-1, 0, 0] controldevice_name=/dev/ttyUSB0
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1661 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1661 ][gsm00 ][-1, 0, 0] controldevice_audio_name=/dev/ttyUSB2
 2012-08-21 09:18:18.973501 [DEBUG] mod_gsmopen.cpp:1663 rev ccae5cd|07bc7ba[(nil)|37 ][DEBUG_GSMOPEN 1663 ][gsm00 ][-1, 0, 0] gsmopen_serial_sync_period=300
 2012-08-21 09:18:18.973501 [ERR] gsmopen_protocol.cpp:122 rev ccae5cd|07bc7ba[(nil)|37 ][ERRORA 122 ][gsm00 ][-1, 0, 0] port /dev/ttyUSB0, NOT open
 2012-08-21 09:18:18.973501 [ERR] mod_gsmopen.cpp:1670 rev ccae5cd|07bc7ba[(nil)|37 ][ERRORA 1670 ][gsm00 ][-1, 0, 0] gsmopen_serial_init failed
 2012-08-21 09:18:18.973501 [ERR] mod_gsmopen.cpp:1671 rev ccae5cd|07bc7ba[(nil)|37 ][ERRORA 1671 ][gsm00 ][-1, 0, 0] STARTING interface_id=1 FAILED
 2012-08-21 09:18:18.973501 [ERR] mod_gsmopen.cpp:2928 rev ccae5cd|07bc7ba[(nil)|37 ][ERRORA 2928 ][gsm00 ][-1, 0, 0] ALARM on interface gsm00:
 2012-08-21 09:18:18.973501 [CONSOLE] switch_loadable_module.c:1328 Successfully Loaded [mod_gsmopen]
 2012-08-21 09:18:18.973501 [NOTICE] switch_loadable_module.c:146 Adding Endpoint 'gsmopen'
 2012-08-21 09:18:18.973501 [NOTICE] switch_loadable_module.c:298 Adding API Function 'gsm'
 2012-08-21 09:18:18.973501 [NOTICE] switch_loadable_module.c:298 Adding API Function 'gsmopen'
 2012-08-21 09:18:18.973501 [NOTICE] switch_loadable_module.c:298 Adding API Function 'gsmopen_boost_audio'
 2012-08-21 09:18:18.973501 [NOTICE] switch_loadable_module.c:298 Adding API Function 'gsmopen_dump'
 2012-08-21 09:18:18.973501 [NOTICE] switch_loadable_module.c:298 Adding API Function 'gsmopen_sendsms'
 2012-08-21 09:18:18.973501 [NOTICE] switch_loadable_module.c:403 Adding Chat interface 'sms'

Dongle is voice enabled, PIN request is disabled...What do I do wrong ?

 Cheers / Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120821/947d8f69/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list