Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

Opening a bearer connection before | Telit Cinterion IoT Developer Community

December 16, 2016 - 12:59pm, 3802 views


To communicate via TCP/UDP sockets, it is needed to open a connection in Java. method opens a TCP/UDP connection for this purpose. Module can be a server or a client.

There are optional parameters related to connection. These are bearer_type, access_point, username, password etc. With method all these parameters can be used. In this situation, 2 operations will be done at one action.

1. Connect internet via apn (define and activate a pdp context)

2. Open a socket using previosly created connection.

Is it possible to make first operation alone using Java API?

In at interface, at+cgdcont defines a pdp context and at+cgact command activates a pdp context. After these 2 commands, module connects to internet. But any socket opened at that moment.

There is a class in named BearerControl. It has a method hangUp which can provide closing of a bearer connection but I couldn't see any method that opens a bearer connection.

Is it supported in Java API?

Best Regards,