-
Notifications
You must be signed in to change notification settings - Fork 125
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
WebUSB serial example broken (regression) #176
Comments
thank you very much for detail report on the issue. This is actually the landing page web issue, it didn't break line properly when multiple lines are sent in packet
The reason that the older version of tinyusb (hardly) does not cause this, is the new usb improve the write performance of vendor class. The later tinyusb cached and does not flush() every write (similar to Serial, it will only flush when 64 bytes are accumulated or flush() is actively called from user. Note: Serial.flush() is normally called behind the scene). I hope this clear thing up. pr #180 should fix this, if you have time to test it out, please let me know your result. |
Sadly the PR doesn't help, using the webpage and Adafruit TinyUSB library from that branch results in the same looking Except that somehow now there's Tested using [env:adafruit_feather]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
framework = arduino
board = adafruit_feather
board_build.core = earlephilhower
board_build.filesystem_size = 0.5m
debug_build_flags = -O0 -g3 -ggdb3
platform_packages =
framework-arduinopico@https://github.com/maxgerhardt/arduino-pico.git
build_flags =
-DUSE_TINYUSB
lib_deps =
https://github.com/adafruit/Adafruit_TinyUSB_Arduino.git#fix-webusb-example in Microsoft Edge |
the issue is with the sketch and the landing page. can you confirm
|
Yes the PlatformIO compiled firmware works with the above however, as shown in the screenshot I did take the landing page from the PR, not the adafruit website or the one from the master branch. So what's hosted on https://example.tinyusb.org/webusb-serial/index.html is not equal to what's in the PR? (exact same firmware) |
included in docs/ is not the landing page from the sketch, it should suggest the one from tinyusb. But I will update it anyway. Thank you for confirming. |
local page is updated as well with the pr. Thank you for your issue |
Operating System
Windows 10
IDE version
1.8.16
Board
Adafruit Feather RP2040
ArduinoCore version
2.2.0
TinyUSB Library version
1.12.0
Sketch (attached txt file)
examples/WebUSB/webusb_serial/webusb_serial.ino
What happened ?
When compiling and uploading the Web USB serial example to a RP2040 board using the Arduino-Pico core in the latest 2.2.0 version, which uses Adafruit TinyUSB version 1.11.0, the received text in the WebUSB Serial example page does not contain linebreaks.
When overwriting the library files in
C:\Users\<user>\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\2.2.0\libraries\Adafruit_TinyUSB_Arduino
with the 1.10.0 release, the problem goes away.The issue is also present in the latest 1.12.0 release, tested with the same procedure. Per this the first broken version is 1.10.2.
Thus, "something" broke in between these two versions.
How to reproduce ?
Debug Log
Debug log with good 1.10.0 version:
output_good.txt
Debug log with bad 1.12.0 version:
output_bad.txt
Logs were generated by setting
CFG_TUSB_DEBUG
to2
. Timestamps were added in by the HTerm terminal program.Screenshots
Behavior in 1.10.0 (good):
Behavior in 1.10.2 up to latest 1.12.0 (bad) (confirmed in earlephilhower/arduino-pico#642 (comment)):
Arduino IDE config:
The text was updated successfully, but these errors were encountered: