Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
VodafoneUSBModem Class Reference
Vodafone USB Modem (K3770/K3772-Z) dongle. More...
#include <VodafoneUSBModem.h>
Public Member Functions | |
| VodafoneUSBModem () | |
| Create Vodafone USB Modem (K3770/K3772-Z) dongle API instance. | |
| int | connect (const char *apn=NULL, const char *user=NULL, const char *password=NULL) |
| Open a 3G internet connection. | |
| int | disconnect () |
| Close the internet connection. | |
| int | sendSM (const char *number, const char *message) |
| Send a SM. | |
| int | getSM (char *number, char *message, size_t maxLength) |
| Receive a SM. | |
| int | getSMCount (size_t *pCount) |
| Get the number of SMs in the incoming box. | |
| int | sendUSSD (const char *command, char *result, size_t maxLength) |
| Send a USSD command & wait for its result. | |
| int | getLinkState (int *pRssi, LinkMonitor::REGISTRATION_STATE *pRegistrationState, LinkMonitor::BEARER *pBearer) |
| Get link state. | |
| ATCommandsInterface * | getATCommandsInterface () |
| Get the ATCommandsInterface instance. | |
Detailed Description
Vodafone USB Modem (K3770/K3772-Z) dongle.
Definition at line 37 of file VodafoneUSBModem.h.
Constructor & Destructor Documentation
| VodafoneUSBModem | ( | ) |
Create Vodafone USB Modem (K3770/K3772-Z) dongle API instance.
Member Function Documentation
| int connect | ( | const char * | apn = NULL, |
| const char * | user = NULL, |
||
| const char * | password = NULL |
||
| ) |
Open a 3G internet connection.
- Returns:
- 0 on success, error code on failure
| int disconnect | ( | ) |
Close the internet connection.
- Returns:
- 0 on success, error code on failure
| ATCommandsInterface* getATCommandsInterface | ( | ) |
Get the ATCommandsInterface instance.
- Returns:
- Pointer to the ATCommandsInterface instance
| int getLinkState | ( | int * | pRssi, |
| LinkMonitor::REGISTRATION_STATE * | pRegistrationState, | ||
| LinkMonitor::BEARER * | pBearer | ||
| ) |
Get link state.
- Parameters:
-
pRssi pointer to store the current RSSI in dBm, between -51 dBm and -113 dBm if known; -51 dBm means -51 dBm or more; -113 dBm means -113 dBm or less; 0 if unknown pRegistrationState pointer to store the current registration state pBearer pointer to store the current bearer
- Returns:
- 0 on success, error code on failure
| int getSM | ( | char * | number, |
| char * | message, | ||
| size_t | maxLength | ||
| ) |
Receive a SM.
- Parameters:
-
number Pointer to a buffer to store the sender's phone number (must be at least 17 characters-long, including the sapce for the null-terminating char) message Pointer to a buffer to store the the incoming message maxLength Maximum message length that can be stored in buffer (including null-terminating character)
- Returns:
- 0 on success, error code on failure
| int getSMCount | ( | size_t * | pCount ) |
Get the number of SMs in the incoming box.
- Parameters:
-
pCount pointer to store the number of unprocessed SMs on
- Returns:
- 0 on success, error code on failure
| int sendSM | ( | const char * | number, |
| const char * | message | ||
| ) |
Send a SM.
- Parameters:
-
number The receiver's phone number message The message to send
- Returns:
- 0 on success, error code on failure
| int sendUSSD | ( | const char * | command, |
| char * | result, | ||
| size_t | maxLength | ||
| ) |
Send a USSD command & wait for its result.
- Parameters:
-
command The command to send result Buffer in which to store the result maxLength Maximum result length that can be stored in buffer (including null-terminating character)
- Returns:
- 0 on success, error code on failure
Generated on Tue Jul 12 2022 17:44:11 by
1.7.2