Closed xtrinch closed 3 years ago
I've been able to resolve the first issue by adding:
...
build_flags =
-D ESP32S2
monitor_filters = esp32_exception_decoder
lib_ldf_mode = deep <----- this pulls in the FS.h
To my platformio.ini file. Just in case it ever helps anyone else :)
Although now it shows this:
Compiling .pio/build/esp32s2doit-devkit-v1/lib238/Adafruit NeoPixel/kendyte_k210.c.o
.pio/libdeps/esp32s2doit-devkit-v1/ESP32TinyUSB/src/classes/msc/sdcard.cpp: In member function 'virtual int32_t SDCallbacks::onRead(uint8_t, uint32_t, uint32_t, void*, uint32_t)':
.pio/libdeps/esp32s2doit-devkit-v1/ESP32TinyUSB/src/classes/msc/sdcard.cpp:66:12: error: 'class fs::SDFS' has no member named 'readRAW'
SD.readRAW((uint8_t*)buffer, lba);
^~~~~~~
.pio/libdeps/esp32s2doit-devkit-v1/ESP32TinyUSB/src/classes/msc/sdcard.cpp: In member function 'virtual int32_t SDCallbacks::onWrite(uint8_t, uint32_t, uint32_t, void*, uint32_t)':
.pio/libdeps/esp32s2doit-devkit-v1/ESP32TinyUSB/src/classes/msc/sdcard.cpp:74:12: error: 'class fs::SDFS' has no member named 'writeRAW'
SD.writeRAW((uint8_t*)buffer, lba);
^~~~~~~~
Compiling .pio/build/esp32s2doit-devkit-v1/lib212/WiFi/ETH.cpp.o
*** [.pio/build/esp32s2doit-devkit-v1/liba3b/ESP32TinyUSB/classes/msc/sdcard.cpp.o] Error 1
Which I see is already mentioned in another issue.
Figured the second issue out too - If I don't use the vendor id 0x2341
which is arduino's, the device doesnt work - I see permission denied in chrome://device-log/
for the device. Not sure why, but using the arduino vendor ID fixed the issue.
Figured the second issue out too - If I don't use the vendor id
0x2341
which is arduino's, the device doesnt work - I see permission denied inchrome://device-log/
for the device. Not sure why, but using the arduino vendor ID fixed the issue.
It is because webusb website you are using is filtering devices by VID/PID. You can also use 0xcafe
VID.
You may also need to add udev on linux.
Which I see is already mentioned in another issue.
yes, this is the PR which is not merged yet and is required by SD class and example: https://github.com/espressif/arduino-esp32/pull/4777/files If not used, then you can delete from library.
It's my website and I control the filters, doesnt work with 0xcafe, I would probably have to add custom udev rules for that yeah
Thanks 👍
@xtrinch Did you find solution or do you still have issues with it?
I didnt dig deeper as using the arduino VID is sufficient for me. I'll close the issue. Thanks for your help.
For context, this is my platformio file:
The project does however not compile as I get this error:
Do I need to include something else to get it to compile out of the box? After removing
sdusb.h
andsdcard.cpp
, the project compiles.Next problem that I have is the inability to get webusb to work. This is my sketch:
The CDC class device works and the messages are echoed to my serial monitor console successfully via my computer terminal with
xtrinch@elizabeta:~$ echo -e "test" > /dev/ttyACM0
. I can even flash the device via this tty and do not have to enter bootloader mode.The problem however is the web usb, as the device does not show up in chrome under available devices. Note that I've tried without any vendor filters and the device is just not here. Neither does it have a designator in /dev/tty* (Not sure if the web usb devices should have that though?). If I boot the board in bootloader mode, it shows up in chrome as an espressif device, so it's definitely a software thing.
I've tried also with the default
www.tinyusb.org/examples/webusb-serial
by omitting the custom URL specifications but it does not show up there either.I am using latest chrome on ubuntu 20.04.
Please help.