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.
Dependents: HelloWorld ServoInterfaceBoardExample1 4180_Lab4
Diff: if/umtsstick/UMTSStickNetIf.h
- Revision:
- 5:dd63a1e02b1b
- Parent:
- 4:fd826cad83c0
- Child:
- 6:b7dd7cde8ad2
--- a/if/umtsstick/UMTSStickNetIf.h Fri Jul 09 14:46:47 2010 +0000 +++ b/if/umtsstick/UMTSStickNetIf.h Tue Jul 27 15:59:42 2010 +0000 @@ -31,14 +31,39 @@ #include "drv/umtsstick/UMTSStick.h" -class UMTSStickNetIf : protected PPPNetIf +///UMTS Stick network interface +/** +This class provides connectivity to the stack using a 3G (or LTE etc...) stick +Plug it to your USB host using two Pull-down resistors on the D+/D- lines +*/ +class UMTSStickNetIf : public LwipNetIf, protected PPPNetIf { public: + ///Instantiates the Interface and register it against the stack UMTSStickNetIf(); virtual ~UMTSStickNetIf(); + ///Tries to connect to the stick + /** + This method tries to obtain a virtual serial port interface from the stick + It waits for a stick to be connected, switches it from CDFS to virtual serial port mode if needed, + and obtains a virtual serial port from it + @return : A negative error code on error or 0 on success + */ UMTSStickErr setup(); //UMTSStickErr is from /drv/umtsstick/UMTSStick.h + + ///Establishes a PPP connection + /** + This method opens an AT interface on the serial interface, initializes and configures the stick, + then opens a PPP connection and authenticates with the parameters + \param apn : APN of the interface, if NULL uses the SIM default value + \param userId : user with which to authenticate during the PPP connection, if NULL does not authenticate + \param password : associated password + @return : A negative error code on error or 0 on success + */ PPPErr connect(const char* apn = NULL, const char* userId = NULL, const char* password = NULL); //Connect using GPRS + + ///Disconnects the PPP connection PPPErr disconnect(); private: