-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Trellis M4 Does not appear at tty device on chromebook #1617
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
Comments
I tried on an older Samsung Chromebook, updated to the latest OS. It looks like you're running in developer mode or something like that.
I do see /dev/ttyACM0 with a Trinket M0 on my Chromebook, but not with 4.0.0-beta.2. I'm trying to use BeagleTerm. I can't connect, but that may be for other reasons. The underlying USB implementation has changed, and so it appears that something has changed is causing the Chromebook not to recognize the USB CDC serial device. |
I was able to see the system logs via I also tried the latest build of CircuitPython and it's still not working. It's not specific to the Trellis. |
I installed the latest version of CloudReady, which is Chromium OS, on an old netbook and did not have this issue, so I'm not sure what's going on. Tagging @hathach for reference, but this is going to be trickier to debug than I thought. I'll get some USB traces from my other Chromebook at some point. |
So to answer your questions from before:
|
I replicated the problem with a Trinket M0 and a circuit playground express. The kernel logged errors after starting to enumerate the HID devices then disconnected the USB device. Which was then detected and the process started over. I recompiled the same CP version with
I can pull the kernel logs off of the system if it would be useful. |
It is definitely USB HID issue, I remembered that CPY doesn't support boot protocol for keyboard. Maybe chromeOS trying to switch protocol to boot mode, and doesn't receive correct response from CPY. Hard to tell for sure, but it is a possible cause. I haven't used chromebooks before, could It be run with virtual box to troubleshoot the issue, if yes, please tell me which version chromeOS I should download to begin with :D |
As a fun thing, It does work 100% correctly with the same cable and device on my Windows 10 machine. Do you think If I removed the HID library from the device it would work on my chromebook? |
It's not the HID library - the device shows up whether the library is there or not. I'm going to get some USB traces with a USB hardware logging device and see if something looks strange. It's also odd that it works OK with CloudReady - this is mysterious. |
EDITED: After further testing it seems I got the kernel versions wrong. I have more data but no solution. I tested on a CentOS 7 system with a Redhat patched 3.10.0 kernel. Red Hat's changelog can be found here: I also did some more testing on the chromebook. I changed Hopefully this helps narrow down where to look. |
@hathach Here are two Beagle traces when plugging a Trinket M0 into my Samsung Chromebook. One is CircuitPython 3.1.2, which does appear as circuitpython-4.0.0-beta.4-trinket-m0-samsung-chromebook-usb2.tdc.zip More data: If I look at the CPy startup with gdb (using a Metro M4), then I see it crash with a backtrace like this:
However, if I compile with |
@dhalbert thanks for the trace file, I saw control endpoint didn't response after request to get input report from HID with report ID = 0x05. Can you help me to dumb HID report on your pc as follow command.
You may need to install hidrd, on linux it is simply this is not important, but the interface number of your descriptor is a bit odd, the sequence isn't in order and is as follow.
Shouldn't them be in order !!?? |
@hathach The traces are from the chromebook. I'm not sure I can run |
You can dump while attaching to your main pc. I just want to know which report ID host is trying ro get |
Btw, did the issue happen with other mcu such as m4 or nrf5x ?? |
@hathach Interestingly, seems to be SAMD-related. M0 and M4 boards don't show up as /dev/ttyACM0, but nrf52480 boards (Feather and PCA10059) are showing up. |
@dhalbert hmm, I guess it could be setup packet handling code specifically with samd port. Give me a bit of time, I will check and try to come up with a patch for you to test again. |
@hathach here is the hidrd output from a Metro M4: |
As noted above, if we remove the GAMEPAD, /dev/ttyACM0 shows up. |
One thing I am thinking of in the long run is making the keyboard be a boot device, in an unshared endpoint. A few people have asked for that so they can use a board as a boot keyboard. |
Thanks @dhalbert, though I think it is most likely usb port issue now, since the stack handles it just fine with nrf port. |
I did an hidrd report with the Feather nRF52480, and it's identical. |
For boot keyboard, tinyusb should be able to handle that now. Though there may be a bit of gotcach, can you open an issue for boot device and assign me there. I will do a PR for that |
Here is a Beagle trace of the Feather nRF52840, which is reporting a descriptor that should be identical non-working trinket M0 from the 4.0.0 trace above. |
Hi, do you mean a tinyusb issue or a CircuitPython issue? No problem for us doing it for CPy. |
@dhalbert most likely tinyusb port issue ☺☺ but could be both, need to give it a few try to be sure :) |
Also tested Metro M0 with 4.0.0-beta.5 on same Samsung Chromebook as above. Didn't work either, so it doesn't appear to be a crystalled-vs-crystalless difference. |
I just tested a build of #1721 |
The previous code assumed HID report ids were consecutive. This is not true in the CircuitPython descriptor where report ids are fixed for each report type. Fixes #1617
phew, finally this is fixed 👍 👍 |
after flashing the latest (4.0.0 beta 2) firmware and loading 4.x libraries, I can see the trellis m4 as a storage device and can load/execute code on it, however I cannot see the device as a tty serial connection:
vjmorrison@penguin:~$ ls /dev/tty*
/dev/tty
vjmorrison@penguin:~$ python3 -m serial.tools.list_ports
no ports found
vjmorrison@penguin:~$ ls /dev
console fd initctl lxd net ptmx random stderr stdout urandom zero
core full log mqueue null pts shm stdin tty wl0
I attempted resets, different USB cables/ports but to no avail.
My chromebook is a Pixel Slate, running most recent updates.
The text was updated successfully, but these errors were encountered: