Bricked a 3.0 unit?
nick9995 last edited by
I think I have bricked a 3.0 WiPy module. It just hangs when trying to upload files and does not finish a reset when pushing the reset button. The firmware update tool will not connect to the device and I cannot get Atom to connect to it either, usually claiming the port is not open. I've tried this on two different computers so far.
Any thoughts on how to recover it?
I've been developing my application using a file I named xServer.py but recently moved the code of xServer.py into main.py as I wanted to use the default UART0 for communication between a visual studio application and the module over the USB cable. The problems started after I uploaded the main.py file.
Here is the code I uploaded:
from network import Bluetooth from machine import UART BluetoothInstance = Bluetooth() #create a bluetooth instance BluetoothInstance.set_advertisement(name='SurfaceProBluetooth', service_uuid=b'1234567890123456') #set advertisement stuff BluetoothInstance.advertise(True) #turn on advertisements so device can be found uart = UART(0, baudrate=9600, bits=8, parity=None, stop=1) #init UART0 (default) #BluetoothInstance.callback(trigger=Bluetooth.CLIENT_CONNECTED | Bluetooth.CLIENT_DISCONNECTED, handler=conn_cb) Service1 = BluetoothInstance.service(uuid=1, isprimary=True) #create a service of BluetoothInstance Characteristic1 = Service1.characteristic(uuid=1, value=0x1234) #create a characteristic of service1 Characteristic1Data = 0 #must define Characteristic1Data here, initialise it with null def Characteristic1_CallBack_Handler(chr): #define call back handler of Characteristic1 for read/write event global Characteristic1Data #data variable which needs to be declared global inside handler deffinition events = chr.events() #figure out if handler was triggered from read OR write event?? not sure if events & Bluetooth.CHAR_WRITE_EVENT: #if write event print('Write Event') Characteristic1Data = chr.value() #write the value sent to the data variable #uart.write(Characteristic1Data) #write data out of UART port else: #else read event print('Read Event') return Characteristic1Data Characteristic1_CallBack = Characteristic1.callback(trigger=Bluetooth.CHAR_WRITE_EVENT | Bluetooth.CHAR_READ_EVENT, handler=Characteristic1_CallBack_Handler)
nick9995 last edited by nick9995
Thanks everyone, safe boot procedure by holding pin 12 high during reset completely solved my problem!
@nick9995 You can also try the new beta firmware updater https://forum.pycom.io/topic/3163/new-beta-firmware-updater-1-13-1-b5 and choose the "Erase flash file system" option in the Communication screen. This should remove all uploaded scripts from your module. Make sure you follow the instructions.
If the firmware updater cannot connect please provide more details about your Operating System.
jmarcelino last edited by
Please try the safe boot procedure:
robert-hh last edited by
@nick9995 How do you connect the WiPy3 to your computer? Are you using an expansion board or another USB/UART bridge. If the computer claims, that the port is not open, then the problem is in between computer and WiPy. Usual sources are the cable, the expansion board/USB-UART bridge or the USB driver on the computer.