I’m new to OpenMV and am unable to run the example wifishield code. After initializing the wifishield, the wifishield gets stuck in the scan or wificonnect functions. I have tried to update the board and run in on a second wifishield to no success. Any suggestions for solving this?
MicroPython: v1.15-r63 OpenMV: v4.1.2 HAL: v1.9.0 BOARD: OPENMV4-STM32H743
Type “help()” for more information.
Firmware version: (19, 6, 1, 19, 3, 0, 1377184)
Trying to connect… (may take a while)…
How do you connect the shield ? Can attach a pic of the board + shield and show us how it’s connected ?
1 Like
Thank you for getting back to me so quickly. Below are the images with the wifishield for my two openmv modules. I thought since it was reading the firmware, the wifimodule pins would be attached.
Hi, board 1 is not connected at all, you need to solder headers to the camera.
What do you mean by this? Perhaps from the angle you cannot see, butt board 1 is soldered on the other end. I have already soldered the headers the cameras on all boards.
For board 2 do you have any suggestions for resolving this error?
Yes it looked like it was not soldered now I see you’ve soldered the shield to the camera directly. The module’s firmware is up to date, but do you have the latest camera firmware ? I just tested the scan example and it seems to be working fine, what happens when you run this:
import time, network
wlan = network.WINC()
print("\nFirmware version:", wlan.fw_version())
while (True):
scan_result = wlan.scan()
for ap in scan_result:
print("Channel:%d RSSI:%d Auth:%d BSSID:%s SSID:%s"%(ap))
print()
time.sleep_ms(1000)
Please post screenshots of the output.
Thanks for checking that. I ran the code for 10minutes and it seems both boards board are getting stuck in the wlan.scan() function. The odd thing is that the same output occurs on the 2nd board too with the same input. I’ve screenshot the IDE to so you can view the firmware, not sure if it is a firmware issue since I updated both boards to the latest using the IDE.
Input
import time, network
wlan = network.WINC()
print("\nFirmware version:", wlan.fw_version())
while (True):
print("scanning")
scan_result = wlan.scan()
for ap in scan_result:
print("Channel:%d RSSI:%d Auth:%d BSSID:%s SSID:%s"%(ap))
print()
time.sleep_ms(1000)
Output
Firmware version: (19, 6, 1, 19, 3, 0, 1377184)
scanning
Maybe it’s not detecting any networks ? Can you try the ntp.py example ? or http client ? Is your access point 5GHz ? That module only works with 2.4GHz. Something else to check, make sure you don’t have a config file on the flash that enables WiFi debugging (you can just erase the flash filesystem). Did they shields use to work before ?
Thanks for getting back to me. I also thinking it is unable to detect any networks. I’ve erased the onboard flash via the IDE. The access point is 2.4GHz yet I’m still unable to connect to a network with ntp.py or http_client.py scripts. After initializing both boards, get stuck in the wlan.connect and wlan.scan functions! The wifishields never worked for me but the cameras are still functional. Do you think it might be hardware problem or something wrong with the IDE when it runs the script? Im thinking of reinstalling openmv to see if it works?
Update: Reinstalled the IDE, can run the Hello.py script but same error with the wifishield
I’m not sure, it’s reading the wifi firmware version so it’s likely still working. Could you try reflashing the WiFi module firmware ? Just follow the fw_update.py script and see if that fixes the problem.
Weird again. On both boards I have reset both the camera and wifi firmware and updated them, but still running into the same problem of getting stuck in the scan and connect functions. Would there be any way to see where in the function the program is stalling at?
Thank you for helping me with this.
Yes there’s, I’m attaching a special firmware with debugging enable, run the scan example and compare the output to the attached output.
winc_debug.zip (1.1 MB)
d
Thanks.I booted using the firmware and compared the outputs. The outputs are mostly the same except, your attached output includes more statements of:
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
I’ve attached my output file below
>>> (APP)(INFO)Chip ID 1503a0
(APP)(DBG)[nm_spi_init][1243][nmi spi]: chipid (001003a0)
(APP)(INFO)DriverVerInfo: 0x13301361
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]13301361 13301361 102
(APP)(DBG)[wait_for_firmware_start][493]2532636 2532636 102
(APP)(INFO)Firmware ver : 19.6.1 Svnrev 16761
(APP)(INFO)Firmware Build May 23 2018 Time 14:39:16
(APP)(INFO)Firmware Min driver ver : 19.3.0
(APP)(INFO)Driver ver: 19.6.1
(APP)(INFO)Driver built at Dec 10 2021 22:16:37
(APP)(DBG)[nmi_get_otp_mac_address][633]OTP MAC
Firmware version: (19, 6, 1, 19, 3, 0, 1377184)
It seems more or less the same, and if I remember correctly getting that output requires that all the I/O pins to be working, I could be wrong and maybe one of the pins is not used until after that point (for example the IRQ pin). You should double check your soldering make sure the interrupt pins is making contact. If you have a multimeter use it in continuity test mode to check all the pins to make sure they’re making contact (between the cam and shield).
@iabdalkader I got my multimeter and have done continuity test on the pins. All the connections are operational. Do you think rolling back the board and wifishield firmware would work? If so do you know where I can find the code for both?
MicroPython: v1.17-omv-r1 OpenMV: v4.1.3 HAL: v1.9.0 BOARD: OPENMV4-STM32H743
Type "help()" for more information.
>>>
Firmware version: (19, 6, 1, 19, 3, 0, 1377184)
@iabdalkader It suddenly started working!