Hi
check
http://www.developershome.com/sms/resultCodes2.asp#16.2.1.1.Table%20of%20+CMS%20Error%20Codes%20and%20Their%20Meanings|outline
Kannel is probably looking for an invalid memory index... usually kannel
looks for mem location starting with 1, but some modems have location 0
thus when trying to read the last location it gets an error.
Try reseting your modem & or kannel.
I think there was a patch for this -define start of mem location- sometime
ago. I don't know if it was committed to main branch.
Hope helps
Alvaro
|-----------------------------------------------------------------------------------------------------------------|
Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
celular y Nextel
en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via SMS
y GPRS online
Visitenos en www.perusms.NET www.smsglobal.com.mx y
www.pravcom.com
On Sun, Jul 15, 2012 at 9:21 AM, bilal kamoto <[email protected]> wrote:
> hi users,
> my kannel was working perfectly until recently i can not receive sms
> anymore but able to send, i dont know what is the problem..this error shows
> up CMS error:321, am guessing this is the problem. how do i get rid of it.
>
> my configuration file
>
> #
> # Sample configuration file for Kannel bearerbox on Debian.
> # See the documentation for explanations of fields.
> #
>
> # HTTP administration is disabled by default. Make sure you set the
> # password if you enable it.
>
> group = core
> admin-port = 13000
> admin-password = bar
> admin-deny-ip = "*.*.*.*"
> admin-allow-ip = "127.0.0.1;192.168.0.*"
> smsbox-port = 13001
> #wapbox-port = 13004
> wdp-interface-name = "*"
> log-file = "/var/log/kannel/bearerbox.log"
> access-log="/var/log/kannel/access.log"
> box-deny-ip = "*.*.*.*"
> box-allow-ip = "127.0.0.1;192.168.0.*"
> #storage = internal
>
> #group = wapbox
> #bearerbox-host = localhost
> #log-file = "/var/log/kannel/wapbox.log"
>
> # My modem
> group = smsc
> smsc = at
> smsc-id = Nokia 5800 XpressMusic
> modemtype = Nokia
> device = /dev/ttyUSB0
> speed = 9600
> #pin = 2345
> sim-buffering = true
> #message-storage = MT
>
> # My modem group
> group = modems
> id = Nokia
> name = "Nokia"
> #detect-string = "e173"
> #keepalive-cmd = "AT+CBC;+CSQ"
> #init-string = "ATZ"
> #init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
> #init-string = "AT+CNMI="2,0,0,2,0"
> #init-string = "AT+CNMI=1,2,0,1,0;+CMEE=1"
> init-string = "AT+CNMI=2,1,2,2,0;+CMEE=1"
> #message-storage = me
> #sim-buffering = true
>
> # fake smsc
> group = smsbox-route
> smsbox-id = bil
> smsc-id = Nokia 5800 XpressMusic
> #port = 10000
> #connect-allow-ip = 127.0.0.1
>
> #Send SMS
> group = smsbox
> smsbox-id = bil
> bearerbox-host = localhost
> sendsms-port = 13131
> #sms-center-number = +2659900140
> sendsms-chars = "0123456789 "
> global-sender = +255659375093
> access-log = "kannel.access"
> log-file = "smsbox.log"
> log-level = 0
>
> #Receive SMS
> group = sms-service
> keyword = default
> get-url = "http://localhost/receivesms.php?sender=%p&text=%b"
> accept-x-kannel-headers = true
> max-messages = 5
> concatenation = true
> catch-all = true
>
> #Authentication
> group = sendsms-user
> username = jones
> password = jones
> ------------------------------
> Date: Sun, 10 Jun 2012 20:03:33 +0400
> Subject: Re: php script
>
> From: [email protected]
> To: [email protected]
> CC: [email protected]; [email protected]
>
> It's better to use message as a text type instead of varchar(50) because
> message could be more than 50 chars.
>
> 2012/6/10 Jacob Mansfield <[email protected]>
>
> Looks like you have an extra closing bracket in that first SQL statement,
> which would be causing your error massage.
> [image: Blue Sapphire Media] *Jacob Mansfield* / Lead Developer
> Blue Sapphire Media <http://www.bluesapphiremedia.co.uk>
> *email:* [email protected] <[email protected]>
> *skype:* jacob.mansfield [image: Call Me]
>
> On 10 Jun 2012, at 16:45, bilal kamoto wrote:
>
> yep managed to download going through the examples am finding it hard to
> comprehend am not good with codes to follow it step by step with no
> documentation its gonna take a while i think. i wish there was a way php
> and mysql...
>
> i,ve figured out one thing when i use;
>
> `bilz` ( `number` varchar(50) NOT NULL,
> `message` varchar(50) NOT NULL)),
> it replies that there is an error
> but when i create table bilz using,
>
> bilz` ( `number` varchar(50),
> `message` varchar(50) ),
> it works but the only problem is that the message field does not
> update..is it related to my problem...
> thanks in advance..
>
> > Date: Sun, 10 Jun 2012 15:28:18 +0100
> > Subject: Re: php script
> > From: [email protected]
> > To: [email protected]
> >
> > DALMP is an application designed to query/cache mysql something like
> > adodb but specially for mysql and memcache/redis as cache backends.
> >
> > "git clone git://github.com/nbari/DALMP.git damp" is for geting the
> > source. git is a command
> >
> > within 'damp' follow the examples inside the /examples after
> > downloading the source and in less than 5 min you will get it up and
> > running.
> >
> > On Sun, Jun 10, 2012 at 2:07 PM, bilal kamoto <[email protected]>
> wrote:
> > > Dalmp git clone its a php script or an application, been to the website
> > > managed to search a php script popped-up
> > >
> > >> Date: Sun, 10 Jun 2012 13:03:56 +0100
> > >> Subject: Re: php script
> > >> From: [email protected]
> > >> To: [email protected]
> > >
> > >>
> > >> Your issues seems to be more a php/mysql problem
> > >>
> > >> I would recommend a simpler way using something like this:
> > >>
> > >> $db = new
> > >>
> DALMP('utf8://root:'.rawurlencode('pass-?/:word').'@your.mysql.host:3306/dalmptest?redis:127.0.0.1:6379
> ');
> > >> $rs = $db->PExecute("INSERT INTO bilz (number,message) VALUES (?,?)",
> > >> $sender, $text);
> > >> if ($rs) {
> > >> …
> > >> }
> > >>
> > >> for this you will need DALMP git clone
> git://github.com/nbari/DALMP.git
> > >> damp
> > >>
> > >> give a try maybe could save you some headaches
> > >>
> > >> On Sun, Jun 10, 2012 at 12:55 PM, bilal kamoto <[email protected]>
> wrote:
> > >> > I've tried that and nothing happens just the number is being
> updated. i
> > >> > want
> > >> > to use what is in the text to query for data in the database and
> send it
> > >> > back to sender if it finds a match.
> > >> > thanks in advance
> > >> >
> > >> >> Date: Sat, 9 Jun 2012 23:56:00 +0300
> > >> >> From: [email protected]
> > >> >> To: [email protected]
> > >> >> CC: [email protected]; [email protected]
> > >> >> Subject: Re: php script
> > >> >
> > >> >>
> > >> >> hello there,
> > >> >>
> > >> >> there is an error in you php code, just change this line:
> > >> >>
> > >> >> $stmt->bindParam(':message',$text);
> > >> >>
> > >> >> into this:
> > >> >>
> > >> >> $stmt->bindParam(':text',$text);
> > >> >>
> > >> >> then hopefully it works out for you :D if not, tell us more about
> it.
> > >> >>
> > >> >> note you might also want to store more information about the SMS,
> such
> > >> >> as time and the SMS center it came from ... etc.
> > >> >>
> > >> >> best wishes.
> > >> >>
> > >> >> Quoting bilal kamoto <[email protected]>:
> > >> >>
> > >> >> >
> > >> >> > hi users,
> > >> >> > I've successfully managed to install kannel it is able to send as
> > >> >> > well as receive sms, i got the following script on the online it
> is
> > >> >> > supposed to update database fields, message and sender and then
> send
> > >> >> > a reply but i can only see the sender in the database the message
> > >> >> > does show...
> > >> >> > here is the php code
> > >> >> > <?php
> > >> >> >
> > >> >> > define("DBHOST","localhost",true);
> > >> >> >
> > >> >> > define("DBUSERNAME","root",true);
> > >> >> >
> > >> >> > define("DBPASSWORD","bookert",true);
> > >> >> >
> > >> >> > define("DBNAME","kannel",true);
> > >> >> >
> > >> >> > $con=mysql_connect("localhost","root","bookert");
> > >> >> >
> > >> >> > if(! $con)
> > >> >> >
> > >> >> > {
> > >> >> >
> > >> >> > echo die('Connection Failed'.mysql_error());
> > >> >> >
> > >> >> > }
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> > function insertSms($sender,$text)
> > >> >> >
> > >> >> > {
> > >> >> >
> > >> >> > $con = 'mysql:dbname='.kannel.';host='.localhost;
> > >> >> >
> > >> >> > try {
> > >> >> >
> > >> >> > $cmd = new PDO($con,root,bookert);
> > >> >> >
> > >> >> > $stmt = $cmd->prepare("INSERT INTO bilz (number,message)
> > >> >> > VALUES (:sender,:text)");
> > >> >> >
> > >> >> > $stmt->bindParam(':sender',$sender);
> > >> >> >
> > >> >> > $stmt->bindParam(':message',$text);
> > >> >> >
> > >> >> > $stmt->execute();
> > >> >> >
> > >> >> > $cmd = null;
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> > if($stmt->rowCount()>0)
> > >> >> >
> > >> >> > {
> > >> >> >
> > >> >> > echo "Hello ".$text.". Thank you for your registration.";
> > >> >> >
> > >> >> > }
> > >> >> >
> > >> >> > else
> > >> >> >
> > >> >> > {
> > >> >> >
> > >> >> > echo "Sorry an error has occured";
> > >> >> >
> > >> >> > }
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> > }
> > >> >> >
> > >> >> > catch (PDOException $e) {
> > >> >> >
> > >> >> > echo 'Connection failed: ' . $e->getMessage();
> > >> >> >
> > >> >> > }
> > >> >> >
> > >> >> > }
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> > insertSms($_GET['sender'],$_GET['text']);
> > >> >> >
> > >> >> > ?>
> > >> >> >
> > >> >> > my sms-service group
> > >> >> > get-url = "http://localhost/receivesms.php?sender=%p&
> text=%a"
> > >> >> >
> > >> >> > please help
> > >> >> >
> > >> >> > Date: Tue, 22 May 2012 16:44:52 +0400
> > >> >> > Subject: Re: kannel able to send but not receiving sms
> > >> >> > From: [email protected]
> > >> >> > To: [email protected]
> > >> >> > CC: [email protected]; [email protected]
> > >> >> >
> > >> >> > Please don't spam the list with the same messages.
> > >> >> >
> > >> >> > Thanks.
> > >> >> >
> > >> >> > 2012/5/22 bilal kamoto <[email protected]>
> > >> >> >
> > >> >> >
> > >> >> > Thanks the bind error managed to sort it out, forwarding the sms
> to
> > >> >> > an application then to database is what I need to crack
> > >> >> >
> > >> >> > From: [email protected] [mailto:[email protected]]
> On
> > >> >> > Behalf Of bilal kamoto
> > >> >> >
> > >> >> > Sent: 19 May 2012 17:09
> > >> >> > To: [email protected]
> > >> >> > Cc: [email protected]
> > >> >> > Subject: RE: kannel able to send but not receiving sms
> > >> >> > i have installed gnome admin network to deal with the bind am
> able
> > >> >> > to see other applications running on it but i cant stop them
> really
> > >> >> > dont have a clue how..
> > >> >> >
> > >> >> >
> > >> >> > another thing i want to be forwarding the messages from the
> kannel
> > >> >> > to mysql database and what is in the text field should be used to
> > >> >> > query information and it should automatically return the values
> to
> > >> >> > the initiator of sms.. please help
> > >> >> >
> > >> >> >
> > >> >> > # HTTP administration is disabled by default. Make sure you set
> the
> > >> >> > # password if you enable it.
> > >> >> >
> > >> >> > group = core
> > >> >> > admin-port = 80
> > >> >> > admin-password = bar
> > >> >> > admin-deny-ip = "*.*.*.*"
> > >> >> > admin-allow-ip = "127.0.0.1;192.168.0.*"
> > >> >> >
> > >> >> > smsbox-port = 84
> > >> >> > #wapbox-port = 13004
> > >> >> > wdp-interface-name = "*"
> > >> >> > log-file = "/var/log/kannel/bearerbox.log"
> > >> >> > access-log="/var/log/kannel/access.log"
> > >> >> > box-deny-ip = "*.*.*.*"
> > >> >> >
> > >> >> > box-allow-ip = "127.0.0.1;192.168.0.*"
> > >> >> >
> > >> >> > group = wapbox
> > >> >> > bearerbox-host = localhost
> > >> >> > log-file = "/var/log/kannel/wapbox.log"
> > >> >> >
> > >> >> > # My modem
> > >> >> > group = smsc
> > >> >> > smsc = at
> > >> >> > smsc-id = Nokia 5800 XpressMusic
> > >> >> >
> > >> >> > modemtype = Nokia
> > >> >> > device = /dev/ttyUSB0
> > >> >> > speed = 0
> > >> >> > #pin = 2345
> > >> >> > sim-buffering = true
> > >> >> > #message-storage = MT
> > >> >> >
> > >> >> > # My modem group
> > >> >> > group = modems
> > >> >> > id = Nokia
> > >> >> > name = Nokia
> > >> >> > #detect-string = NOKIA
> > >> >> >
> > >> >> > #keepalive-cmd = "AT+CBC;+CSQ"
> > >> >> > #init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
> > >> >> > #init-string = "AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0"
> > >> >> > #init-string = "AT+CMGL=0,1,2"
> > >> >> >
> > >> >> > #init-string = "AT+CNMI=1,1,0,2,1;+CMEE=1"
> > >> >> > init-string = "AT+CNMI=2,1,2,2,0;+CMEE=1"
> > >> >> > #enable-mms = true
> > >> >> > #sim-buffering = true
> > >> >> >
> > >> >> > # fake smsc
> > >> >> > group = smsbox-route
> > >> >> > smsbox-id = bil
> > >> >> > smsc-id = Nokia 5800 XpressMusic
> > >> >> >
> > >> >> > #port = 10000
> > >> >> > #connect-allow-ip = 127.0.0.1
> > >> >> >
> > >> >> > #Send SMS
> > >> >> > group = smsbox
> > >> >> > smsbox-id = bil
> > >> >> > bearerbox-host = localhost
> > >> >> > sendsms-port = 13131
> > >> >> > #receivesms-port = 13132
> > >> >> > sendsms-chars = "0123456789 "
> > >> >> >
> > >> >> > global-sender = +255659375093
> > >> >> > access-log = "kannel.access"
> > >> >> > log-file = "smsbox.log"
> > >> >> > log-level = 0
> > >> >> >
> > >> >> > #Receive SMS
> > >> >> > group = sms-service
> > >> >> > #keyword =
> > >> >> > keyword-regex = .*
> > >> >> > catch-all = yes
> > >> >> >
> > >> >> > #get-url = "http://localhost/kannel/receivesms.php?sender=%p&
> ;
> > >> >> > text=%b"
> > >> >> > accept-x-kannel-headers = true
> > >> >> >
> > >> >> > max-messages = 0
> > >> >> >
> > >> >> > #Authentication
> > >> >> > group = sendsms-user
> > >> >> > username = jones
> > >> >> > password = jones
> > >> >> > Date: Mon, 14 May 2012 21:10:16 -0500
> > >> >> > Subject: Re: kannel able to send but not receiving sms
> > >> >> > From: [email protected]
> > >> >> >
> > >> >> > To: [email protected]
> > >> >> > CC: [email protected]
> > >> >> >
> > >> >> > Allways cc list. Others can benefiy from it
> > >> >> >
> > >> >> >
> > >> >> > I have no experience with huawei modems. Seach the list for
> coments.
> > >> >> >
> > >> >> > Bind error is because you have another instance of the offending
> box
> > >> >> > running. You can either use the http admin interface or use a
> init
> > >> >> > script to handle this. Check userguide for detail.
> > >> >> >
> > >> >> >
> > >> >> > Regards
> > >> >> >
> > >> >> > Alvaro
> > >> >> >
> > >> >> > On Monday, May 14, 2012, bilal kamoto <[email protected]>
> wrote:
> > >> >> >> Hi
> > >> >> >> I've tried sim-buffering still doesn't work. Am thinking of
> changing
> > >> >> >> the
> > >> >> >
> > >> >> >> modem to Huawei but am not sure of the model that will support
> > >> >> >> commands
> > >> >> >> to
> > >> >> >> receive sms in the kannel.
> > >> >> >> Another problem every time I re-run the the bearerbox it show
> > >> >> >> address
> > >> >> >> already in use: bind system error do you have a permanent
> solution
> > >> >> >> rather
> > >> >> >
> > >> >> >> than using < kill pid... to kill the processes
> > >> >> >>
> > >> >> >> -----Original Message-----
> > >> >> >> From: Alvaro Cornejo [mailto:[email protected]]
> > >> >> >
> > >> >> >> Sent: 11 May 2012 18:41
> > >> >> >> To: bilal kamoto
> > >> >> >> Cc: [email protected]
> > >> >> >> Subject: Re: kannel able to send but not receiving sms
> > >> >> >>
> > >> >> >> Hi
> > >> >> >
> > >> >> >>
> > >> >> >> If your modem does not support CNMI command --common in nokia
> > >> >> >> phones--,
> > >> >> >> it
> > >> >> >> is not possible to configure it to fwd messages to kannel and
> form
> > >> >> >> there to
> > >> >> >> your app.
> > >> >> >>
> > >> >> >> Try with sim-buffering=true in your modem config so kannel will
> > >> >> >> search
> > >> >> >> for
> > >> >> >
> > >> >> >> inc messages in the modem from time to time.
> > >> >> >>
> > >> >> >> Regards
> > >> >> >>
> > >> >> >> Alvaro
> > >> >> >>
> > >> >> >>
> > >> >> >>
> > >> >> >>
> > >> >> >>
> |---------------------------------------------------------------------------
> > >> >> >> --------------------------------------|
> > >> >> >
> > >> >> >> Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde
> > >> >> >> cualquier
> > >> >> >> celular y Nextel en el Perú, México y en mas de 180 paises. Use
> > >> >> >> aplicaciones
> > >> >> >> 2 vias via SMS y GPRS online
> > >> >> >> Visitenos en www.perusms.NET www.smsglobal.com.mx y
> > >> >> >
> > >> >> >> www.pravcom.com
> > >> >> >>
> > >> >> >>
> > >> >> >> On Fri, May 11, 2012 at 8:01 AM, bilal kamoto <
> [email protected]>
> > >> >> >> wrote:
> > >> >> >
> > >> >> >>> Hi am using Nokia 5800 xpressmusic, I tried using Mincom to
> > >> >> >>> initialize
> > >> >> >>> the modem with AT+CNM=? It gave me an error what should be my
> next
> > >> >> >>> move
> > >> >> >>>
> > >> >> >>> Please help
> > >> >> >>
> > >> >> >
> > >> >> >>
> > >> >> >
> > >> >> > --
> > >> >> >
> > >> >> >
> > >> >> >
> |-----------------------------------------------------------------------------------------------------------------|
> > >> >> > Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde
> > >> >> > cualquier celular y Nextel
> > >> >> >
> > >> >> > en el Perú, México y en mas de 180 paises. Use aplicaciones 2
> vias
> > >> >> > via SMS y GPRS online
> > >> >> > Visitenos en www.perusms.NET www.smsglobal.com.mx y
> > >> >> > www.pravcom.com
> > >> >> >
> > >> >> >
> > >> >>
> > >> >>
>
>
>
>