Incoming call NR on GSM

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

Incoming call NR on GSM

Post by Desdewit »

Hi Guys

When using a gsm module, how do you check the NR: of an incoming call?
My remote gsm system is working really well but I need to add a security check on incoming calls when opening a gate to prevent unauthorized no’s to open the gate via missed call.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Incoming call NR on GSM

Post by Benj »

Hello,

Which GSM module are you using? If your using an E-block then what version is it? I will have a look at the AT command lists and see if anything jumps out.

This may work if issued during the incoming call.

at+clcc

Otherwise this has been suggested At+clip=1 but I'm not sure what it does.

Source: http://www.protonbasic.co.uk/showthread ... -GSM-modem

This also looks useful.

http://stackoverflow.com/questions/2013 ... -caller-id

Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

Re: Incoming call NR on GSM

Post by Desdewit »

Hi Ben

I'm using a custom unit with a SIM 900 module.

Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

Re: Incoming call NR on GSM

Post by Desdewit »

Hi Benj

When I send the command AT+CLIP=1 I receive OK
When I send AT+CLCC I receive +CLCC:1,1,4
I've downloaded the SIM900_AT Command Manual and played around with some of the commands but its not much help.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Incoming call NR on GSM

Post by Benj »

Hello,

If you do a string receive when the phone is ringing with the AT+CLIP=1 sent near the start of the program then you should get the phone number.

See this page, about half way down it details caller ID using a SIM900. Search the page for "caller" without the speech marks to jump right to the info.

http://tronixstuff.com/2014/01/08/tutor ... m-modules/

Let me know how your getting on.

Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

Re: NO Incoming call NR on GSM

Post by Desdewit »

:x :x :x :x
I've tried sending AT+CLIP=1 as per sample but without success.
After every ring I receive "+CRING: VOICE" as expected but nothing else.
I'm uploading a basic version of my program. Please let me know what I'm doing wrong?
When I test the unit on a terminal with direct serial connection everything works.
Attachments
Temp USB Serial v1.0e.fcf
(57.49 KiB) Downloaded 339 times

Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

Re: Incoming call NR on GSM

Post by Desdewit »

Hi Benj

Is it possible that this could be a flowcode error.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Incoming call NR on GSM

Post by Benj »

Hello,

I think this is more likely a module or network issue then a Flowcode issue but I would be interested on your progress with this. If you want to fully remove the Flowcode element then you could use the RS232 component instead of the GSM and this will allow a direct route to the communications going on between the uC and the GSM module. What does the command datasheet for your device say?

I've made a note to give this a go next time I am playing with the GSM E-block to see if it is working on this.

Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

Re: Incoming call NR on GSM

Post by Desdewit »

Hi Benj

I did a little test using only the flowcode RS232 component macro to communicate to the gsm module and I received the “CLIP:” response with the number as it should be.
Something in the gsm component macro must be wrong or not retrieving all the data from the incoming string.
Did you have time to look at my program. It could be a programming error i'm missing.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Incoming call NR on GSM

Post by Benj »

Hello,

Aha ok it sounds like the finite state machine for the GSM received data is eating the response and not displaying it. I will see if I can replicate the issue here with the GSM E-block and either find a workaround for you or add an option to easily expose this functionality.

Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

Re: Incoming call NR on GSM

Post by Desdewit »

Hallo Benj

In the flowcode help file I found the following explanation.
"(STRING) StringReceive ( ) makro Returns a line from the string that has been received up to a carriage return cut-off"
As far as I know the gsm sends a carriage return & line feed after receiving the "+CRING: VOICE" reply
So the data after that will be lost.
Could that be the problem :?:

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Incoming call NR on GSM

Post by Benj »

Hello,

Yes that sounds like the issue. If you send a second StringReceive straight after then does that catch the data that you need?

It's on the list to get around to this but I don't just want to rush in as this code is complex and I need a good run at it to make sure I don't break anything.

Desdewit
Posts: 130
Joined: Sat Feb 26, 2011 4:26 am
Location: South Africa
Has thanked: 25 times
Been thanked: 11 times
Contact:

Re: Incoming call NR on GSM

Post by Desdewit »

Hi Benj

No for some reason if I do a string receive straight after then the first string prints again.

Post Reply