Archived:How to close an active GPRS Connection
The small code snippet below shows how to stop an active GPRS connection manually. This is a very useful code snippet when we are developing applications related to networking in PyS60. The access point (access_point) object of the socket module mainly serves three purposes:
- We can know the phones IP address.
- We can start a GPRS connection and select a default Access point.
- We can stop or disconnect manually an active GPRS connection. The Code for this function is given below:
import socket #imports the Module
apid = socket.select_access_point()
ap = socket.access_point(apid)
ap.start() # start an GPRS connection
ap.stop() # stops an GPRS connection