Teensy Loader slow to start up

Status
Not open for further replies.
Installing fresh Ubuntu on my PI now to see what happens. Using 20.04 LTS instead. Looked like 20.10 support ends april 2021. Using the Raspberry Pi imager then will do the updates.

And before you ask why fresh - forgot my password and can't get back in ....
Did you try: ubuntu ;)
 
Of course
But just remembered the password when I was setting up with the new version :) Getting the updates now.
 
Tried new build on RPI4 running Ubuntu 64 bit ARM,

And the teensy app works :D

Tried the Simple USB keyboard example, where I added simple wait up to 5 seconds for serial, and commented out the Keyboard prints, and it built properly and programmed, but again after that could not open Serial terminal, nor automatically program again... Same issue I have seen on Ubuntu x86 64 on 18.04 and 20.04
View attachment 23768

Can confirm that the app works with 20.04.02LTS.

Tried the same sketch as @KurtE and when I selected Serial+Keyboard... did get out on the Serial monitor.
Screenshot from 2021-02-20 09-33-02.png
 
@mjs513 - Did you get output if you choose USB type: Keyboard
This should output using SEREMU

I just updated one of my 20.04 x86 (64 bit Ubuntu) and the teensy program works, but the SEREMU does not want to either reboot the teensy to program it or for the Serial Monitor to to talk to it
In this case data shown in Arduino IDE (Unable to open /dev/hidraw6)

Will investigate some more... Maybe a udev rules issue?

EDIT: I am guessing that might be it:
Code:
kurt@kurt-XPS-8300:~$ ls -l /dev/hi*
crw------- 1 root root 241, 0 Feb 20 06:27 /dev/hidraw0
crw------- 1 root root 241, 1 Feb 20 06:27 /dev/hidraw1
crw------- 1 root root 241, 2 Feb 20 06:27 /dev/hidraw2
crw------- 1 root root 241, 3 Feb 20 06:27 /dev/hidraw3
crw------- 1 root root 241, 4 Feb 20 06:27 /dev/hidraw4
crw------- 1 root root 241, 5 Feb 20 06:42 /dev/hidraw5
crw------- 1 root root 241, 6 Feb 20 06:42 /dev/hidraw6
crw------- 1 root root 241, 7 Feb 20 06:42 /dev/hidraw7
kurt@kurt-XPS-8300:~$
 
@KurtE
Not to the serial monitor.

Either output to textEditor or directly into the IDE window - depending which I had selected (active). But I did get output even when I had keyboard printing.

Have to go finish shoveling then going to play(test) later.
 
Thanks,

Note: on my 20.04 x86, looking at udev rules associated with hidraw I see:
Code:
kurt@kurt-XPS-8300:/etc/udev/rules.d$ grep -i hidraw *
98-openocd.rules:SUBSYSTEM!="usb|tty|hidraw", GOTO="openocd_rules_end"
kurt@kurt-XPS-8300:/etc/udev/rules.d$ cat 98-openocd.rules 

# Adding Arduino M0/M0 Pro, Primo UDEV Rules for CMSIS-DAP port

ACTION!="add|change", GOTO="openocd_rules_end"
SUBSYSTEM!="usb|tty|hidraw", GOTO="openocd_rules_end"

#Please keep this list sorted by VID:PID

#CMSIS-DAP compatible adapters
ATTRS{product}=="*CMSIS-DAP*", MODE="664", GROUP="plugdev"

LABEL="openocd_rules_end"
kurt@kurt-XPS-8300:/etc/udev/rules.d$
Looking around net I see: https://unix.stackexchange.com/questions/85379/dev-hidraw-read-permissions/85459

So tried:
Code:
kurt@kurt-XPS-8300:/etc/udev/rules.d$ cat 99-hidraw-permissions.rules 
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
kurt@kurt-XPS-8300:/etc/udev/rules.d$
Now Teensy with keyboard as USB type programs and Serial monitor works :D

Not sure what is best way to define this and/or where@!
 
@KurtE

getting an error when I try to execute your first line:
Code:
ubuntu@ubuntu:~$ /etc/udev/rules.d$ cat 99-hidraw-permissions.rules
bash: /etc/udev/rules.d$: No such file or directory

EDIT: never mind figured it out as I am remembering how to use Linux :)
 
Thanks,

Note: on my 20.04 x86, looking at udev rules associated with hidraw I see:
Code:
kurt@kurt-XPS-8300:/etc/udev/rules.d$ grep -i hidraw *
98-openocd.rules:SUBSYSTEM!="usb|tty|hidraw", GOTO="openocd_rules_end"
kurt@kurt-XPS-8300:/etc/udev/rules.d$ cat 98-openocd.rules 

# Adding Arduino M0/M0 Pro, Primo UDEV Rules for CMSIS-DAP port

ACTION!="add|change", GOTO="openocd_rules_end"
SUBSYSTEM!="usb|tty|hidraw", GOTO="openocd_rules_end"

#Please keep this list sorted by VID:PID

#CMSIS-DAP compatible adapters
ATTRS{product}=="*CMSIS-DAP*", MODE="664", GROUP="plugdev"

LABEL="openocd_rules_end"
kurt@kurt-XPS-8300:/etc/udev/rules.d$
Looking around net I see: https://unix.stackexchange.com/questions/85379/dev-hidraw-read-permissions/85459

So tried:
Code:
kurt@kurt-XPS-8300:/etc/udev/rules.d$ cat 99-hidraw-permissions.rules 
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
kurt@kurt-XPS-8300:/etc/udev/rules.d$
Now Teensy with keyboard as USB type programs and Serial monitor works :D

Not sure what is best way to define this and/or where@!

ok - as shown didn;t really work for me - but then I really have no idea with Linux so just used gedit to create the file. Restarted and it now works with serial monitor as you said.

Maybe Paul can add it to list of UDEV rules to be downloaded from the Teensyduino download page?
 
ok - as shown didn;t really work for me - but then I really have no idea with Linux so just used gedit to create the file. Restarted and it now works with serial monitor as you said.

Maybe Paul can add it to list of UDEV rules to be downloaded from the Teensyduino download page?
Good,

It also might have worked if you had made sure Arduino was not running and the teensy was not plugged in. Then when you plug in the teensy the rule should fire...

Was going to upload the file here, but it does not like .rules files

I added the .txt extension to it.
Should be able to download it and remove the .txt and then sudo cp it to /etc/udev/rules.d directory

Also @Paul maybe should instead add it to the 49-teensy.rules file.

Question, does you install script that checks for rules file simply check it exists or does it also check if the contents are different?

Will now go back to my other notebook with 20.04.02 and see if everything works

Edit: notebook that I installed Ubuntu 20.04.02 from ISO disk yesterday is working fine with the new build
Also updated with the udev rules file I mentioned here and building for USB Type of Keyboard works now. Both the reboot code as well as the Serial monitor

EDIT 2: Updated notebook other install 18.04 and it also works
 

Attachments

  • 99-hidraw-permissions.rules.txt
    69 bytes · Views: 57
Last edited:
Morning again - can't sleep so catching up

As for restarting. I did close and reopen the IDE but didn't disconnect the Teensy which was probably the issue - didn't even cross my mind to unplug it.

Also @Paul maybe should instead add it to the 49-teensy.rules file.
Probably a better approach to just add it to the rules file but for folks that have already downloaded the rules file and just keeps updating TD may not realize they need to update unless a warning is posted as well that the file has changed and please update.

Question, does you install script that checks for rules file simply check it exists or does it also check if the contents are different?
ok - remember I just get by with Linux so where do I find that?

Great that you got it checked out the laptop and with18.04
 
Also @Paul maybe should instead add it to the 49-teensy.rules file.

Yes, I agree.

But so far, I can't reproduce the problem on my Linux desktop.

screenshot.png

The /dev/hidraw devices are being created with open permissions.

screenshot2.png

Maybe this is coming from some other udev rule file I installed long ago?

Later today I'm going to dig up some USB cables and hubs so I can more easily plug into my Raspberry Pi 4 and Jetson Nano. Those 2 boards have had very little use, so they should be a much better test than my heavily used desktop machine.
 
Yes, I agree.

But so far, I can't reproduce the problem on my Linux desktop.

View attachment 23786

The /dev/hidraw devices are being created with open permissions.

View attachment 23787

Maybe this is coming from some other udev rule file I installed long ago?

Later today I'm going to dig up some USB cables and hubs so I can more easily plug into my Raspberry Pi 4 and Jetson Nano. Those 2 boards have had very little use, so they should be a much better test than my heavily used desktop machine.
Sounds good,

For the fun of it you might try a simple on your machine like: grep hidraw /etc/udev/rules.d/*
 
Well, after much removing and restoring files, I finally tracked it down to this line (meant for some Arduino.org boards):

Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="05e3", ATTRS{idProduct}=="*", MODE:="0666"

I have no idea why this is causing /dev/hidraw devices from Teensy which uses vendor ID 16C0 to get read/write premissions.

With this removed, I'm able to reproduce the problem. Looking into how the best improve the default udev rules.
 
Ok - just tried it on a RPI4 and its now working.
Screenshot from 2021-02-21 19-10-28.png

Guess the order matters - 00 versus 49. Forgot to document but think you added an extra rule as well to the file.
 
Did you run 32 bits or 64 bits on your Raspberry Pi? So far, I've only tested 32 bits.

Yup, added the hidraw rule. The usb subsystem rule also applies. But it looks like the more complex wildcard syntax is buggy on some distros. I switched to the simpler but less precise way.
 
Should have mentioned. Running Ubuntu 20.04.02LTS 64 bit on the PI4. Don't really have any other Linux systems. Probably can did out a RPI3 and see what I have on it and give it a try if you think its worth it?
 
Probably not worthwhile. I tested 32 bits on Raspberry Pi 4.

Unless Kurt turns up any more issues, I'm going to cross ARM64 troubles off my bug list.
 
Hopefully no more issues. Hope that list is getting shorter but have a feeling it’s getting longer.
 
It appeared to work on my RPI4 with 64 bit... looked good when I did ls -l /dev/hidr*
Plus I told it to program the keyboard one which the reboot worked and so did the terminal monitor.

Thanks
(Now back to my main machine - Windows 10)
 
I've encountered a problem while trying to update my Asus Laptop running Linux Mint 19.2 Cinnamon. On the Software download page the udev rules have been updated to 00-teensy.rules but the Teensyduino installer is checking for 49-teensy.rules. Is there a step that I'm missing or does the download page need an update? Had a copy of the 49-teensy.rules on my Desktop so was able to finish install on the Laptop.
 
Last edited:
I've encountered a problem while trying to update my Asus Laptop running Linux Mint 19.2 Cinnamon. On the Software download page the udev rules have been updated to 00-teensy.rules but the Teensyduino installer is checking for 49-teensy.rules. Is there a step that I'm missing or does the download page need an update? Had a copy of the 49-teensy.rules on my Desktop so was able to finish install on the Laptop.

The Teensyduino installer is older than the new rules, that's all.
 
Status
Not open for further replies.
Back
Top