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

How to make work with other ATmega32u4 devices? #13

Closed
tdicola opened this issue Apr 28, 2016 · 2 comments
Closed

How to make work with other ATmega32u4 devices? #13

tdicola opened this issue Apr 28, 2016 · 2 comments

Comments

@tdicola
Copy link

tdicola commented Apr 28, 2016

Hello, sorry that this is more of a support request and not an issue but I'm having a lot of trouble figuring out how to make the demos work with an ATmega32u4-based Arduino-compatible board. Everything works great with an official Arduino Leonardo, but I'm trying to use a board with the same CPU (Circuit Playground, https://www.adafruit.com/product/3000) and it's not showing up in the list of USB devices when you click the connect button in the console demo. Chrome (canary build from today) does pop up a notification that a web USB device was connected and recommends the URL to visit, but going to the page and clicking connect shows no device unfortunately.

My suspicion is that somewhere the VID & PID of the Arduino Leonardo are hard coded in--does that sound right? This Circuit Playground board has a different VID & PID (VID = 0x239a, PID = 0x8011) so it would make sense that something expecting to find a Leonardo wouldn't catch it. However I don't see any obvious place where there's a dependency on the VID & PID in either the sketch or demo web page code.

One thing I am curious about, what exactly is encoded in this information in the console index.html origin-trial headers? https://github.com/webusb/arduino/blob/gh-pages/demos/console/index.html#L4-L7 Is there a VID & PID embedded in that presumably base64 encoded data? Also is the format of this blob documented somewhere in the draft web USB spec? I searched around it but just came away even more confused--there doesn't seem to be any mention of the origin-trial header and this data (but I'm not really familiar with W3C specs like this so it could just be me missing something obvious).

In general though do the demos right now have a hard dependency on the Arduino Leonardo's VID & PID? And if so can you point out what to change to make the demos work with a board that has a different VID & PID (but the same ATmega32u4 processor)? Thanks!

@reillyeon
Copy link
Collaborator

If you are using different hardware you should add the IDs to list at serial.js:13.

The <meta http-equiv="origin-trial"> tag is for Chrome's Origin Trials framework under which WebUSB will eventually launch as an experimental API. It is not part of the WebUSB spec.

@tdicola
Copy link
Author

tdicola commented Apr 28, 2016

Oh ack somehow missed that when searching. Perfect, thanks!

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

2 participants