NetServices Stack source

Dependents:   HelloWorld ServoInterfaceBoardExample1 4180_Lab4

Embed: (wiki syntax)

« Back to documentation index

UMTSStickNetIf Class Reference

UMTSStickNetIf Class Reference

UMTS Stick network interface. More...

#include <UMTSStickNetIf.h>

Inherits LwipNetIf, and PPPNetIf.

Public Member Functions

 UMTSStickNetIf ()
 Instantiates the Interface and register it against the stack.
UMTSStickErr setup ()
 Tries to connect to the stick.
PPPErr connect (const char *apn=NULL, const char *userId=NULL, const char *password=NULL)
 Establishes a PPP connection.
PPPErr disconnect ()
 Disconnects the PPP connection.
IpAddr getIp () const
 Returns the IP of the interface once it's connected.

Protected Member Functions

IpAddr getIp () const
 Returns the IP of the interface once it's connected.

Detailed Description

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

Definition at line 43 of file UMTSStickNetIf.h.


Constructor & Destructor Documentation

Instantiates the Interface and register it against the stack.

Definition at line 32 of file UMTSStickNetIf.cpp.


Member Function Documentation

PPPErr connect ( const char *  apn = NULL,
const char *  userId = NULL,
const char *  password = NULL 
)

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

Parameters:
apn: APN of the interface, if NULL uses the SIM default value
userId: user with which to authenticate during the PPP connection, if NULL does not authenticate
password: associated password
Returns:
: A negative error code on error or 0 on success

Definition at line 49 of file UMTSStickNetIf.cpp.

PPPErr disconnect (  )

Disconnects the PPP connection.

Definition at line 80 of file UMTSStickNetIf.cpp.

IpAddr getIp (  ) const [inherited]

Returns the IP of the interface once it's connected.

Definition at line 40 of file netif.cpp.

IpAddr getIp (  ) const [inherited]

Returns the IP of the interface once it's connected.

Definition at line 40 of file netif.cpp.

UMTSStickErr setup (  )

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

Returns:
: A negative error code on error or 0 on success

Definition at line 44 of file UMTSStickNetIf.cpp.