-
Notifications
You must be signed in to change notification settings - Fork 154
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
Notification doesn't appear in Chrome but board connects automatically #69
Comments
Ok, so I used My arduino device is Adafruit Feather M0 Express |
if it works in tinyusb, then that's the extent of what adafruit can support with. we dont have any insight into chrome |
@reillyeon I think the issue is deeper than I thought. Some disparities from chrome://usb-internals -
@ladyada Was it intentional to keep USB Version as 32.1.0 ? |
Chrome will only query the device for a landing page if it reports USB 2.1 or greater as that is the version at which the Binary device Object Store descriptor was added to the specification. |
@reillyeon Yeah, but I am not able to understand why the changes in the |
@armsp it is best for custom For example
This flag will be passed to compiler and be used everywhere when a USB_VERSION is required. When uploading sketch, user just need to select the correct Therefore, in order to use Adafruit Feather M0 Express , I would encourage @ladyada and Adafruit team to add a new board definition for this board and reduce customer frustration editing the This issue has been reported here #32 |
does the arduino SAMD definition have it fixed? |
@jpliew I understand. So I thought I'd follow what you say. But the issue is that I can't seem to find any core folders for samd21 or any other architecture. I have installed Arduino Samd Boards from the board manager and Adafruit's boards too but where do they reside locally? Inside |
@armsp I don't have Adafruit board to test, but I managed to do a dry run and the steps are below.
If you are on Linux, Arduino IDE, File, Preference, check the bottom part, you should see something like If still can't find it, on Linux just do a Adafruit Feather M0 Express should have the following details
I suggest you duplicate these details and create a board call Adafruit Feather M0 Express WebUSB replacing
with
and product name to add WebUSB text there to differentiate the board. then add the
Once done, restart Arduino IDE, and you can see your new board showing on Tools, Boards. Ideally it is preferred to work with @ladyada to add this so that it will be consistent with their product support policy and reduce confusion. Once this is done, you will have a normal Adafruit Feather M0 Express and Adafruit Feather M0 Express WebUSB Hope this helps. Cheers |
@armsp depending on Adafruit's decision, they might prefer to use their current method
no matter which method, still, working together with Adafruit to achieve this is the best, that way Adafruit can provide greater support for customers like you. |
@jpliew thanks a lot for such a detailed explanation and steps. I tried with the following changes but it still does NOT give notification with Arduino Webusb on Chrome. I chose NOT to create a custom board. I edited the original Adafruit Feather M0 Express board itself.
|
sounds resolved! thaks everyone :) |
@ladyada not really. I really appreciate your time and effort and I understand that you'd want us to use Adafruit TinyUSB Library, but fundamentally it's just a SAMD21, so it should work with Arduino Webusb too, which it does....except the usb version issue that prevents chrome from generating a notification. |
@ladyada not resolved yet. Further checking, Adafruit's SAMD might not be using the original Arduino @armsp since Adafruit's board is working with TinyUSB, is there any specific reason you want this board to work with the original WebUSB library? If you still want to make this work, for learning purposes, you can try hack the Arduino SAMD boards, by downloading from Board Manager. Then try again with my method. |
for adafruit boards use tinyusb - it works really well :) |
if you find a solution let us know, a PR will be accepted for sure! |
@armsp the original Arduino SAMD
The USB version is hardcoded to 0x200, you can try change this
to
When uploading sketch, please REMEMBER to select Arduino SAMD M0 type of board, NOT Adafruit board. |
@jpliew I took a slightly different approach than yours - instead of messing around with Arduino's SAMD core I thought since I will choose Adafruit Feather M0 Express anyway from the Board Manager i decided to change the usb files inside adafruit's samd core. Thats located at
As I said I want to avoid that. Moreover choosing any Arduino Samd based from board manager before uploading isn't the right approach and it fails anyways except But I have had mixed successNow in my @reillyeon I wonder if there is a bug in arduino webusb cause no matter what happens, the WebUSB Landing Page: field in |
@armsp why is it not the right approach? When did you say you wanted to avoid that? What fail? upload fail? compile fail? Screenshot? If you suspect url problem, you can check using
Click I can ensure you that this current version of WebUSB is solid and I have many production devices running. |
@jpliew I didn't mean to offend.
I have been giving these information already using Screenshot of Screenshot of ERRORS when choosing wrong boardsArduino M0Arduino MKRZEROUploads but no notification. Arduino M0 Pro - Native portSame error as M0 Arduino M0 Pro -> Programming Port (as expected)
Arduino Zero -> Native port
Arduino Zero -> Programming port
|
When you are on the USB internals page for the device click the "Get WebUSB & Microsoft OS 2.0 Descriptors" button. That page as a JavaScript version of the same logic Chrome internally uses to try to read the descriptor and should give you better errors/diagnostic information. |
@reillyeon I get the following for arduino webusb -
For Adafruit TinyUSB webusb i get - I am afraid I don't really know what to make of this information. |
@armsp when you use Adafruit Feather M0 Express board with an edited the WebUSB Landing Page is empty. This means, Adafruit's USB must have something that is causing this. The reason why I asked you to try with Arduino boards is because we need to understand if there are any differences between Arduino and Adafruit's USB stack, from a quick look at their source files, I can see they are different. Instead of finding out the differences, one quickest way is to test with Arduino boards by changing Arduino's Once you have edited the This is just a simple comparison debugging technique, once you get one board working, it will be more easier and confident for you to tackle Adafruit's board files. |
@jpliew I agree. When I try just with Arduino MKRZERO WITHOUT any changes to
The Get WebUSB & Microsoft OS 2.0 Descriptors button shows this - And the rest of the details are as follows (still NO landing page) - |
@armsp there are two
and the other one in
Have you try editing both files? I don't have Feather M0 Express with me, once I get one I will test this out for you. |
@jpliew The experiments I have been running are with the following files -
I just wanted to collate all the experiments that I have done so far. Apparently things are not what they seem. When Adafruit Feather M0 is selected as Board, then I make changes to
When Arduino MKRZERO is selected as Board, then I make changes to
Takeaways
Changes to the |
I have a strange issue. Everything is working fine. The board connects, the data transfer happens, the demos work but I never get a notification from Chrome.
I have to manually goto the website and when I do I see my device automatically Connected.
What is even more mind boggling is that when I run WebUSB examples from
Adafruit_TinyUSB
Library then I do get the notifications.Any clue why it behaves this way?
I am testing it on Ubuntu 18.04.3 LTS with Chrome 76.0.3809.100
The text was updated successfully, but these errors were encountered: