# Disallow incoming calls (AT+CLCK) + Modem Disables

**URL:** <https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272>\
**Category:** Open AT\
**Created:** [April 20, 2007, 1:33pm UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272 "2007-04-20T13:33:06Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![PhilipB](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@PhilipB](https://forum.sierrawireless.com/u/PhilipB)\
**Post date:** [April 20, 2007, 1:33pm UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272/1 "2007-04-20T13:33:06Z")

</div>

Hi. I have a Java application which sends a lot of sms messages to the employers of a company. This all works fine, but some of the employers are calling to the number (the fastrack M1306B modem) which interupts the sending (after 10 minutes). Is there any way to just disable incoming calls?

After second test, the modem again stops after 10 minutes.  
The modem was sending SMS messages (around 120) in 10 minutes and than disables. I had to set the PIN code again to resume sending of messages.

In the first case, the modem wasn’t disabled, I could just start again with sending the messages. In the second case, the modem seemed to be completely disabled.

Was the modem overloaded or something?

Anybody has an idea what the problem can be?

Thanks in advance.

Philip

---

<div class="post-metadata">

**Author:** ![PhilipB](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@PhilipB](https://forum.sierrawireless.com/u/PhilipB)\
**Post date:** [April 23, 2007, 9:35am UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272/2 "2007-04-23T09:35:17Z")

</div>

Some new tests:

I think this is the problem:

1. Start sending a message, set PDU length:  
AT+CMGS=[PDU Lenght]  
2. Now “\>” appears which means the PDU text needs to be set

> 00 + PDU Text  
> 3. ctrl-z to end message  
> ctrl-z

The problem starts at step 2.

> is shown and when somebody calls or sends an SMS to the modem at this step it goes like:

> +CRING (or something else for an SMS message)

I turned off the +CRING= VOICE text with: AT+CRC=0  
Now I just get RING, but this will still give the same problem.

After searching again through the manual I found the AT+CLCK command:  
AT+CLCK=“AI”,0,PINCODE,7 and AT+CLCK=“IR”,0,PINCODE,7

This should normally barr incoming calls and messages (0 =\> lock facility, 7 =\> Class: Voice, data and fax)

I always get the CME ERROR: 30 (no network service) line after these commands, so I can’t set this up.

The 30 error, does it mean that my provider doesn’t support this option?

I’ve checked the supported values with AT+CLCK=? which gave me:  
+CLCK: (“PS”,“SC”,“AO”,“OI”,“OX”,“AI”,“IR”,“AB”,“AG”,“AC”,“FD”,“PN”,“PU”,“PP”,“P  
C”)  
So normally it should be supported?

With this AT+CLCK command, you also have to enter a password which I presume is the pincode?

I think this barring option could realy help me out. So if anyone has an idea about how to get this to work, I would realy appreciate it.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![colin-tfe](https://avatars.discourse-cdn.com/v4/letter/c/cdc98d/32.png) [@colin-tfe](https://forum.sierrawireless.com/u/colin-tfe)\
**Post date:** [April 23, 2007, 11:21am UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272/3 "2007-04-23T11:21:56Z")

</div>

Hi Philip !

About command AT+CLCK :

1. Sim card must be in FULL INIT state before performing AT+CLCK
2. About the password, i think you should have a look to AT+CPWD (the AT command describe just after AT+CLCK one)

As i never used (at least in this way) the services you are using, i’m afraid it is all i can do to help you…

---

<div class="post-metadata">

**Author:** ![PhilipB](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@PhilipB](https://forum.sierrawireless.com/u/PhilipB)\
**Post date:** [April 23, 2007, 12:44pm UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272/4 "2007-04-23T12:44:41Z")

</div>

Alright, thanks!

I’ll try to set up a password for the AI CLCK and i’ll see if I can use this.

What do you mean with FULL INIT?  
The modem has been activated with AT+CFUN=1 and PIN code has been entered with AT+CPIN=pincode

Is there a state above this?

I’ll try it in a few minutes, i’m currently again sending around 500 messages. The first 300 now went out just fine.  
After around 300 messages it just stopped, without someone calling or sending an SMS message and the log gave this:

> [@](#):
>
> [23/04/2007, 14:16]: Te verzenden bericht: SMSID: 1037 gsm: 32496\*\*\*\*\*\* berid: 7 bericht: Plus que \*\*\*\*\* euro pour le jour de vacance extra. Tout reste possible! GO FOR IT! Chef de ventes prior: 10  
> [23/04/2007, 14:16]: read port: AT+CMGS=103
> 
> > 
> 
> [23/04/2007, 14:16]: read port: 0011000B912394_6_\*\*_F_0000AA6550767D0E8AD7CB2099CB069BB968B719A85C97BF41F0775D0E629741EA775D0E229741F6F038EC1E9741653C5D1E7681A8EF3A1D242FCFE96510FC3D9FA7C5EC7208747C828C4F2928490D8186E8B219442E83EC6537BD3C07
> 
> [23/04/2007, 14:16]: read port:  
> +WIND: 3
> 
> +CGREG: 0
> 
> +CREG: 0
> 
> +CGREG: 0
> 
> [23/04/2007, 14:16]: read port:  
> +WIND: 1
> 
> [23/04/2007, 14:16]: read port:  
> +WIND: 7

So the modem just disabled itself?  
I can fix this in the code, if it has been disabled to just enable it again (With CPIN). I’m just curious why it disables itself…

---

<div class="post-metadata">

**Author:** ![PhilipB](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@PhilipB](https://forum.sierrawireless.com/u/PhilipB)\
**Post date:** [April 23, 2007, 12:56pm UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272/5 "2007-04-23T12:56:02Z")

</div>

The AT+CPWD command also gives me the +CME ERROR: 30 line.

So it would be the FULL INIT or something then?

---

<div class="post-metadata">

**Author:** ![colin-tfe](https://avatars.discourse-cdn.com/v4/letter/c/cdc98d/32.png) [@colin-tfe](https://forum.sierrawireless.com/u/colin-tfe)\
**Post date:** [April 23, 2007, 1:31pm UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272/6 "2007-04-23T13:31:16Z")

</div>

> [@PhilipB](#):
>
> What do you mean with FULL INIT?  
> The modem has been activated with AT+CFUN=1 and PIN code has been entered with AT+CPIN=pincode

After entering the PIN code, you have to wait for the +WIND:4 indication (sim card full init state). Or, with adl librairy, subscribe to SIM events and wait for the ADL\_SIM\_STATE\_FULL\_INIT.

> [@](#):
>
> So the modem just disabled itself?  
> I can fix this in the code, if it has been disabled to just enable it again (With CPIN). I’m just curious why it disables itself…

I’ve read something about sending several SMS in a short delay (i dont know if it’s your case). After sending a SMS, the link is automaticaly closed. To keep it up, see command AT+CMMS…

---

<div class="post-metadata">

**Author:** ![PhilipB](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@PhilipB](https://forum.sierrawireless.com/u/PhilipB)\
**Post date:** [April 23, 2007, 1:52pm UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272/7 "2007-04-23T13:52:15Z")

</div>

I have already used AT+CMMS=2 which keeps the link open.

In this case, the modem somehow not only closes the link but shuts it down. The pincode has to be enterred again before you can go one with using the modem.

about the +WIND: 4

> [@](#):
>
> AT+CPIN=1234  
> OK
> 
> +CREG: 2
> 
> +CREG: 1  
> AT  
> OK  
> AT+WIND?  
> +WIND: 511
> 
> OK  
> Still no WIND: 4
> 
> AT  
> OK
> 
> After a while:
> 
> AT+WIND?  
> +WIND: 511
> 
> OK
> 
> +WIND: 4
> 
> WIND: 4 is shown so i’ll try the command:
> 
> AT+CLCK=“AI”,0,1234,7  
> +CME ERROR: 30

Very weird error 😕

---

<div class="post-metadata">

**Author:** ![colin-tfe](https://avatars.discourse-cdn.com/v4/letter/c/cdc98d/32.png) [@colin-tfe](https://forum.sierrawireless.com/u/colin-tfe)\
**Post date:** [April 24, 2007, 6:25am UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272/8 "2007-04-24T06:25:10Z")

</div>

Well…

Maybe this service is not available on the network you use… or the service is locked in the module… you should maybe ask your distributor !

Sorry for not being able to help you more…

---

<div class="post-metadata">

**Author:** ![PhilipB](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@PhilipB](https://forum.sierrawireless.com/u/PhilipB)\
**Post date:** [April 24, 2007, 6:55am UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272/9 "2007-04-24T06:55:13Z")

</div>

Alright, thanks for your help though!

I have already contacted my network, but it can take up to a week before I get a reply. So i’ll have to wait.

If anybody else has an idea, feel free to post it 🙂

Thanks

---

<div class="post-metadata">

**Author:** ![PhilipB](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@PhilipB](https://forum.sierrawireless.com/u/PhilipB)\
**Post date:** [April 24, 2007, 8:18am UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272/10 "2007-04-24T08:18:20Z")

</div>

So the problem remains with the calling, sometimes the sending just stops like:

> [@](#):
>
> [24/04/2007, 09:45]: To send: SMSID: 1132 gsm: 32494123456 berid: 8 bericht: Test met bellen prior: 10  
> [24/04/2007, 09:45]: read port: AT+CMGS=28
> 
> > 
> 
> [24/04/2007, 09:45]: read port: 0011000B912394423254F60000AA0FD4F29C0E6A97E9207199CD2EBB01
> 
> [color=red][24/04/2007, 09:45]: Teller: 0 Resultaat: “0011000B912394423254F60000AA0FD4F29C0E6A97E9207199CD2EBB01”  
> [24/04/2007, 09:45]: read port:  
> +CMGS: 21
> 
> OK
> 
> RING
> 
> RING
> 
> RING
> 
> [color=blue][24/04/2007, 09:45]: Teller: 1 Result: "  
> +CMGS: 21
> 
> OK  
> RING
> 
> RING
> 
> RING  
> "  
> [24/04/2007, 09:45]: Message was send!  
> [24/04/2007, 09:45]: Bericht 1132 werd verzonden.
> 
> This message was still sent fine, Notice the RING. I was calling to the modem at that time
> 
> [24/04/2007, 09:45]: To send: SMSID: 1133 gsm: 32494123456 berid: 8 bericht: Test met bellen prior: 10  
> [24/04/2007, 09:45]: read port: AT+CMGS=28
> 
> > 
> 
> [24/04/2007, 09:45]: read port: 0011000B912394423254F60000AA0FD4F29C0E6A97E9207199CD2EBB01
> 
> [color=green][24/04/2007, 09:45]: Teller: 0 Resultaat: “0011000B912394423254F60000AA0FD4F29C0E6A97E9207199CD2EBB01”
> 
> Nothing happens anymore, but this message was sent!

My program does nothing anymore after this, It’s in a loop which keeps on reading the port until it gets the "+CMGS: " and OK message.  
You can see that there is no +CMGS in the red Port Read, but there is one after reading the port again (blue). You can see the counter (Teller), it was the second read (=1) After this it goes to the next message.

In the next message it is also in the loop as you can see in the green line.  
But it doesn’t keep on reading the port.

I closed this program and opened a terminal program, made a connection with the COM port, sent the command “AT” and I got “OK” and some RING lines.

I presume the RING has something to do with that which confuses the modem and program.

Or sometimes I get the CME Error:

> [@](#):
>
> [24/04/2007, 09:29]: To send: SMSID: 1133 gsm: 32494123456 berid: 8 bericht: Test met bellen prior: 10  
> [24/04/2007, 09:29]: read port: AT+CMGS=28
> 
> > 
> 
> [24/04/2007, 09:29]: read port: 0011000B912394423254F60000AA0FD4F29C0E6A97E9207199CD2EBB01
> 
> [24/04/2007, 09:29]: Teller: 0 Resultaat: “0011000B912394423254F60000AA0FD4F29C0E6A97E9207199CD2EBB01”  
> [24/04/2007, 09:29]: read port:  
> +CMGS: 19
> 
> OK
> 
> RING
> 
> RING
> 
> RING
> 
> [24/04/2007, 09:29]: Teller: 1 Resultaat: "  
> +CMGS: 19
> 
> OK
> 
> RING
> 
> RING
> 
> RING  
> "  
> [24/04/2007, 09:29]: Message was sent!  
> [24/04/2007, 09:29]: Bericht 1133 werd verzonden.  
> [24/04/2007, 09:29]: To send: SMSID: 1134 gsm: 32494123456 berid: 8 bericht: Test met bellen prior: 10  
> [24/04/2007, 09:29]: read port: AT+CMGS=28
> 
> > 
> 
> [24/04/2007, 09:29]: read port: 0011000B912394423254F60000AA0FD4F29C0E6A97E9207199CD2EBB01  
> +CMS ERROR: 304
> 
> [color=red][24/04/2007, 09:29]: Teller: 0 Resultaat: "0011000B912394423254F60000AA0FD4F29C0E6A97E9207199CD2EBB01  
> +CMS ERROR: 304  
> "  
> [24/04/2007, 09:29]: There was an error

I caught this error as you can see in the last line. But the loop also stops here.

Isn’t there any way to just NOT show the RING? I think this can maybe be the problem.

---

<div class="post-metadata">

**Author:** ![colin-tfe](https://avatars.discourse-cdn.com/v4/letter/c/cdc98d/32.png) [@colin-tfe](https://forum.sierrawireless.com/u/colin-tfe)\
**Post date:** [April 24, 2007, 9:30am UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272/11 "2007-04-24T09:30:15Z")

</div>

> [@PhilipB](#):
>
> My program does nothing anymore after this, It’s in a loop which keeps on reading the port until it gets the "+CMGS: " and OK message.

Well, this is maybe the problem ! You cant do active wait with wavecom modems with a for loop or a while loop, as there is a watchdog. If a function needs more than 7 secondes to be executed, the watchdog resets the module !

> [@PhilipB](#):
>
> +CMS ERROR: 304

From wavecom doc : CMS ERROR: 304 = invalid PDU mode parameter

> [@PhilipB](#):
>
> Isn’t there any way to just NOT show the RING? I think this can maybe be the problem.

Yes, very easy with Basic or ADL librairy… but with AT commands, i really dont know…

---

<div class="post-metadata">

**Author:** ![PhilipB](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@PhilipB](https://forum.sierrawireless.com/u/PhilipB)\
**Post date:** [April 24, 2007, 10:14am UTC](https://forum.sierrawireless.com/t/disallow-incoming-calls-at-clck-modem-disables/1272/12 "2007-04-24T10:14:36Z")

</div>

Alright, thanks again.

My network provider will be contacted by the head of the company (Goes much faster) to disable all incoming trafic. That should normally also do the trick. If it doesn’t, I’ll try Basic or ADL Librairy (Don’t know both of them, so I will have to learn it 🙂 ).

I knew what the 304 error was, And it will probably be the result of the RING text that will automatically be set in the parameter.

Thanks again colin-tfe!
