-
Notifications
You must be signed in to change notification settings - Fork 23
pybricksdev/_vendored/pynxt: Replace raw usb with serial. #129
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
base: master
Are you sure you want to change the base?
Conversation
This way we don't need to do things like detaching the kernel driver. This should improve our odds of being able to install NXT firmware from the browser.
|
Did you check that this works on Windows and Mac too? |
|
This was only tested on Ubuntu. Hoping for some feedback before we merge. Maybe @BertLindeman wants to try Windows? 😄 We don't even need to merge it into Pybricksdev per se. This is more of a stepping stone to make things simpler for the Pybricks Code implementation down the line. |
sure but not manual 😉 Thinking of how to do this.... |
Maybe something like this? |
|
Thanks David, but on uvx here. Downloaded the nxtflash branch zip. Verified that in the current pybricksdev/_vendored/pynxt/samba.py the updates are there.. [EDIT] pyusb is installed. Could that be due to the |
I highly recommend it. It is like
If you are running from a directory that has |
|
I am not so good in this plain python is better for me. Shows: hwid zero while it is 6 on a flash on linux. |
|
For this pull request, try it with a zip for NXT 😄 |
|
Wow, I am sharp today (Flu) Now: The hub keeps clicking though. |
|
Thanks for confirming Bert! (And hope you feel better soon. I'm down with the flu too.) Yeah, the clicking sound tends to happen the first time after flashing sometimes. See pybricks/support#2430 As far as this pull request goes, that's fine. If it came up the second time that means flashing was successful. What we changed here is something that should make it easier to support NXT installation from the browser, even though we're testing it with Python first. |
|
David, installed uv, interesting for one time tests. Thanks |
|
This is getting a few steps ahead, but I'm curious about the following @BertLindeman: Open the web developer tools (with await navigator.serial.requestPort({
filters: [
{ usbVendorId: 0x03eb, usbProductId: 0x6124 }
]
});If an NXT in update mode is connected, you should get something like this:
Then on the output you'll see a small structure containing Connecting won't do anything, of course, but it's a good next step. It's probably too early to declare victory, but at this rate firmware installation on NXT is going to be easier than on SPIKE 😄 |
|
Friday afternoon is library time.. But this takes only a second 😄 The pybricks connect pop-up comes up Irrelevant data``` 129:1 Autofocus processing was blocked because a document already has a focused element. 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000110b-0000-1000-8000-00805f9b34fb, name='Buds FE van B S Ap' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000110c-0000-1000-8000-00805f9b34fb, name='Buds FE van B S Ap' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000110e-0000-1000-8000-00805f9b34fb, name='Buds FE van B S Ap' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000111e-0000-1000-8000-00805f9b34fb, name='Buds FE van B S Ap' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001200-0000-1000-8000-00805f9b34fb, name='Buds FE van B S Ap' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001105-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000110a-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000110c-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000110e-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001112-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001115-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001116-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000111f-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000112d-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000112f-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001132-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001800-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001801-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001855-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000fcf1-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000fef3-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001801-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001800-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000111f-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001132-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001116-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001115-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000112d-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000fcf1-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000110a-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000110e-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000112f-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000110c-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001855-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001105-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001112-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000fef3-0000-1000-8000-00805f9b34fb, name='A55 van Bert' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000110e-0000-1000-8000-00805f9b34fb, name='Buds FE van B S Ap' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000111e-0000-1000-8000-00805f9b34fb, name='Buds FE van B S Ap' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000110c-0000-1000-8000-00805f9b34fb, name='Buds FE van B S Ap' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001200-0000-1000-8000-00805f9b34fb, name='Buds FE van B S Ap' 129:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=0000110b-0000-1000-8000-00805f9b34fb, name='Buds FE van B S Ap' ```Something is blocking? No pybricks panels active. No idea here. [EDIT] @laurensvalk Console shows (after select of the hub): |
|
Awesome, thanks!
So Windows is even picking up the right driver out of the box. Would you believe it! |
I would believe it if I also was which driver was currently in use on Windows. Is it the LEGO driver or some other driver? For example, if you install Arduino tools, it will match the bootloader on NXT instead of the LEGO driver. |
|
We should test that also. If it's still available as a serial port but under a different name, that should be fine too. It should be incredibly rare that another device with |


This way we don't need to do things like detaching the kernel driver.
This should improve our odds of being able to install NXT firmware from the browser.