Component: MIAC GSM (MIAC: Addon Modules)
Author | Matrix TSL |
Version | 1.0 (Release) |
Category | MIAC: Addon Modules |
Contents
- 1 MIAC GSM component
- 2 Examples
- 3 Downloadable macro reference
- 3.1 GSM_SetStart
- 3.2 GSM_CheckNetworkStatus
- 3.3 GSM_SendCommand
- 3.4 GSM_SendScript
- 3.5 GSM_SendTextMessage
- 3.6 GSM_GetCharCount
- 3.7 GSM_CheckForIncoming
- 3.8 GSM_HangUpCall
- 3.9 GSM_SetReset
- 3.10 GSM_DialNumber
- 3.11 GSM_StringReceive
- 3.12 LED_Control
- 3.13 GSM_AnswerIncomingCall
- 3.14 GSM_SetRTS
- 3.15 GSM_Initialize
- 3.16 GSM_SendCharacter
- 3.17 GSM_ReadString
- 3.18 DigitalOutput
- 3.19 GSM_GetTextString
- 3.20 GSM_GetStatus
- 3.21 AnalogInput
- 3.22 GSM_GetTextNumber
- 3.23 DigitalInput
- 3.24 GSM_GetCharacter
- 4 Simulation macro reference
- 5 Property reference
MIAC GSM component
GSM Addon for MIAC System.
Examples
No additional examples
Downloadable macro reference
GSM_SetStart
Sets the state of the GSM module Start pin.
(Low level GSM interface)
Parameters
- BYTE State
Return value
- This call does not return a value
GSM_CheckNetworkStatus
Returns the state of the GSM network.
0 = Not connected, 1 = connected, 255 = no reply from GSM.
Parameters
- This macro has no parameters
Return value
GSM_SendCommand
Sends a command string to the GSM module.
0 = Command sent ok, 255 = No Reply
Parameters
- <- STRING Command
- This parameter may be returned back to the caller
- BYTE SendCR
Return value
GSM_SendScript
Send an AT command script.
Returns 0 for fail, 1 for success and 255 for unrecognised script idx.
Parameters
- BYTE idx
Return value
GSM_SendTextMessage
Sends the text message data specified to the number specified using the SMS protocol.
Returns 0 for success and 255 for failure.
Parameters
- <- STRING Number
- This parameter may be returned back to the caller
- <- STRING Message
- This parameter may be returned back to the caller
Return value
GSM_GetCharCount
Returns the number of characters waiting to be read from the receive buffer.
(Low level GSM interface)
Parameters
- This macro has no parameters
Return value
GSM_CheckForIncoming
Checks to see if any incoming phone call or SMS message.
0 = Nothing, 1 = Text Received, 2 = Phone Ringing
Parameters
- This macro has no parameters
Return value
GSM_HangUpCall
Ends a voice based call.
Returns 0 for success and 255 for failure.
Parameters
- This macro has no parameters
Return value
GSM_SetReset
Sets the state of the GSM module Reset pin.
State = 0 will hold the module in the reset state
(Low level GSM interface)
Parameters
- BYTE State
Return value
- This call does not return a value
GSM_DialNumber
Performs a standard voice call by dialling the number specified.
Returns 0 for call in progress and 255 for no response.
Parameters
- <- STRING Number
- This parameter may be returned back to the caller
Return value
GSM_StringReceive
Attempts to receive a string from the GSM modem.
Returns 1 if successful, 0 on timeout
Parameters
- This macro has no parameters
Return value
LED_Control
Sets the indicator LED On (State=1) or Off (State=0)
Parameters
- BYTE State
Return value
- This call does not return a value
GSM_AnswerIncomingCall
Answers the phone for an incoming type call.
Returns 0 for success and 255 for failure.
Parameters
- This macro has no parameters
Return value
GSM_SetRTS
Sets the state of the GSM module RTS pin.
(Low level GSM interface)
Parameters
- BYTE State
Return value
- This call does not return a value
GSM_Initialize
Resets and restarts the GSM module
Sets up the GSM module.
Returns 0 for OK, 255 for no reply and 254 for command fail.
Parameters
- This macro has no parameters
Return value
GSM_SendCharacter
Sends the byte character to the GSM module.
(Low level GSM interface)
Parameters
- BYTE Byte
Return value
- This call does not return a value
GSM_ReadString
Copies the data from the data string array to a local string variable
Parameters
- BYTE NumBytes
Return value
DigitalOutput
Set a Terminal Output to High (Value=1) or Low (Value=0)
Parameters
- BYTE Terminal
- BYTE Value
Return value
GSM_GetTextString
Collects the text message data from an incoming text message.
Parameters
- BYTE NumBytes
Return value
GSM_GetStatus
Returns status bits from the GSM module.
Bit 6 = CTS, Bit 12 = STATUS (LED), Bit 13 = RING
(Low level GSM interface)
Parameters
- This macro has no parameters
Return value
AnalogInput
Read the ADC value of a Terminal
Returns 12 bit ADC reading
Parameters
- BYTE Terminal
- Terminal number to be read
Return value
GSM_GetTextNumber
Collects the sender's phone number from an incoming text message.
Parameters
- BYTE NumBytes
Return value
DigitalInput
Read the value of a terminal
Parameters
- BYTE Terminal
Return value
GSM_GetCharacter
Returns the next character waiting to be read from the receive buffer.
(Low level GSM interface)
Parameters
- This macro has no parameters
Return value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Module Type
This property is of type Fixed list of ints and can be referenced with the variable name MODULE_TYPE.
No additional information
Module Address
This property is of type Fixed list of ints and can be referenced with the variable name ORDINAL.
No additional information
Script Count
This property is of type Fixed list of ints and can be referenced with the variable name script_count.
Maximum number of scripts to store in the device's ROM
Script1
This property is of type Multiple lines of text and can be referenced with the variable name script1.
ASCII based AT command data stored in ROM and used when sending script 1
Expect Echo
This property is of type Fixed list of ints and can be referenced with the variable name expect_echo.
No additional information