Hi, I'm using a Huawei UMG181 attached to a RHEL system (kernel 2.6.18-194.el5). Kannel version is 1.4.3 built from source. I have sim-buffering = true in my config.
Running bearerbox -v 0 gave me this error over and over again. ... 2010-04-22 09:13:32 [12167] [7] DEBUG: AT2[huawei]: --> AT+CMGR=30^M 2010-04-22 09:13:32 [12167] [7] DEBUG: AT2[huawei]: <-- +CMS ERROR: 321 2010-04-22 09:13:32 [12167] [7] ERROR: AT2[huawei]: CMS ERROR: +CMS ERROR: 321 2010-04-22 09:13:32 [12167] [7] ERROR: AT2[huawei]: CMS ERROR: Invalid memory index -> don't worry, just memory fragmentation. (321) ... starting with CMGR=1 and repeating to CMR=30. The response from +CPMS=? earlier in the log was: 2010-04-22 09:13:29 [12167] [7] DEBUG: AT2[huawei]: --> AT+CPMS? 2010-04-22 09:13:29 [12167] [7] DEBUG: AT2[huawei]: <-- +CPMS: "SM",4,30,"SM",4,30,"SM",4,30 >From a gtkterm session with the modem, i can issue AT+CMGR=0 and get a message. So it seems that this modem starts numbering slots at 0 instead of 1. In gw/smsc/smcs_at.c line 1074 (1.4.3 codebase), i changed the for loop to be from 0 to capacity-1 instead of 1 to capacity in the function at_read_sms_memory. Clearly there's a better solution, but this fixed my problem for now. This device is somewhat new, but is it the first to use 0 based slots? As a footnote, I was using sim-buffering = true to be able to receive messages that the modem buffered while kannel wasn't running. Is there a better way to do that? My modem init string is: init-string = "AT^PORTSEL=1;+CNMI=2,1,2,2,0" The "^PORTSEL=1" was the double secret magic command to get CMTI notifications to work on /dev/ttyUSB0, btw. I found this purely by experimentation trying commands that the modem reported from a command list. I was unable to find any documentation on it though. Thanks, Chris
