Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install stalls at install of micropython on P8. #496

Open
drjswalker opened this issue May 1, 2024 · 17 comments
Open

Install stalls at install of micropython on P8. #496

drjswalker opened this issue May 1, 2024 · 17 comments

Comments

@drjswalker
Copy link

Hi,
I am installing wasp-os on a Colmi P8 and the install went very well until it came time to use DaFlasher to install micropython.zip. I had finished installing the bootloader-daflasher.zip file and had the Wasp, start with arrow and bluetooth symbol in white in tthe bottom right hand corner. I paused while I checked what came next and then started to install micropython.zip using daFlasher. It indicated the file had been selected and the file size (3000835Kb) and then "started DFU" then "Connected" followed by the mac address of the watch. The "Starting Flashing" followed by Mac address followed by a please wait message syaing it takes up to 5 minutes. Nothing comes up on the progress bar, there is a zero data transfer rate number and nothing happens. I t sometimes disconnects and then reconnects going through the same cycle. The watch bluetooth symbol turns blue but nothing more happens. Any ideas?

@tolidano
Copy link

tolidano commented Jul 7, 2024

I am also experiencing this. Which micro python.zip are you using? The one from the 0.4.1 release? I am about to try it with one manually built from latest master. There is another similar issue which may also have a working method, but I am on a Mac right now, and need to get my Linux machine running to use the ota-dfu tools: #222

@fgaz
Copy link
Member

fgaz commented Jul 7, 2024

Try the solution described in #475

@fgaz
Copy link
Member

fgaz commented Jul 7, 2024

alternatively wasptool should also work https://wasp-os.readthedocs.io/en/latest/install.html#wasptool-for-gnu-linux

@tolidano
Copy link

tolidano commented Jul 7, 2024

#475 (comment)

@tolidano
Copy link

tolidano commented Jul 7, 2024

I attempted to run wasp tool:

user@ea4532cb73da:~/wasp-os/tools/ota-dfu$ ./dfu.py -z ../../build-p8/micropython.zip -a F2:55:95:F3:01:28 --legacy
Exception at line 145: The command was not found or was not executable: gatttool.

I am in the container provided by ./tools/docker/shell - I am on an M2 Mac, and it says this tool is missing. Should I run this outside the container? Where do I get gatttool? Is this only going to work on Linux?

@tolidano
Copy link

tolidano commented Jul 7, 2024

trying wasptool on my linux machine (xubuntu on one notebook mix 4) and I get this:

root@1mix4:/home/tolidano/Dev/wasp-os/tools/ota-dfu# ./dfu.py -z ../../build-p8/micropython.zip -a F2:55:96:F3:01:28 --legacy
Sending file firmware.bin to F2:55:96:F3:01:28
Binary imge size: 311964
Binary CRC32: 1869247472
Connecting to F2:55:96:F3:01:28
Waiting for Image Size notification
Waiting for INIT DFU notification
Exception at line 166: a bytes-like object is required, not 'str'
root@1mix4:/home/tolidano/Dev/wasp-os/tools/ota-dfu# ./dfu.py -z ../../build-p8/micropython.zip -a F2:55:96:F3:01:28 --legacy
Sending file firmware.bin to F2:55:96:F3:01:28
Binary imge size: 311964
Binary CRC32: 1869247472
Connecting to F2:55:96:F3:01:28
Waiting for Image Size notification
Exception at line 166: Error in START_DFU procedure, reason: INVALID_STATE
root@1mix4:/home/tolidano/Dev/wasp-os/tools/ota-dfu# 

which is this: #222

@GaryM0101
Copy link
Contributor

GaryM0101 commented Jul 7, 2024 via email

@tolidano
Copy link

tolidano commented Jul 7, 2024

So I made the change...

root@1mix4:/home/tolidano/Dev/wasp-os/tools/ota-dfu# vim nrf_ble_dfu_controller.py
root@1mix4:/home/tolidano/Dev/wasp-os/tools/ota-dfu# ./dfu.py -z ../../build-p8/micropython.zip -a F2:55:96:F3:01:28 --legacy
Sending file firmware.bin to F2:55:96:F3:01:28
Binary imge size: 311964
Binary CRC32: 1869247472
Connecting to F2:55:96:F3:01:28
Waiting for Image Size notification
Waiting for INIT DFU notification
Exception at line 166: No notification received

And now no notification received.

@tolidano
Copy link

tolidano commented Jul 7, 2024

So it appears to be a timing bug based on the thread there and there was a fix at some point...

@tolidano
Copy link

tolidano commented Jul 7, 2024

wasp-os/ota-dfu-python#3 this needs to be merged. or you can pull it by hand

@tolidano
Copy link

tolidano commented Jul 7, 2024

so I added the origin git remote add fix https://github.com/thiswillbeyourgithub/ota-dfu-python
then I git pull bugfixes
then I removed the space before else on line 210
then ran the same command again and it is sending...slowly.

@GaryM0101
Copy link
Contributor

GaryM0101 commented Jul 7, 2024 via email

@tolidano
Copy link

tolidano commented Jul 7, 2024

So now it worked

root@1mix4:/home/tolidano/Dev/wasp-os/tools/ota-dfu# ./dfu.py -z ../../build-p8/micropython.zip -a F2:55:96:F3:01:28 --legacy
Sending file firmware.bin to F2:55:96:F3:01:28
Binary imge size: 311964
Binary CRC32: 1869247472
Connecting to F2:55:96:F3:01:28
Waiting for Image Size notification
Waiting for INIT DFU notification
Begin DFU
[##################################################] 100.0%  (304 of 304 kb)

Upload complete in 7 minutes and 7 seconds
Waiting for DFU complete notification
Waiting for Firmware Validation notification
Activate and reset

But it still just shows the waspos and the start button and the little bluetooth, no interface with the clock

@tolidano
Copy link

tolidano commented Jul 7, 2024

When I hit the button to "start" it shows JUST the wasp, then the screen goes black, then it flashes back to the wasp with the start and the bluetooth icon.

Now I am trying the 0.4.1 release build-p8/micropython.zip instead. It is transferring.

@GaryM0101
Copy link
Contributor

GaryM0101 commented Jul 7, 2024 via email

@tolidano
Copy link

tolidano commented Jul 7, 2024

Cannot get to safe mode by holding down the physical button.

Also thank you for your help so far. I feel we are close!

@tolidano
Copy link

tolidano commented Jul 8, 2024

Got this working by #222 and #343

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants