The following non standard constant is supported:
|
SO_CONTEXTID |
It is the socket option flag used to link a socket object to a context identifier after PDP Context Activation procedure.
|
|
Note: PDP Context Activation procedure can be obtained using AT+CGDCONT and AT#SGACT commands on MDM or MDM2 interface. |
All socket objects must be linked to a context identifier.
In the following example
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_CONTEXTID, 1)
a socket object is created and then linked to context identifier number one.
|
|
Note: There is a firewall always active on module. Without firewall proper configuration socket methods might not work as expected. Firewall can be configured using AT#FRWL command on MDM or MDM2 interface. |
Sockets used by standard functions (e.g. gethostbyname) are silently linked to context identifier number one.