Hey everybody,
#working code / answer:
#original thoughts:
I want to get the CallerID when somebody calls my electron. I definitly need a different Sim card for this, thats for sure.
The AT Command I need for that is:
AT+UCALLSTAT
which needs to be enabled (I do not know the default setting)
when a call occurs that it is giving me back the caller ID in this format:
+UCALLSTAT: <call_id>,<stat>
So far so good.
Now I want to determine what would be the best option for recognizing a call.
In another Thread they spoke about the PB12 pin which is connected to the "alert" pin (or so) of the ublox which I guess should trigger when a SMS or Call is coming in.
PD12 is not brought out to the standard D/A Pins. So I can't set an Interrupt on them using the normal firmware (or can I?)
#what I need:
how to enable the Interrupt on PB12 on an Electron.
Or is anyone else thinking polling the Serial line is a better solution?
I might need that anyways because the +UCALLSTAT might occur earlier that the ISP..
Thanks for your help!
Project Idea: check if phone number is inside a local(/online) "database" and only if yes then toggle a relay. If not maybe send him a SMS for further instructions.
#EDIT:
The Datasheet says that the STM32 is supporting up to 140 interrupt able pins.. So the chances are good..
Edit 2: the alternate Function name of this pin is TIM1_BKIN
Timer 1... BK(?)Input sounds good..
EDIT3:
from reference manual:
http://www.st.com/st-web-ui/static/active/en/resource/technical/document/reference_manual/CD00225773.pdf
6.3.8 External interrupt/wakeup lines
All ports have external interrupt capability. To use external interrupt lines, the port must be configured in input mode, refer to Section 8.2: External interrupt/event controller (EXTI) and Section 8.2.3: Wakeup event management.
EDIT4:
So I need to ORRS [0, =0x14] , =0x1
<-- that's Assembler... and how to do this with C...?