I have worked with Kivy(Android). I connect to the WiFi module(ESP8266) through the socket:
host = \'192.168.4.1\' port = 8888 s = socket.socket(socket.AF_INE