Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WebUSB not working anymore with SAMD Board Version > 1.8.10 #92

Open
iKK001 opened this issue Dec 26, 2021 · 1 comment
Open

WebUSB not working anymore with SAMD Board Version > 1.8.10 #92

iKK001 opened this issue Dec 26, 2021 · 1 comment

Comments

@iKK001
Copy link

iKK001 commented Dec 26, 2021

I discovered that your WebUSB does no longer work when installing newer SAMD-Board versions.

The default WebUSB example work for SAMD Board version 1.8.9.
But it does not work anymore for version 1.8.10 and above.

Works....
CleanShot 2021-12-26 at 02 08 38

Does not work....
CleanShot 2021-12-26 at 02 14 16

I am using a MKRWiFi1010 board.

The error message is :

fatal error: USB/PluggableUSB.h: No such file or directory
 #include "USB/PluggableUSB.h"
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Arduino MKR WiFi 1010.

Any idea what to do ?

@mars-low
Copy link

If downgrading SAMD core to version 1.8.9 as described in #84 (comment) is not an option, you could try to update library/WebUSB/WebUSB.h by including path to "api/PluggableUSB.h" and changing uint32_t to unsigned int when compiling for ARDUINO_API_VERSION and above. That ARDUINO_API_VERSION value is defined automatically when building for core 1.8.10 and above.

I've tried to do it in my fork and I've setup CI on Github Actions to verify it actually compiles on different platforms after changes. I must admit that my main purpose was to test it with Arduino Nano 33 IoT, but as I remember despite successfully compiling, still I haven't been able to run provided examples - device was not detected by browser. Unfortunately I haven't spent enough time to debug this problem. Eventually I've ended up switching to Adafruit fork of ArduinoCore-samd with TinyUSB with files for Arduino Nano 33 IoT copied from upstream repository and used Adafruit_TinyUSB_Arduino to handle WebUSB in experimental Blazor app.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants