Closed buley closed 1 month ago
the attachment of the event handler via the on attribute in the HTML should work, but I'm able to workaround this by doing a simple connectButton.addEventHandler
☠️ ∴ git diff
-let logdiv = document.getElementById("logpre");
+let logdiv = document.getElementById("logpre"),
+ connectButton = document.getElementById("connect");
...
+if (connectButton) {
+
+ connectButton.addEventListener('click', go);
+}
+
Interesting, what browser are you using here?
Chrome version 126.0.6478.183 (Official Build) (arm64) and I was able to replicate in Arc browser.
After this issue, my issue getting going seems related to the WebUSB API and not on the implementation.
I can't get any USB devices to yet show up in the selection panel, even though I see them using lsusb
and can see them show in the Device log at chrome://device-log
If I clear the filters argument to the requestPort() method I can see one device, a Bluetooth connection to my iPhone, but nothing else yet. Currently working through it on my side, trying first with updating Chrome.
Curious, I've also tested on Chromium 126 aarch64 (but will also test Chrome proper soon)
Have you installed the udev rules documented here? https://github.com/DavidBuchanan314/rabbit_r1_boot_notes/tree/main/scripts/webusb#linux-prerequisites
By the way, your device needs to have a cdc_acm driver. It should be present on ~all desktop systems and ~most(?) android devices, but I don't know about things like chromebooks.
I'm on Mac Sonoma 14.5. Installed lsusb through homebrew but don't have access to udevadm on this environment unfortunately. Interesting because I see the device! This seemingly has nothing to do with your great work. I'll keep trying.
☠️ ∴ lsusb | grep r1
Bus 000 Device 001: ID 0e8d:20ff MediaTek Inc. r1 Serial: XXXX
For anyone curious, I'm looking into the SerialAllowAllPortsForUrls
preference and policy: https://chromeenterprise.google/policies/?policy=SerialAllowAllPortsForUrls
I upgraded my (x86) mac mini to Sonoma 14.5, using Chrome latest official, and everything worked as-is.
Fwiw I do my regular testing on an apple silicon macbook running Asahi, but I haven't tried the full aarch64/sonoma/chrome combo together yet. I think there's something weird going on with your setup!
When connecting to WebUSB on the bootkit site, running remotely or locally, I see this error being thrown:
The log in console comes out as something like:
There are further errors as this repeats itself a few times.
The call is in the main go() routine https://github.com/DavidBuchanan314/rabbit_r1_boot_notes/blob/main/scripts/webusb/main.js#L70