API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2

This interface enables the Gateway role of the DuN Profile as defined by the Bluetooth SIG.
To make use of DunGW, application must create an object of type IBTDunGW and enable the service. Once enabled, the DuNGW allows remote device to access public network.

Usage example:

===== To register to be notified of change in state

// first create the signals; // for example, use ISignalCBFactory_CreateSignal() // then register the signals: IBTDunGW_OnStateChange (piBTDunGW, piSigState);

===== To retrieve current state

AEEBTDUNGWState state; BDAddress bdAddr;
IBTDuNGW_GetState(piBTDunGW, &state, &bdAddr );

===== To configure the gateway to automatically accept connections

IBTDuNGW_SetAutoAccept( piBTDunGW, TRUE);

===== To Enable the service

IBTDuNGW_Enable( piBTDunGW, AEEBT_SEC_SM4_HIGH, "Dial-up Networking"); // name of service in SDP record

===== To Disable the service

IBTDuNGW_Disable( piBTDunGW );

===== To tear down an existing connection

IBTDuNGW_Disconnect( piBTDunGW );

===== To accept incomming connection

IBTDuNGW_AcceptConnection(piBTDunGW, TRUE);

===== To reject incomming connection

IBTDuNGW_AcceptConnection(piBTDunGW, FALSE);

===== To monitor statistics

See implementation documentation ( .bid file )

===== When done with DunGW, release the object