Getting Static IP From Arduino - Using MicroPython WLAN



  • Perhaps the title is a little off. I desire to set a static IP address from Arduino, but for whatever reason I'm not getting the option in the advanced config to even leverage a static IP address. The other option I think exists is using the MicroPython WLAN library to somehow reserve an IP address for a given MAC address. I haven't seen any tutorials specifically for the reserving of an IP address, but I assume it must be feasible.

    This is the very basic code I'm using for the WLAN stuff:

    from network import WLAN
    
    wlan = WLAN()
    wlan.init(mode=WLAN.AP, ssid='I-AM-GROOT', auth=(WLAN.WPA2,'L3akyP@$$w0rd'), channel=6, antenna=WLAN.INT_ANT)
    

    Don't worry about public posting of credentials, they're not what I'm using anyway.

    In case it matters I'm using Android 10 on a Pixel 4XL.



  • @oligauc Oddly, I'm not getting the option on Android to assign a static IP address. Is there something about this connection's configuration that leads Android to believe that it cannot assign itself a static IP address? I've seen that option before on other networks, but I'm not sure how that option comes and goes.



  • @Sn3akyP3t3 At the moment it is not possible to reserve a static IP address for another device. You can however connect to an AP using a static address.


Log in to reply
 

Pycom on Twitter