We have quite a few battery powered devices that use the PYBD SF6W as a control board, and they're doing brilliantly - easy to use, and low-power consumption when asleep. I'm using the wifi on sensor devices to do occasional software updates. After a couple of the boards started having problems connecting to the wifi I've noticed some new printouts in the console logs. The same software works OK on other boards so my current gut instinct is towards a HW cause (that has occurred on two boards). These boards have previously worked without a problem so not a manufacture issue, but perhaps something that might have happened during use.
I have tried the same program using v1.13 and v1.16 of micropython firmware and the same console logs are produced. The board is powered from USB (from the desktop PC) and is rebooted to green LED before using rshell/repl to import main.
The main.py calls the function below:
Code: Select all
import pyb
import machine
def main():
print('Testing Network')
import network
sta_if = network.WLAN(network.STA_IF)
sta_if.config(trace=1)
print('deactivating network')
sta_if.active(False) # disable wifi if currently active - in case of issues from a previous run
sta_if.deinit()
pyb.delay(5000)
print('setting active')
sta_if.active(True)
pyb.delay(5000)
print('setting active')
sta_if.active(True)
pyb.delay(5000)
print('setting active')
sta_if.active(True)
pyb.delay(5000)
print('setting antenna')
sta_if.config(antenna=0) # select antenna, 0=chip, 1=external
pyb.delay(5000)
print('connecting')
sta_if.connect('ssid', 'password')
pyb.delay(5000)
print('checking if is connected')
while not sta_if.isconnected():
pyb.delay(5000)
# Check the status
print('getting status')
status = sta_if.status()
if status <= 0:
# Error States?
return False
print('checking if is connected')
Code: Select all
MicroPython v1.16 on 2021-06-18; PYBD-SF6W with STM32F767IIK
Type "help()" for more information.
>>>
>>> import main
Testing Network
deactivating network
setting active
[CYW43] HT not ready
setting active
[CYW43] HT not ready
setting active
[CYW43] HT not ready
setting antenna
[CYW43] HT not ready
connecting
[CYW43] HT not ready
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "main.py", line 70, in <module>
File "main.py", line 13, in boot
File "main.py", line 17, in start
File "main.py", line 50, in main
OSError: -5
>>>
I have also seen messages of "[CYW43] F2 not ready". Which looks to refer (maybe?) to one of the fifos in the datasheet.
Searching for these output messages in the micropython github repos doesn't give any hits so I haven't been able to dig deeper into the underlying C code to find clues as to what might be the problem. I also tried looking through the "Cypress WWD drivers for 4343W" repo (under a previous commit as they have since deleted the sources) but didn't spot these output strings.
https://github.com/cypress/wwd/tree/900 ... 59ec5c0b16
I can't see any obvious visible damage to the boards under a magnifying glass so I'm a bit stumped. I'd like to repair (firmware/hardware) so they can go back into the devices (especially as it's tricky to get new ones given the shortage of STM32 chips). So, any advice, tips, clues, or pointers would be very much appreciated.
Many thanks!