Resources | Resources |



USB Gateway

Connect is built around the USB Gateway, a service that allows users to obtain remote handles for instances of Brew MP objects on the device, that are callable from the PC. The handles are exposed as Brew MP interfaces, making the mechanism for interacting with objects on the device nearly identical to the way you interact with them on the PC.

In the Brew MP environment, objects are created using the IEnv_CreateInstance() or IShell_CreateInstance() API calls. If successful, these APIs return a pointer to an interface that can be used.

With the USB Gateway, a connection is established with a remote device either using Connect's Connect_ConnectToTarget() API or the lower-level OS Services IDeviceBridge_Open() API. With either mechanism, you then have an IRemoteOpener interface, and using its IRemoteOpener_Open() API in place of IEnv_CreateInstance() or IShell_CreateInstance(), interfaces can be created on the PC that act on objects on the target.

USB Gateway support for targets (device and Simulator)

All Brew MP devices support the USB Gateway, however many devices must have the Gateway enabled before use. Brew MP Simulators 1.0.2 and later also support Gateway connections.

Tool support

The USB Gateway is directly used by the Connect Tool (CT) and partially by the Brew MP Loader and Logger (which use a Gateway/BTIL hybrid).

Developer Mode enablement

The USB Gateway itself does not require test enablement, however the number of classes that can be created without test enabling the device is small, making it unsuitable for use as a tools interface without test enabling it. Developer Mode Enablement can be done through Loader (when connecting to a non-legacy/Gateway device) or with "ct sigenable" or "ct desenable" commands.

OS Services on the PC

A Gateway connects two OS Services instances. A tool on the PC side must host an instance of OS Services to use the Gateway. This coexists with a typical Windows framework. Using the Connect libraries will automatically include and initialize a OS Services Framework on the PC. This framework provides the bare minimum environment necessary to interact with OS Services.