Community

Can not connect to Wifi

Current Device Info
Board Information - Model: F7Micro, Hardware version: F7v1, Device name: MeadowF7
Hardware Information - Processor type: STM32F777IIK6, ID: 31-00-2a-00-06-51-38-31-31-39-35-35, Serial number: 355F396C3138, Coprocessor type: ESP32
Firmware Versions - OS: 0.6.0.0 (Nov 4 2021 10:49:49) Mono: 0.6.0.0, Coprocessor: 0.6.0.0

I got a Meadow board on 10/7/19 and it’s been sitting on a shelf since then. I started trying to develop with it this week. I followed the getting started on the site, downloading the CLI, flashing the board and starting out with the hello world app. I then moved onto trying to get Wifi working.

The first problem I ran into was this error message “meadow ioctl Esp32Command failed OperationNotPermitted” which lead me to this forum post Ioctl Esp32Command failed OperationNotPermitted. After digging around I did confirm that the ESP had no firmware version listed, instead it said “Not Available”, but the OS and Mono were both at 0.6.0.0

I reflashed the board and this time the ESP is now showing a firmware version of 0.6.0.0. However, calls wiFiAdapter.Connect and wiFiAdapter.Scan never return. I tried logging some information from the properties on wifiAdapter, but one of these does not return and blocks execution (I have not tried to figure out which one).

  • MacAddress
  • IsConnected
  • Antenna

I would not expect accessing a property to have a side effect, such as blocking a running app.

I do attempt to start the adapter via a call to wiFiAdapter.StartWiFiInterface. This returns immediantly and then less then a second later the _WiFiInterfaceStarted event fires. I added a delay to make sure the event fires before attempting to connect or scan and those calls still never return.

A couple of other things I noticed

  • meadow device mac returns “Device MAC:” <— No value for mac
  • meadow file list: Causes the board to rest (my app restarts) and no files are ever listed
  • From within my app, Device?.Coprocessor?.Status returns NotReady.

Since I’m new to Meadow, if the CoProcess.Status is implemented, but I would have expected to get the MAC address.

So going thru the docs again, and the Clima sample app, I saw calls to either Device.InitCoprocssor or Device.InitWifiAdapter, neither of which I had. I did have a Device.Initialize() so I tried calling that, but no change.

I then downgraded the NuGet package from 0.28 to 0.27.1 which gave me Device.InitCoprocssor and Device.InitWifiAdapter. Looking at the disassembled source, Device.InitWifiAdapter just seems to call InitCoprocessor.

Now Device.GetDeviceInformation.Coprocessor?.Status returns ready (even without calls to Device.Init*), but still can’t connect to the wifi. Both Connect and Scan continue to never return.

The properties on WifiAdapter return values, although the MacAddress is the current date/time? Encoding.ASCII.GetString(_wiFiAdapter.MacAddress)

So I should have realized that downgrading the NuGet package to 0.27.0 wouldn’t work with firmware version 0.6.0. I’ll just go back to 0.28.0 and try some of the samples out.

This is a bit embarrassing, but I realized what my original problem was. I was trying to connect to my 5Ghz SSID instead of 2.4.