Opening a bearer connection before Connector.open() | Thales IoT Developer Community
December 16, 2016 - 12:59pm, 3176 views
To communicate via TCP/UDP sockets, it is needed to open a connection in Java.
Connector.open() 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 Connector.open 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 com.cinterion.io 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?