-
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
Arduino Leonardo Access denied #44
Comments
Did you change USB_VER from 0x200 => 0x0210 ? |
Thanks for your answer, I though that information for arduino is already stored in hardware/webusb/avr/boards.txt So I tried to change USB_VER from 0x200 => 0x210, still with same results. But I also found error/warning message in Arduino while uploading sample sketch using Arduino Leonardo webusb board.
Do you think this might be the problem? How can I manage it? |
I ordered a Leonardo board, should arrive on Monday. Ill let you know my findings by the middle of next week. |
@vinckobb == For me, the code still didn't do what I expected it to do. After programming the Leonardo board following the directions (to the best of my knowledge :-) )
chrome://device-log/ showed this: Looking at the captured data using Wireshark (indicating USB 0x0210)
void setup() { Im not the expert here, but it seems there is an issue with WebUSB and pluggableUSB == |
@vinckobb you can ignore the error
WebUSB is still using the original Caterina bootloader. |
I've tried same procedure on another clean computer. Installed Arduino and then added webusb library with sketches. Unfortunately still same results. @basevers did you also updated USBCore.h file for usb 2.1? I noticed one thing. When I plugged arduino, chrome didn't find any device. I had to enable "Enable new USB backend" in chrome://flags After that it was recognized and I finally saw it through chrome://device-log as This doesn't help and I still get "Access denied" error when I try to connect to it. |
I learned that the "prefered" method for updating the USB_VERSION is through the board.txt file. arduino/hardware/webusb/avr/boards.txt Line 57 in d845253
You can verify with WireShark if the USB_VERSION number is the proper one. @vinckobb I'm curious what you found out. Thanks a lot. |
Make sure you're using the latest version of the library. I recently merged #28 which adds an additional descriptor which sets a registry key giving the WebUSB function a DeviceInterfaceGUID which is necessary for Chrome to find the interface through the Windows API. As mentioned in README.md the notification is disabled currently on Windows due to instabilities in some Windows USB host drivers. Enabling Chrome's new USB backend on Windows will improve enumeration reliability but support for opening and making requests to devices is still incomplete so I don't recommend it at this time. |
Thank you for the update, however for me it did not fix the issue I'm facing. @reillyeon In my code, I activate the LED before the while loop and deactivate the LED when it exits the while loop, but in my case, the LED is always on (meaning its still inside the while loop). Thanks, Bas |
@basevers how about I retrieve my full flash in HEX and email to you so that you can use ISP programmer to flash into your Leonardo. If still not working, we can start look at the USB driver that was installed. |
That would be awesome.... Thanks so much. |
@reillyeon I've tried using newest version of WebUSB library but it's still same as before. Unless I enable "Enable new USB backend" chrome doesn't even show device. Otherwise I only get "Access denied" error. @basevers Here is result from Wireshark. Looks like board.txt file works for me.
@basevers I'll try to find if I get over setup() this weekend |
@basevers I put the file on gist easier that way other can also get the file directly, this image is the full flash image from Arduino Leonardo with WebUSB RGB Demo included. |
Cool, I'll try it this weekend. |
Finally I got a programmer, allowing me to program the image provided by @jpliew
So far so good. But still no URL popped up in Chrome, and when going manual to Chrome reports: WireShark shows something interesting while my compiled version showed this: This made me look at Windows 10 Device Manager. Under "Universal Serial Bus devices" a device called "Arduino Leonardo WebUSB" shows up. It is using winusb.sys Question... Should the text "Sketch begins." show in the terminal? using the hex file attached to it doesn't. |
I just tried it on a chromebook :-) Awesome, it works. the URL notification showed up and directed me to the webpage. Also I was able to connect and to send / receive data :-) This made to to believe its related to the windows 10 driver. |
Another update, using the tool zadig and selecting libusb-win32 resulted Chrome to ask permission to connect. However, claiming the still port failed :-( |
Hi @basevers the reason why I gave you the HEX file was because I knew your compile environment is not correct. It is hard to help you fix the compile environment without seeing what is inside your system. I would suggest that you only use ARDUINO IDE and not third party IDE. Follow the instruction on this repo again. Try on a new Windows 10 and use another computer to test. NOTE: You kept saying no no URL pop up notification in Windows, this is a known issue, meaning no URL pop up notification is the CORRECT behavior for Windows. NOTE 2: DO NOT use Zadig to install the driver for you!!! It will mess up your drivers. Windows 10 by default will be able to detect WebUSB device as WinUSB device Now let's look at your Windows driver again, with the HEX I provided, you should see two devices appear on On Zadig (WARNING, do not use Zadig to install driver), you should see two interfaces, one is Arduino Leonardo WebUSB (Interface 0), this is the serial com port that you can also see from The second interface is Arduino Leonardo WebUSB (Interface 2), this is the WEBUSB and you can also see the same from Check if you got the same as mine, if not, you should try on another computer with Windows 10. Hope this helps. |
@basevers forgot to reply that the "Sketch begins." using the following command
In the RGB demo will output "Sketch begins." to WebUSB host, not the normal Arduino terminal that you use. If you run this RGB demo sketch with the |
Thanks, now all is working. It was painful to undo Zadig because I made so many attempts. Just in case others run into similar issues caused by Zadig, the trick is to keep uninstalling the driver until all the changes are undone. |
Hi guys, I've made progress and I'm also more confused :) Had to reinstall windows on my main computer and today I gave Arduino one more chance. It's working out of the box without any problem. I've tried both samples and they are working properly. I want to find out what was the problem and why it doesn't work on my windows tablet but I think you can close this issue. Thanks all |
@basevers What was the problem after all? My situation is:
But I still get the "DomException" when I try to connect to the device using WebUSB and when using the demo > console to connect I get this:
|
That the device does not enumerate unless you have the "enable new USB backend" flag enabled means that there is likely something wrong with the device descriptors. The new USB backend does not support composite devices yet so it will not work for Arduinos since they have more than once interface (serial and WebUSB). Can you look in chrome://device-log for more detailed errors? |
@reillyeon "enable new USB backend" enabled:
"enable new USB backend" disabled: No log entries :/ |
Hi @TimPietrusky it will be easier to debug if you report what you see on Device Manager and Zadig. Please see my comment here #44 (comment) |
@jpliew in Device Manager: In Zadig (which I never used before), I choose |
I found the solution to my problem: #4 (comment)
My problem was, that I used an older version of the WebUSB library from this repo on Mac and thought that connecting this "prepared" Arduino to Windows would just work. Only afterwards I saw that there is an update of the library and I uploaded that to my Arduino AFTER I connected it to Windows for the first time. And as the comment implies: The device has to provide a valid response the FIRST time it is added. And if that is not the case, it will just not work. Solution
Now it can be accessed in the browser with WebUSB. Further investigationDoes this also mean that using Windows 10 as the development platform means, that when someone is flashing the software onto the Arduino, that they also have to remove the Arduino from the Device Manager? Because otherwise the same thing as above applies or not? |
Windows includes the device serial number in the registry entries it creates. The WebUSB library changes the serial number from the Arduino's default (UART -> WUART) so this issue only cropped up because your system had seen a device with the older version of the library. |
@reillyeon Thank you very much! |
THANK YOU @TimPietrusky . I've spend hours trying to find out why my arduino didn't connect. "Reinstalling" it fixed the issue. I didn't use an older bootloader, but i made a lot of other mistakes the first time i flashed it, and i suspect something got saved. @reillyeon I would seriously suggest that a note is added to the readme, just noting that removing the device in device manager could refresh old information. It seems to me like it could help a lot of people. |
HELLO - I am having similar issues after updating my PC to the latest version of Windows 10 and Chrome (version 74). I set the proper flags in Chrome, and am starting chrome with command line webUSB enable flag set on. Chrome sees the device as paired, but when I try to connect I get "Security Error: Access Denied. Nothing has changed with firmware (using Arduino Leonardo with webUSB library), or the web software. We are in prototype development of a product that is a perfect fit for webUSB, but I am now skeptical about moving forward. Any additional help would be much appreciated. Here is what Chrome Device Log is reporting: USBUser[09:04:37] USB device added: path=\?\usb#vid_2341&pid_8036#wuart#{a5dcbf10-6530-11d2-901f-00c04fb951ed} vendor=9025 "Arduino LLC", product=32822 "Arduino Leonardo", serial="WUART", driver="usbccgp", guid=9015a91a-ea68-4652-906b-4257a579d0ab USBError[09:04:37] Failed to open device to read WebUSB descriptors.** |
@puttley, please file an issue in the Chromium bug tracker (crbug.com) with details about your device such as interface classes (it looks like your device is composite) as well as exactly which flags you have set (you shouldn't need any) and exactly which version of Chrome and Windows you are running. |
Thank you for your prompt reply. Since posting, I was able to get it to work. I had the "Enable new USB back end" flag set to enabled and also using the command line flag "--enable-features=WebUSB". With both of these set, my device was being seen as paired but would not connect. I disabled the "Enable new USB back end" flag and now my device connects just fine. I still have to use the command line WebUSB enable flag when starting chrome - so turns out having both enabled caused the issue. Thank you. |
@puttley the WebUSB feature flag is enabled by default so you shouldn't need that either. If the feature is still disabled when you don't add the command line flag please file an issue on crbug.com so we can investigate further. |
Thanks again. In my case, I had to add the command line to enable WebUSB in order to get my device to work after updating to the latest version of Chrome (Version 74.0.3729.169 (Official Build) (64-bit)). Interestingly enough, once I launched Chrome with the command line enabled, I can now remove it and my device still works. Seems as though I had to launch Chrome just once with the WebUSB command line set to enable. There is online information about Google disabling webUSB in latest version of Chrome. Maybe it has now been re-enabled by default? Google disables WebUSB in Chrome amidst phishing concerns Phishing is a major concern if you live a lot of your life on the internet. There are plenty of ways to protect against phishing attacks with software, but one of the best methods is hardware USB keys. An authentication device can protect you even if the attacker has your username and password. At least that’s what they’ll tell you. A pair of researchers proved that these devices are not invincible. A feature in Chrome called WebUSB made it possible to bypass the protections. WebUSB is a feature that allows websites to directly connect to USB devices; it was added in Chrome 61. Attackers can use the feature with an accompanying website to convince someone to type in their username and password and send it directly to the authentication device to unlock the account. Obviously, which Chrome being the most popular browser on the planet, this is a pretty serious vulnerability. When asked about it, Google’s security product manager said they are aware of the situation. They consider this type of attack to be an edge case, but they are working to fix the problem. For the time being, Google has disabled the WebUSB feature entirely. This was discovered in Chromium just yesterday. Users can apply a command line flag if they really want to re-enable the feature. For now, the problem has been solved by removing the moving parts. |
This worked for me. |
Hi,
I've tried webusb demo with my Arduino Leonardo but once I try to connect to it I get only Access Denied error.
And once tried to connect to Leonardo I only get access denied error. Do I have to do anything else to make it run?
OS: Windows 10
The text was updated successfully, but these errors were encountered: