maixpy and fm/board_info


I recently got my maix go kit and I’m trying to automatically connect to a WiFi AP on boot. I can connect with the sample code in the network module but when I try to put that in my it fails because fm and board_info objects aren’t available. What do I need to import to access these?

It also seems that globals in might not really be globals. I worked around the above by added a function to “def init_network(fm, board_info)” which includes a “global uart,net” line. I connect when I “import boot; boot.init_network(fm, board_info)” but then the net object seems to go out of scope and shuts down the wifi connection.


I think you can write these code in your or
from board import board_info
from fpioa_manager import *
import network
from machine import UART
uart = UART(UART.UART2,115200,timeout=1000, read_buf_len=4096)


board_info import didn’t work but with fm available I was able to use the pin numbers instead of enums.