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.
Fork of SprintUSBModemHTTPClientTest by
SprintUSBModem Class Reference
Sprint USB Modem (Sierra Wireless 598U) More...
#include <SprintUSBModem.h>
Public Member Functions | |
| SprintUSBModem (PinName powerGatingPin=NC, bool powerGatingOnWhenPinHigh=true, int serial=0) | |
| Create Sprint USB Modem (Sierra Wireless 598U) 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. | |
| ATCommandsInterface * | getATCommandsInterface () |
| Get the ATCommandsInterface instance. | |
| int | power (bool enable) |
| Switch power on or off In order to use this function, a pin name must have been entered in the constructor. | |
Detailed Description
Sprint USB Modem (Sierra Wireless 598U)
Definition at line 33 of file SprintUSBModem.h.
Constructor & Destructor Documentation
| SprintUSBModem | ( | PinName | powerGatingPin = NC, |
| bool | powerGatingOnWhenPinHigh = true, |
||
| int | serial = 0 |
||
| ) |
Create Sprint USB Modem (Sierra Wireless 598U) API instance.
- Parameters:
-
powerGatingPin Optional pin commanding a power gating transistor on the modem's power line powerGatingOnWhenPinHigh true if the pin needs to be high to power the dongle, defaults to true
Definition at line 31 of file SprintUSBModem.cpp.
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
Definition at line 80 of file SprintUSBModem.cpp.
| int disconnect | ( | ) |
Close the internet connection.
- Returns:
- 0 on success, error code on failure
Definition at line 129 of file SprintUSBModem.cpp.
| ATCommandsInterface * getATCommandsInterface | ( | ) |
Get the ATCommandsInterface instance.
- Returns:
- Pointer to the ATCommandsInterface instance
Definition at line 269 of file SprintUSBModem.cpp.
| 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
Definition at line 215 of file SprintUSBModem.cpp.
| 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
Definition at line 242 of file SprintUSBModem.cpp.
| int power | ( | bool | enable ) |
Switch power on or off In order to use this function, a pin name must have been entered in the constructor.
- Parameters:
-
enable true to switch the dongle on, false to switch it off
- Returns:
- 0 on success, error code on failure
Definition at line 274 of file SprintUSBModem.cpp.
| 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
Definition at line 188 of file SprintUSBModem.cpp.
Generated on Tue Jul 12 2022 13:16:12 by
1.7.2
