I've got a bunch (four currently, one turned off, will eventually be six or seven) of GSM terminals from Round Solutions hooked up via a VSCom multi-port serial card. I'm running Kannel 1.4.1-2 as supplied with Ubuntu 7.04. My problem is that messages via the Orange network fail like so:
2007-05-22 17:29:26 [15892] [7] DEBUG: AT2[orange]: --> AT+CPMS?^M 2007-05-22 17:29:26 [15892] [7] DEBUG: AT2[orange]: <-- +CPMS: "SM",0,20,"SM",0,20,"SM",0,20 2007-05-22 17:29:26 [15892] [7] DEBUG: AT2[orange]: <-- OK 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: TP-Validity-Period: 24.0 hours 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: --> AT+CMGS=31^M 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: <-- > 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: send command status: 1 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: --> 0031000C814477218143240000A7136F79D87D2E83D661B7BBCC06C56E3A590 E 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: --> ^Z 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: <-- > 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: <-- +CME ERROR: 2 2007-05-22 17:29:52 [15892] [7] ERROR: AT2[orange]: Generic error: +CME ERROR: 2 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: send command status: -1 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: --> AT+CMGS=31^M 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: <-- > 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: send command status: 1 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: --> 0031000C814477218143240000A7136F79D87D2E83D661B7BBCC06C56E3A590 E 2007-05-22 17:29:52 [15892] [7] DEBUG: AT2[orange]: --> ^Z 2007-05-22 17:29:53 [15892] [7] DEBUG: AT2[orange]: <-- > 2007-05-22 17:29:53 [15892] [7] DEBUG: AT2[orange]: <-- +CME ERROR: 2 2007-05-22 17:29:53 [15892] [7] ERROR: AT2[orange]: Generic error: +CME ERROR: 2 2007-05-22 17:29:53 [15892] [7] DEBUG: AT2[orange]: send command status: -1 2007-05-22 17:29:53 [15892] [7] DEBUG: AT2[orange]: --> AT+CMGS=31^M 2007-05-22 17:29:53 [15892] [7] DEBUG: AT2[orange]: <-- > 2007-05-22 17:29:53 [15892] [7] DEBUG: AT2[orange]: send command status: 1 2007-05-22 17:29:53 [15892] [7] DEBUG: AT2[orange]: --> 0031000C814477218143240000A7136F79D87D2E83D661B7BBCC06C56E3A590 E 2007-05-22 17:29:53 [15892] [7] DEBUG: AT2[orange]: --> ^Z 2007-05-22 17:29:53 [15892] [7] DEBUG: AT2[orange]: <-- > 2007-05-22 17:29:53 [15892] [7] DEBUG: AT2[orange]: <-- +CME ERROR: 2 2007-05-22 17:29:53 [15892] [7] ERROR: AT2[orange]: Generic error: +CME ERROR: 2 2007-05-22 17:29:53 [15892] [7] DEBUG: AT2[orange]: send command status: -1 2007-05-22 17:29:53 [15892] [7] DEBUG: SMSC[orange]: creating DLR message 2007-05-22 17:29:53 [15892] [7] DEBUG: SMSC[orange]: DLR = 2007-05-22 17:29:57 [15892] [7] DEBUG: AT2[orange]: --> AT+CPMS?^M 2007-05-22 17:29:57 [15892] [7] DEBUG: AT2[orange]: <-- +CPMS: "SM",0,20,"SM",0,20,"SM",0,20 2007-05-22 17:29:57 [15892] [7] DEBUG: AT2[orange]: <-- OK Similarly, with O2 I get this: 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: --> AT+CSQ^M 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: <-- +CSQ: 18,0 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: <-- OK 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: TP-Validity-Period: 24.0 hours 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: --> AT+CMGS=28^M 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: <-- > 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: send command status: 1 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: --> 0031000C814477218143240000A70F6F19681D76BBCB6C50ECA69BCD00 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: --> ^Z 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: <-- > 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: <-- +CME ERROR: 2 2007-05-22 17:33:43 [15892] [8] ERROR: AT2[o2]: Generic error: +CME ERROR: 2 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: send command status: -1 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: --> AT+CMGS=28^M 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: <-- > 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: send command status: 1 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: --> 0031000C814477218143240000A70F6F19681D76BBCB6C50ECA69BCD00 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: --> ^Z 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: <-- > 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: <-- +CME ERROR: 2 2007-05-22 17:33:43 [15892] [8] ERROR: AT2[o2]: Generic error: +CME ERROR: 2 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: send command status: -1 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: --> AT+CMGS=28^M 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: <-- > 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: send command status: 1 2007-05-22 17:33:43 [15892] [8] DEBUG: AT2[o2]: --> 0031000C814477218143240000A70F6F19681D76BBCB6C50ECA69BCD00 2007-05-22 17:33:44 [15892] [8] DEBUG: AT2[o2]: --> ^Z 2007-05-22 17:33:44 [15892] [8] DEBUG: AT2[o2]: <-- > 2007-05-22 17:33:44 [15892] [8] DEBUG: AT2[o2]: <-- +CME ERROR: 2 2007-05-22 17:33:44 [15892] [8] ERROR: AT2[o2]: Generic error: +CME ERROR: 2 2007-05-22 17:33:44 [15892] [8] DEBUG: AT2[o2]: send command status: -1 2007-05-22 17:33:44 [15892] [8] DEBUG: SMSC[o2]: creating DLR message 2007-05-22 17:33:44 [15892] [8] DEBUG: SMSC[o2]: DLR = However, on vodafone, it works!: 2007-05-22 17:34:46 [15892] [6] DEBUG: AT2[vodafone]: <-- +CPMS: "SM",0,15,"SM",0,15,"SM",0,15 2007-05-22 17:34:46 [15892] [6] DEBUG: AT2[vodafone]: <-- OK 2007-05-22 17:34:54 [15892] [6] DEBUG: AT2[vodafone]: TP-Validity-Period: 24.0 hours 2007-05-22 17:34:54 [15892] [6] DEBUG: AT2[vodafone]: --> AT+CMGS=33^M 2007-05-22 17:34:54 [15892] [6] DEBUG: AT2[vodafone]: <-- > 2007-05-22 17:34:54 [15892] [6] DEBUG: AT2[vodafone]: send command status: 1 2007-05-22 17:34:54 [15892] [6] DEBUG: AT2[vodafone]: --> 0031000C814477218143240000A715F637396C7EBBCBA075D8ED2EB341B19 B6E4603 2007-05-22 17:34:54 [15892] [6] DEBUG: AT2[vodafone]: --> ^Z 2007-05-22 17:34:57 [15892] [6] DEBUG: AT2[vodafone]: <-- > 2007-05-22 17:34:57 [15892] [6] DEBUG: AT2[vodafone]: <-- +CMGS: 66 2007-05-22 17:34:57 [15892] [6] DEBUG: AT2[vodafone]: <-- OK 2007-05-22 17:34:57 [15892] [6] DEBUG: AT2[vodafone]: send command status: 0 2007-05-22 17:34:57 [15892] [6] DEBUG: DLR[internal]: Adding DLR smsc=vodafone, ts=66, src=kizoom-vodafone, dst=4477121 83442, mask=31, boxc= 2007-05-22 17:34:57 [15892] [6] DEBUG: SMSC[vodafone]: creating DLR message 2007-05-22 17:34:57 [15892] [6] DEBUG: SMSC[vodafone]: DLR = The Three network doesn't work, and it seems to have connected to a Vodafone cell -- perhaps this is because the devices only support 2G, and Vodafone carry Three's 2G traffic? I've turned that one off for the moment, having quite enough to worry about with the three "traditional" networks. I've googled about a lot, and can't find anything obvious about this "+CME ERROR: 2" error. What might be wrong? Here's my configuration -- comments on it gratefully received, hopefully the intent is clear (NB the DLR & database bits are left over from when I thought they were a good idea). I tried setting my-number and sms-center, but they appeared to make matters worse, producing "CMS ERROR: +CMS ERROR: 500"... # $Id: kannel.conf,v 1.2 2007/02/27 15:30:33 robins Exp $ group = core admin-port = 13000 admin-password = bar admin-deny-ip = "*.*.*.*" admin-allow-ip = "127.0.0.1" wapbox-port = 13002 smsbox-port = 13003 wdp-interface-name = "*" log-file = "/var/log/kannel/bearerbox.log" log-level = 0 box-deny-ip = "*.*.*.*" box-allow-ip = "127.0.0.1;10.10.0.*;10.1.0.*" store-file = "/var/run/kannel/store-file" # unified-prefix is apparently superceded by SMSC ID entries #unified-prefix = "+44,0044;+,00" #dlr-storage = pgsql group = wapbox bearerbox-host = localhost log-file = "/var/log/kannel/wapbox.log" group = smsbox bearerbox-host = localhost #bearerbox-is-sqlbox = false log-level = 0 log-file = "/var/log/kannel/smsbox.log" sendsms-port = 10001 global-sender = kizoom #group = sqlbox #id = dlr group = sendsms-user username = simple password = simple group = sendsms-user username = orange password = orange forced-smsc = orange faked-sender = kizoom-orange group = sendsms-user username = o2 password = o2 forced-smsc = o2 faked-sender = kizoom-o2 group = sendsms-user username = vodafone password = vodafone forced-smsc = vodafone faked-sender = kizoom-vodafone ## see comments under smsc definition lower down #group = sendsms-user #username = three #password = three #forced-smsc = three #faked-sender = kizoom-three # detect-string = $(AT+GMI) # detect-string2 = $(AT+GMM) # AT&F = "reset to factory defaults" group = modems id = GM862 name = "Telit GM862" detect-string = "Telit" detect-string2 = "GM862 QUAD PY" #init-string = "AT+CNMI=1,2,0,1,0;+CMGF=0" # this kind of works, but the SIM fills up init-string = "AT+CNMI=2,3,2,0,0;+CMGF=0;+CMEE=1" #init-string = "AT+CNMI=2,2" speed = 0 no-pin = true no-smsc = false message-storage = "SM" # keepalive logs signal quality & channel bit error rate (99 = unknown): # 0 -113 dBm or less -- nonexistent reception # 1 -111 dBm # 2-30 -109 dBm to -53 dBm # 31 -51 dBm or greater -- excellent reception keepalive-cmd = "AT+CSQ" broken = true group = smsc smsc = at smsc-id = vodafone allowed-smsc-id = vodafone log-level = 0 log-file = "/var/log/kannel/smsc-vodafone.log" modemtype = GM862 device = /dev/ttyS5 speed = 0 #pin = 0000 # 167 => 24 hours; see GsmTime on wiki validityperiod = 167 # we don't need this, but it gives us signal strength tracking keepalive = 30 #my-number = 447880545439 #sms-center = 447785016005 sim-buffering = true group = smsc smsc = at smsc-id = orange allowed-smsc-id = orange log-level = 0 log-file = "/var/log/kannel/smsc-orange.log" modemtype = GM862 device = /dev/ttyS7 validityperiod = 167 keepalive = 30 #my-number = 447976479831 #sms-center = 447973100973 sim-buffering = true group = smsc smsc = at smsc-id = o2 allowed-smsc-id = o2 log-level = 0 log-file = "/var/log/kannel/smsc-o2.log" modemtype = GM862 device = /dev/ttyS4 validityperiod = 167 keepalive = 30 #my-number = 447738642022 #sms-center = 447802000332 sim-buffering = true ## something distinctly weird about this one ## it appears to hook up to the Vodafone 2G network and I can't ## get SMS messages sent manually #group = smsc #smsc = at #smsc-id = three #allowed-smsc-id = three #log-level = 0 #log-file = "/var/log/kannel/smsc-tmobile.log" #modemtype = GM862 #device = /dev/ttyS6 #validityperiod = 167 #keepalive = 30 ##my-number = ??? ##sms-center = 447785016005 #sim-buffering = true # we never respond directly via SMS -- handlesms dings a URL instead group = sms-service keyword = default max-messages = 0 exec = /usr/local/bin/handlesms "%t" "%q" "%a" "%b" # needed for delivery reports -- see External DLR Storage group = pgsql-connection id = mydlr host = fulusi.vpn #port = 5432 username = kannel password = lennak database = kannel max-connections = 1 group = dlr-db id = mydlr table = dlr field-smsc = smsc field-timestamp = ts field-destination = destination field-source = source field-service = service field-url = url field-mask = mask field-status = status field-boxc-id = boxc