Send data from Android device to Lopy4 via Wifi (Sockets)



  • Recently I could send data from Android devices to Lopy using Bluetooth and then send this data to another Lopy via LoRa, now I'm tring to replace the Bluetooth with Wifi but as I was reading the documentation on this page https://docs.pycom.io/ I realized there's only info about how to configure Lopy as AP, however what I need is to send/receive data from Android Devices, can someone tell me how to do this? Or just give a page where I can learn about it.
    This is what I've done, I don't know what to do to send data or even receive it.

    import time
    from network import WLAN
    import pycom
    
    wlan = WLAN()
    
    wlan.init(mode=WLAN.AP,ssid='hermesh',auth=(WLAN.WPA2,'12345678'),channel=1,
    antenna=WLAN.INT_ANT,power_save=False,hidden=False)
    
    pycom.heartbeat(False)
    
    while True:
        time.sleep(2)
        if wlan.isconnected:
            pycom.rgbled(0xFF0000)```


Pycom on Twitter