no usb roles on LC after upgrade to 1.52

Status
Not open for further replies.
I've been working on keyboard/pointer sharing from PC to Chromebook using teensy-LC as a serial->USB bridge for a while. The project is mostly finished with keystrokes and mouse movement working very good. I've been developing on a xubuntu 18.04 machine with arduino 1.8.10 + teensyduino 1.48 that has mostly worked ok. I was noting 100% cpu utilization that was associated with the arduino-IDE and saw teensyduino 1.52 mentioned a similiar cpu-maxed-out situation so decided to upgrade (and upgrade arduino to 1.8.12). After upgrade something is fouled up about how teensy is recognized as I can no longer get the extra usb roles of serial/keyboard/mouse/joyst. I've noted that the small configuration text in lower right corner of IDE shows proper extra usb roles for the project until upload then it changes to just some base level config of ttyAMC0 without the xtra roles.

Whatever changed also changed the previous teensyduino install (1.8.10+1.48) as it as the same usb-role stripping behavior now. I _think_ I have the udev rules as indicated in the instructions but there is a bit of confusion on that point and appears to be an logical prime target. udev tweaking is NOT one of my strongpoints and could use very clear instructions regarding troubleshoot in that area.

This is a retirement project to scratch a personal itch. I've just purchased 5 t-LC's to replicate this ChromeBook control for a number of my projects. I mention retirement to indicate I could spend considerable time if properly guided to figure this out if it happens to be something systemic that needs to be worked out for others. I'll let this sit for a while to see if there will be guidance before mucking it up worse.
 
i refreshed the udev rules when i installed new arduino ide and new teensyduino so should have the newest. Today I installed arduino 1.8.12 and teensyduino onto a rpi4 and could not load my code to the teensy-LC that i've been using for development. So I tried a new cable and new teensy-LC. Same outcome, arduino reports upload failure.

At this point I'd like to revert to arduino 1.8.10 + teensyduino 1.48 (on X86-64 machine running xubuntu 18.04) but how to do that is not clear. Are old versions of teensyduino installer available on the website somewhere?
 
Sorry about lack of attention to detail re rpi4 usage. I'm running feb2020 "Raspbian Buster with desktop" which is still 32bit (running on 64), kernel 4.19.

thanks for tips will follow both. Intriguing that there is a command line version. Not really sure what that is (is just loader?) but I am glad to see anything that gets me away from total dependence on rather fat guis and java. btw, I ran the 1.8.12+1.52 on xubuntu 18.04 yesterday again to verify the problem and within few minutes saw 100% cpu from teensyduino when it was apparently doing nothing but idle.

btw2. I have another rpi4 inbound, i'll be able to do some very clean looks at Raspbian + teensyduino if there's anything you'd like to look at. (also still have 3 virgin from factory t-LCs that will just have the factory blink installed)
 
Typically when I am working with RPIs, I am doing so by running them headless. So most of the time I talk to them through some terminal window. On Windows this is typically KiTTy (PuTTy).

So with the CLI version of the Teensy loader. What I might do, is something like build my sketch on my PC, then transfer the resulting binary file over to the RPI and then use the CLI app through terminal window to then program the Teensy.

At one point I had a setup, where I hacked the Teensy (I think the protocol.txt), to make it works sort of like how the Edison used to work. That for the upload process, it would instead of use Teensydino to program the Teensy, it would automatically transfer the file to my RPI using something like SFTP?. Then on the RPI, I had a simple script running, that looked for a specific file to change (or exist?) and then would automatically run the CLI program to update the Teensy...

But in mean time, I will try getting out one of my RPI4s and see if it works for me.
 
@KurtE you wrote "build my sketch on my PC, then transfer the resulting binary file ". I've never dug into arduino nastiness enough to know where I might find the resulting binary executable. Any hints would be appreciated.

...i'm in Florida, there's a launch 2day, heading in that direction.
 
The hint was correct about how to get a version of the 1.48 tennsyduino loader archive so that I could rebuild and revert to a arduino-1.8.10+teensyduino-1.48 that I had done all my devopment work on in which usb profiles a keyboard+mouse+serial worked perfectly. Unfortunately, rebuilding that environment did NOT restore the usb capability. Unfortunately, I don't know if the udev rules are the same as they were because your udev rule doesn't seem to have any revision information, so not sure I have fully restored what was a working environment. At this point I'm pretty confused.
One observation that seems important. When I have my code loaded in an arduino project window and have usb profile serial+keyboard+mouse+joyst selected (from tools) I see that indicated in lower right of window. Somewhere during the upload process that changes to indicate only ttyACM0.

as for getting a binary so that I could work with the cli loader, I noticed today that there is a "export binary" in the menu's somewhere. I don't remember that being there in the old days of arduino. I'll give that and the cli loader a try soon. Regarding building a hex load file begs the question "how are usb roles/profiles controlled in a load file?"
 
Ok, I am absolutely flumoxed now. In my unsuccessful efforts to revert to arduino-1.8.10+teensyduino-1.48, I've given up on my main workstation and gone to another PC (xubuntu-14.04) that has not had teensyduino on it before. I've now rebuilt the intended environment with the only confusion factor being that I just NOW got the udev-rule from teensyduino install site and it doesn't have
version or change log that I can see... so that's an unknown.

(for this test the tool/usb was set to serial+keyboard+mouse+joyst)
If I attach a teensy-LC (that's been flashed before) and choose the teensy example for usb-keyboard (which should put a "hello world" wherever the text cursor is focused _AND_ print over serial a simple loop number). The serial works fine (as witnessed on serial-monitor), I see the loop number. However, no keystrokes are ever seen if I put focus on a terminal shell. I have used this
example when i first learned to use the addional usb roles/profiles/modes, so I don't believe I have any confusion there. There is also a usb-mouse example, mouse doesn't seem to work either.

For now the above stuff about cli loading is noise. I'd really like to get the gui working as intended to finish my project (which is making a linux to chromebook keyboard/pointer sharing bridge).
I do have one copy of working teensy code in a LC and I did verify that still works fine. That code absolutely uses the extra usb modes of keyboard and mouse to do it's thing so that and all
wiring is good. If necessary, I guess I could try to grab image off of the LC, image off supposed same code on another LC (that doesn't work) and do hex compare, but that sounds exceedingly painful.
 
As a quick sanity test, I tried this just now. It seems to work fine. Here's what I tried.

In Arduino, set Tools > Board to Teensy LC.

Set Tools > USB Type to Serial+Keyboard+Mouse+Joystick

Clicked File > Examples > Teensy > USB_Mouse > TriangleMove

Click Verify (and wait for Arduino to finish compiling code and update Teensy Loader window)

Press the button on Teensy LC.

Indeed the cursor starts moving slowly in a triangle a couple seconds after Teensy Loader complete the upload. I tested with Arduino 1.8.12 and Teensyduino 1.52 running on Ubuntu Linux 18.04, 64 bit.

Maybe you could try following those exact steps and see if your PC detects the Teensy and your cursor moves in a triangle?

Or if you want other help, please give us the *exact* code and steps to follow, so we are testing the same thing you are using. We can help you much better when you give the precise steps you're using and the exact code (or the exactly menu clicks if using one of the example without any modifications).
 
As a quick sanity test, I tried this just now. It seems to work fine. Here's what I tried.

In Arduino, set Tools > Board to Teensy LC.

Set Tools > USB Type to Serial+Keyboard+Mouse+Joystick

Clicked File > Examples > Teensy > USB_Mouse > TriangleMove

Click Verify (and wait for Arduino to finish compiling code and update Teensy Loader window)

Press the button on Teensy LC.

Indeed the cursor starts moving slowly in a triangle a couple seconds after Teensy Loader complete the upload. I tested with Arduino 1.8.12 and Teensyduino 1.52 running on Ubuntu Linux 18.04, 64 bit.

Maybe you could try following those exact steps and see if your PC detects the Teensy and your cursor moves in a triangle?

Or if you want other help, please give us the *exact* code and steps to follow, so we are testing the same thing you are using. We can help you much better when you give the precise steps you're using and the exact code (or the exactly menu clicks if using one of the example without any modifications).

I can verify this works on Windows 10 here with IDE 1.8.12 and TD 1.52 and a Teency LC.

Only possible added step was :: Tools / Port / Teensy_LC - which doesn't matter with no SerMon output and button push ... or TyCommander as I used it.

Can also confirm it works the same ( annoyingly so ) on Teensy 4.1 on Windows.
 
thx Paul and defragster for reassurance that things work on your end, maybe that's all i needed. I went back to original workstation (64bit xubuntu 18.04) which is now been reverted to arduino 1.8.10 + teensyduino 1.48. The only thing I've done is to simplify by NOT having a keyboard sharing utility (client) called "synergy" running. I ran Paul's suggested test (which was one of the things I _think_ I had tried exactly) and all works. duh???? So, now to try to reconstruct my crime, which I will because having the extra usb modes is fascinating to me and extremely helpful.

However, I do have a question. I don't understand what controls the attachment indication in lower right corner of IDE. Sometimes it will show the full extra usb modes that have been selected and sometimes a bare bones indication. This was indication just now with my code working which uses serial+keyb+maus+joyst. (below I attempt insert image)
tLC_usb-serial_key_maus_joyst_2020-06-10 10-46-24.png
Any idea about what controls this indication would be appreciated. Having that change inexplicably led me to chasing my tail. Today's experiment show that the extra modes can be working with that apparently showing the wrong attachment.
 
Any idea about what controls this indication would be appreciated.

The Tools > Ports menu determines which thing appears in this lower corner of the Arduino window.

When you click Tools > Ports, you should see your Teensy LC appear twice, if it is running a previously uploaded program which has Serial as part of its USB Type.

If you select under "Serial ports", the Arduino IDE will use Java code to open the serial port when you use the Arduino Serial Monitor. The lower corner shows the port name the Java code will attempt to use.

If you select under "Teensy ports", rather than using Java, Arduino will run a "teensy_serialmon" helper program which uses native USB methods to communicate with Teensy. The Java code never talks directly to hardware in this mode. It only communicates with the "teensy_serialmon" helper program. The lower corner shows the native USB path which "teensy_serialmon" will use.
 
Paul, thanks for that explanation. I had missed that along the way somehow (about a teensy_serialmon helper program). The explanation filled in a lot of mysterious gaps for me.
 
Status
Not open for further replies.
Back
Top