Component: GSM (EB066, Generic AT) (Wireless): Difference between revisions
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| Line 77: | Line 77: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''AnswerIncomingCall''' | ||
|- | |- | ||
| colspan="2" | Answers the phone for an incoming type call. Returns 0 for success and 255 for failure. | | colspan="2" | Answers the phone for an incoming type call. Returns 0 for success and 255 for failure. | ||
| Line 91: | Line 91: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''CheckForIncoming''' | ||
|- | |- | ||
| colspan="2" | Checks to see if any incoming phone call or SMS message. 0 = Nothing, 1 = Text Received, 2 = Phone Ringing | | colspan="2" | Checks to see if any incoming phone call or SMS message. 0 = Nothing, 1 = Text Received, 2 = Phone Ringing | ||
| Line 105: | Line 105: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''CheckNetworkStatus''' | ||
|- | |- | ||
| colspan="2" | Returns the state of the GSM network. 0 = Not connected, 1 = connected, 255 = no reply from GSM. | | colspan="2" | Returns the state of the GSM network. 0 = Not connected, 1 = connected, 255 = no reply from GSM. | ||
| Line 119: | Line 119: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DeleteAllMessages''' | ||
|- | |- | ||
| colspan="2" | Removes all pending text messages from the GSM module. Returns 0 for success and 255 for fail. | | colspan="2" | Removes all pending text messages from the GSM module. Returns 0 for success and 255 for fail. | ||
| Line 133: | Line 133: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DialNumber''' | ||
|- | |- | ||
| colspan="2" | Performs a standard voice call by dialling the number specified. Returns 0 for call in progress and 255 for no response. | | colspan="2" | Performs a standard voice call by dialling the number specified. Returns 0 for call in progress and 255 for no response. | ||
| Line 152: | Line 152: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetTextNumber''' | ||
|- | |- | ||
| colspan="2" | Collects the sender's phone number from an incoming text message. | | colspan="2" | Collects the sender's phone number from an incoming text message. | ||
| Line 171: | Line 171: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetTextString''' | ||
|- | |- | ||
| colspan="2" | Collects the text message data from an incoming text message. | | colspan="2" | Collects the text message data from an incoming text message. | ||
| Line 190: | Line 190: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''HangUpCall''' | ||
|- | |- | ||
| colspan="2" | Ends a voice based call. Returns 0 for success and 255 for failure. | | colspan="2" | Ends a voice based call. Returns 0 for success and 255 for failure. | ||
| Line 204: | Line 204: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Sets up the GSM module. Returns 0 for OK, 255 for no reply and 254 for command fail. | | colspan="2" | Sets up the GSM module. Returns 0 for OK, 255 for no reply and 254 for command fail. | ||
| Line 218: | Line 218: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadString''' | ||
|- | |- | ||
| colspan="2" | Copies the data from the data string array to a local string variable | | colspan="2" | Copies the data from the data string array to a local string variable | ||
| Line 237: | Line 237: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SendCommand''' | ||
|- | |- | ||
| colspan="2" | Sends a command string to the GSM module. 0 = Command sent ok, 255 = No Reply | | colspan="2" | Sends a command string to the GSM module. 0 = Command sent ok, 255 = No Reply | ||
| Line 261: | Line 261: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SendScript''' | ||
|- | |- | ||
| colspan="2" | Send an AT command script. Returns 0 for fail, 1 for success and 255 for unrecognised script idx. | | colspan="2" | Send an AT command script. Returns 0 for fail, 1 for success and 255 for unrecognised script idx. | ||
| Line 280: | Line 280: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SendString''' | ||
|- | |- | ||
| colspan="2" | Sends a string to the GSM module. | | colspan="2" | Sends a string to the GSM module. | ||
| Line 299: | Line 299: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SendTextMessage''' | ||
|- | |- | ||
| colspan="2" | Sends the text message data specified to the number specified using the SMS protocol. Returns 0 for success and 255 for failure. | | colspan="2" | Sends the text message data specified to the number specified using the SMS protocol. Returns 0 for success and 255 for failure. | ||
| Line 323: | Line 323: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''StringReceive''' | ||
|- | |- | ||
| colspan="2" | Attempts to receive a string from the GSM modem. | | colspan="2" | Attempts to receive a string from the GSM modem. | ||
| Line 338: | Line 338: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
Revision as of 14:23, 13 July 2026
| Author | Matrix Ltd. |
| Version | 2.0 |
| Category | Wireless |
GSM (EB066, Generic AT) component
Low level routines for controlling a standard AT GSM / GPRS interface Also available in the form of the EB066 GSM E-block.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_GSM.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_GSM.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Example program that checks for network connection and then allows a number to be texted or voice dialled.
Waits for connection to be established before allowing texts or calls to be made.
The number at the top of the file in the calculation icon needs to be edited to a number to connect to for texts and calls.
Arduino Connections:
D8-D13 - LEDs / D8 = Connection Status - Flashing = Connecting / D9 Text sending / D10 Call Active
D0-D7 - GSM
A0-A5 - Switches - A0 = Send Text / A1 = Start voice call / A2 = End call
PIC Connections
B0-B7 - LEDs / B0 = Connection Status - Flashing = Connecting / B1 Text sending / B2 Call Active
C0-C7 - GSM
A0-A7 - Switches - A0 = Send Text / A1 = Start voice call / A2 = End call
Macro reference
AnswerIncomingCall
| AnswerIncomingCall | |
| Answers the phone for an incoming type call. Returns 0 for success and 255 for failure. | |
| Return | |
CheckForIncoming
| CheckForIncoming | |
| Checks to see if any incoming phone call or SMS message. 0 = Nothing, 1 = Text Received, 2 = Phone Ringing | |
| Return | |
CheckNetworkStatus
| CheckNetworkStatus | |
| Returns the state of the GSM network. 0 = Not connected, 1 = connected, 255 = no reply from GSM. | |
| Return | |
DeleteAllMessages
| DeleteAllMessages | |
| Removes all pending text messages from the GSM module. Returns 0 for success and 255 for fail. | |
| Return | |
DialNumber
| DialNumber | |
| Performs a standard voice call by dialling the number specified. Returns 0 for call in progress and 255 for no response. | |
| Number | |
| Return | |
GetTextNumber
| GetTextNumber | |
| Collects the sender's phone number from an incoming text message. | |
| NumBytes | |
| Return | |
GetTextString
| GetTextString | |
| Collects the text message data from an incoming text message. | |
| NumBytes | |
| Return | |
HangUpCall
| HangUpCall | |
| Ends a voice based call. Returns 0 for success and 255 for failure. | |
| Return | |
Initialise
| Initialise | |
| Sets up the GSM module. Returns 0 for OK, 255 for no reply and 254 for command fail. | |
| Return | |
ReadString
| ReadString | |
| Copies the data from the data string array to a local string variable | |
| NumBytes | |
| Return | |
SendCommand
| SendCommand | |
| Sends a command string to the GSM module. 0 = Command sent ok, 255 = No Reply | |
| Command | |
| SendCR | |
| Return | |
SendScript
| SendScript | |
| Send an AT command script. Returns 0 for fail, 1 for success and 255 for unrecognised script idx. | |
| idx | |
| Return | |
SendString
| SendString | |
| Sends a string to the GSM module. | |
| Text | |
| Return | |
SendTextMessage
| SendTextMessage | |
| Sends the text message data specified to the number specified using the SMS protocol. Returns 0 for success and 255 for failure. | |
| Number | |
| Message | |
| Return | |
StringReceive
| StringReceive | |
| Attempts to receive a string from the GSM modem. | |
| Return | |