Hello,

I am using the Nokia C2-01 as the GSM modem to get the sms from the sms
gateway. But there is "generic error: initialization of the device is
failed"
I think my modem is working. there is the list of response & configuration
file.

[root@localhost sbin]# ./bearerbox -v 0 mytest.conf
2012-09-12 16:43:51 [2177] [0] INFO: Debug_lvl = 0, log_file = <none>,
log_lvl = 0
2012-09-12 16:43:51 [2177] [0] WARNING: DLR: using default 'internal' for
storage type.
2012-09-12 16:43:51 [2177] [0] INFO: DLR using storage type: internal
2012-09-12 16:43:51 [2177] [0] DEBUG: Kannel bearerbox version `1.4.3'.
Build `Sep 12 2012 09:08:45', compiler `4.4.2 20091027 (Red Hat 4.4.2-7)'.
System Linux, release 2.6.31.5-127.fc12.i686.PAE, version #1 SMP Sat Nov 7
21:25:57 EST 2009, machine i686.
Hostname localhost, IP 127.0.0.1.
Libxml version 2.7.6.
Using native malloc.

2012-09-12 16:43:51 [2177] [0] INFO: Added logfile `kannel.log' with level
`0'.
2012-09-12 16:43:51 [2177] [0] INFO: Started access logfile `access.log'.
2012-09-12 16:43:51 [2177] [0] INFO: SSL not supported, no SSL
initialization done.
2012-09-12 16:43:51 [2177] [0] INFO: HTTP: Opening server at port 13000.
2012-09-12 16:43:51 [2177] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps
to pid 2177.
2012-09-12 16:43:51 [2177] [0] DEBUG: Started thread 1
(gwlib/fdset.c:poller)
2012-09-12 16:43:51 [2177] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread)
maps to pid 2177.
2012-09-12 16:43:51 [2177] [0] DEBUG: Started thread 2
(gwlib/http.c:server_thread)
2012-09-12 16:43:51 [2177] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run)
maps to pid 2177.
2012-09-12 16:43:51 [2177] [0] DEBUG: Started thread 3
(gw/bb_http.c:httpadmin_run)
2012-09-12 16:43:51 [2177] [0] DEBUG: starting smsbox connection module
2012-09-12 16:43:51 [2177] [0] INFO: BOXC: 'smsbox-max-pending' not set,
using default (100).
2012-09-12 16:43:51 [2177] [4] DEBUG: Thread 4
(gw/bb_boxc.c:sms_to_smsboxes) maps to pid 2177.
2012-09-12 16:43:51 [2177] [0] DEBUG: Started thread 4
(gw/bb_boxc.c:sms_to_smsboxes)
2012-09-12 16:43:51 [2177] [5] DEBUG: Thread 5 (gw/bb_boxc.c:smsboxc_run)
maps to pid 2177.
2012-09-12 16:43:51 [2177] [0] DEBUG: Started thread 5
(gw/bb_boxc.c:smsboxc_run)
2012-09-12 16:43:51 [2177] [0] INFO: Set SMS resend frequency to 60 seconds.
2012-09-12 16:43:51 [2177] [0] INFO: SMS resend retry set to unlimited.
2012-09-12 16:43:51 [2177] [0] DEBUG: smsbox MO concatenated message
handling enabled
2012-09-12 16:43:51 [2177] [0] INFO: DLR rerouting for smsc id <(null)>
disabled.
2012-09-12 16:43:51 [2177] [0] INFO: AT2[/dev/ttyACM0]: configuration shows
modemtype <auto  # (ericsson in your case)>
2012-09-12 16:43:51 [2177] [0] DEBUG: AT2[/dev/ttyACM0]: Reading modem
definitions from <mytest.conf>
2012-09-12 16:43:51 [2177] [0] DEBUG: AT2[/dev/ttyACM0]: Found <1> modems
in config
2012-09-12 16:43:51 [2177] [0] INFO: AT2[/dev/ttyACM0]: modemtype not
found, revert to autodetect
2012-09-12 16:43:51 [2177] [6] DEBUG: Thread 6
(gw/smsc/smsc_at.c:at2_device_thread) maps to pid 2177.
2012-09-12 16:43:51 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: detecting modem
type
2012-09-12 16:43:51 [2177] [6] INFO: AT2[/dev/ttyACM0]: opening device
2012-09-12 16:43:51 [2177] [0] DEBUG: Started thread 6
(gw/smsc/smsc_at.c:at2_device_thread)
2012-09-12 16:43:51 [2177] [7] DEBUG: Thread 7
(gw/bb_smscconn.c:sms_router) maps to pid 2177.
2012-09-12 16:43:51 [2177] [0] DEBUG: Started thread 7
(gw/bb_smscconn.c:sms_router)
2012-09-12 16:43:51 [2177] [0] INFO:
----------------------------------------
2012-09-12 16:43:51 [2177] [0] INFO: Kannel bearerbox II version 1.4.3
starting
2012-09-12 16:43:51 [2177] [0] INFO: MAIN: Start-up done, entering mainloop
2012-09-12 16:43:51 [2177] [0] DEBUG: AT2[/dev/ttyACM0]: start called
2012-09-12 16:43:52 [2177] [5] INFO: Client connected from <127.0.0.1>
2012-09-12 16:43:52 [2177] [8] DEBUG: Thread 8 (gw/bb_boxc.c:function) maps
to pid 2177.
2012-09-12 16:43:52 [2177] [5] DEBUG: Started thread 8
(gw/bb_boxc.c:function)
2012-09-12 16:43:52 [2177] [9] DEBUG: Thread 9 (gw/bb_boxc.c:boxc_sender)
maps to pid 2177.
2012-09-12 16:43:52 [2177] [8] DEBUG: Started thread 9
(gw/bb_boxc.c:boxc_sender)
2012-09-12 16:43:52 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: device opened.
Telnet mode = 0
2012-09-12 16:43:53 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: device opened
2012-09-12 16:43:53 [2177] [6] INFO: AT2[/dev/ttyACM0]: speed set to 9600
2012-09-12 16:43:53 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> ^M
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> AT^M
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> AT&F^M
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> ATE0^M
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- ATE0
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> ATI^M
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- Nokia
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: Cannot detect
modem, using generic
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: Reading modem
definitions from <mytest.conf>
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: Found <1> modems
in config
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> AT+CSMS=?^M
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- +CSMS: (0)
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:55 [2177] [6] INFO: AT2[/dev/ttyACM0]: Closing device
2012-09-12 16:43:55 [2177] [6] INFO: AT2[/dev/ttyACM0]: opening device
2012-09-12 16:43:55 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: device opened.
Telnet mode = 0
2012-09-12 16:43:56 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: device opened
2012-09-12 16:43:56 [2177] [6] INFO: AT2[/dev/ttyACM0]: Logging in
2012-09-12 16:43:57 [2177] [6] INFO: AT2[/dev/ttyACM0]: init device
2012-09-12 16:43:57 [2177] [6] INFO: AT2[/dev/ttyACM0]: speed set to 9600
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> ATZ^M
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> AT^M
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- AT
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> AT&F^M
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- AT&F
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> ATE0^M
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- ATE0
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> AT+IFC=2,2^M
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> AT+CPIN?^M
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- +CPIN: READY
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> AT+CMGF=0^M
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:57 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: --> AT+CSMS=?^M
2012-09-12 16:43:58 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- +CSMS: (0)
2012-09-12 16:43:58 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- OK
2012-09-12 16:43:58 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: -->
AT+CNMI=1,2,0,1,0^M
2012-09-12 16:43:58 [2177] [6] DEBUG: AT2[/dev/ttyACM0]: <-- ERROR
2012-09-12 16:43:58 [2177] [6] ERROR: AT2[/dev/ttyACM0]: Generic error:
ERROR
2012-09-12 16:43:58 [2177] [6] ERROR: AT2[/dev/ttyACM0]: Initialization of
device failed.
2012-09-12 16:43:58 [2177] [6] INFO: AT2[/dev/ttyACM0]: Closing device
2012-09-12 16:43:58 [2177] [6] ERROR: AT2[/dev/ttyACM0]: Couldn't connect
(retrying in 10 seconds).

The configuration file:

# CORE CONFIGURATION

group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
log-file = "kannel.log"
log-level = 0
unified-prefix = "+91,0091,0;+,00"
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
access-log = "access.log"
#store-file = "kannel.store"

# SMSC CONNECTIONS

group = smsc
smsc = at
#smsc-id = C2-01
device = /dev/ttyACM0
modemtype = auto  # (ericsson in your case)
speed = 9600
connect-allow-ip = "127.0.0.1"
my-number = "8527******"  #(intentionally stared for this mail.)
log-level = 0

# MODEM CONF

group=modems
id=generic
name="Generic Modem"
detect-string= "Nokia"
detect-string2= "C2-01"
need-sleep=true
keepalive-cmd = "AT+CBC;+CSQ"
#init-string= "AT+CNMI=2,1,0,0,0"
message-storage="SM"
enable-mms = true

# SMSBOX SETUP

group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
sendsms-chars = "0123456789+"
log-file = "smsbox.log"
log-level = 0
access-log = "access.log"


# SEND-SMS USERS

group = sendsms-user
username = tester
password = foobar
max-messages = 10
concatenation = true

# SERVICES

group = sms-service
keyword = nop
text = "You asked nothing and I did it!"

# for relay..

group = sms-service
keyword = default
get-url = "
http://localhost:15130/sms?user=tester&pass=foobar&from=%p&to=%P&text=%r";
concatenation = true
max-messages = 10

# defualt

group = sms-service
keyword = default
text = "No service specified"



-- 
*Suneet Kumar Saini*

Reply via email to