You are not logged in.

#1 2017-04-26 13:47:54

Zwyn
Member
Registered: 2017-04-26
Posts: 5

How to detect hardware (specifically, 'Teensy')

I'm very new to using any Linux distribution, naturally that includes Arch.

For an IT assessment in my current education, I am required to do programming for a device named a Teensy (this is somehow related to an Arduino, though I don't know how as I have had little reason to look into Arduino). But that's aside the point.

When using a program 'teensy loader' as downloaded from the official site, or alternatively when trying to use 'teensy-loader-cli' as from the AUR, the Teensy is not being detected as it should be ('should be', referring to how it would work on Windows without setting up any other software).

The questions: When I plug in my device, I don't know if it's being detected or not by Arch. How can I check? What should I have setup beforehand, if anything, for it to be detected and work just fine, interacting with this software?

While I admit my device doesn't work on all computers for some strange reason (that I'm working on fixing separately), I would like to know what steps I need to be taking, if any, for it to work on Linux (so that I can verify that "yes, the device is the issue, not my setup of the operating system" if it fails to work).

Finally, I apologize for the strange format of this help request. I'm solving the issues in the wrong order, though I stress that I wish to be able to know that when the device is plugged in, and isn't working, that the fault is on the Device and not my setup. Thanks in advanced,

Offline

#2 2017-04-26 14:12:47

hcjl
Member
From: berlin
Registered: 2007-06-29
Posts: 330

Re: How to detect hardware (specifically, 'Teensy')

If you plug it in via usb, then

lsusb

should list it.

Offline

#3 2017-04-26 14:31:48

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: How to detect hardware (specifically, 'Teensy')

Check `ls /dev/` - specifically check the output of that before and after plugging the device in.

Also note that if your running kernel doesn't match the installed kernel (e.g. you've not rebooted siince the last kernel updated) then new device nodes (under /dev/) will not be created.

Do the version numbers reported by `uname -a` and `pacman -Q linux` match?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

#4 2017-04-26 23:49:17

Zwyn
Member
Registered: 2017-04-26
Posts: 5

Re: How to detect hardware (specifically, 'Teensy')

Thanks for the replies. Yes, the outputs of `uname -a` and `pacman -Q linux` match. Though, no, the device isn't being listed in `lsusb`, nor is the amount of.. 'entities' being increased in `ls /dev/` after I insert the device.

Again, I acknowledge my device has some issues, shall I conclude that the device is the problem right now, or any common methods required for the device to be detected? (i.e. if there are drivers that must be manually installed / detected?)

Last edited by Zwyn (2017-04-27 00:04:44)

Offline

#5 2017-04-26 23:59:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: How to detect hardware (specifically, 'Teensy')

If you suspect that there is a hardware problem, that could explain the symptoms - but so to could the lack of an appropriate driver.  If this were *actually* an aruino, or if it used a similar PIC chip, then the kernel would recognize it an create a device node for it (an entity under /dev/).

But some more diagnostics: are you sure an entry wasn't created in a subdirectory of /dev/ ?  An easy check is the following before an after plugging the device in:

find /dev | wc -l

Watch for output from `dmesg -w` when you plug the device in.

Does the device need it's own power source?  Or if it draws power from the USB, does it need USB3 and is it plugged into a USB3 port?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

#6 2017-04-27 00:20:04

Zwyn
Member
Registered: 2017-04-26
Posts: 5

Re: How to detect hardware (specifically, 'Teensy')

Its power source is from the computer it's connected to via USB - I have had it work on one, and only one of three computers thus far - as far as I know, I did nothing different between them (downloaded and launched Teensy Loader, then plugged in the device - it's a simple as that, yet 2/3 computers wouldn't work as intended).

`find /dev | wc -l` is showing me the same output before and after plugging it in, just the number 377. I'm sort of assuming that if this 377 were the Teensy, it would be removed from this output after removing the device, and that it's not being listed there because it's simply not the first time I've ever plugged it in..

The output of `dmesg -w` is a bit much for me. I did the only thing I could think of, and did `dmesg -w | grep teensy`, though nothing was found.

Offline

#7 2017-04-27 00:43:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: How to detect hardware (specifically, 'Teensy')

Don't grep, look for something *new* when you plug the device in:  dmesg -w will spit out a bunch of output, then it will stop but you will not get the terminal back as it will "follow" or wait for new messages.  Then plug the device in and see if any new lines show up.

But I'm starting to think the usb-type could be the issue.  I looked up Teensies, and they'd certainly need a fair bit of power.  Check which of your ports (if any) are USB3.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

#8 2017-04-27 01:56:32

Zwyn
Member
Registered: 2017-04-26
Posts: 5

Re: How to detect hardware (specifically, 'Teensy')

The Teensy comes with a program on it by default (and I replaced it on the one computer it worked with, to test) - this does simple tasks like turns on its LED lights given buttons on the Teensy being pressed, and that works fine regardless of what computer, what USB port - so I'm assuming power isn't the issue.

Though, `dmesg -w`, when I reboot the plugged in Teensy (regardless of which USB port), its output to some extent: (transcribing this, as I'm not typing this post on my Linux computer):

usb 2-1.1: device descriptor read/64, error -32
usb 2-1.1: device descriptor read/64, error -32
usb 2-1.1: new full-speed USB device number 4 using ehci-pci
usb 2-1.1: device descriptor read/64, error -32
usb 2-1.1: device descriptor read/64, error -32
usb 2-1.1: new full-speed USB device number 5 using ehci-pci
usb 2-1.1: device not accepting address 5, error -32
usb 2-1.1: new full-speed USB device number 6 using echi-pci
usb 2-1.1: device not accepting address 6, error -32
usb 2-1-port1: unable to enumerate USB device

The same is displayed regardless of port, each time I "reboot"(?) the device. Only difference in output each time is that the 'device number #' increments, so the above would be displayed again but using 7, 8, 9 (as you would probably have guessed).

Offline

#9 2017-04-27 02:02:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: How to detect hardware (specifically, 'Teensy')

Ah, that's good news.  It is detected.  I'm not great with interpretting dmesg though - so I can't get everything out of those messages, but the kernel is seeing the device, it just doesn't know what to do with it.

I see there are AUR packages for teensy devices.  Are you using any of these?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

#10 2017-04-27 02:30:32

Zwyn
Member
Registered: 2017-04-26
Posts: 5

Re: How to detect hardware (specifically, 'Teensy')

It sounded like teensy-loader-cli should have been sufficient for what I need (seems to be a command line alternative for the 'official teensy loader' I downloaded from the developer of the Teensy's site), though that's outputting an error 'unable to open device', regardless of whether or not my device is plugged in. Downloaded ty to give it a blind shot, though it failed to install as I hadn't downloaded teensyduino - and as I'm not working with arduino at all, I figured that hence both teensyarduino, ty, ty-git, tytools-git are all for something other than what I need.

I'm at least assuming that I'm not using actual Arduino software at all, as surely we would have been informed in my course that we are (or at the very least, the name arduino would have been mentioned in a class, lecture, etc. - and it hasn't been).

This is a slightly irrelevant question, but what is the '[...]-git.git' alternative of items on the AUR? teensy-loader-cli vs teensy-loader-cli-git, I can't tell which I should be trying to use - though, I'm assuming it's the former.

Edit: Oh, and yes I've tried using sudo when using teensy-loader-cli. No avail, doing a bit of a search of the error now.

Last edited by Zwyn (2017-04-27 02:43:06)

Offline

#11 2017-04-27 06:09:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,891

Re: How to detect hardware (specifically, 'Teensy')

usb 2-1.1: device descriptor read/64, error -32

The device is (very) likely drawing too much power.
This can be a temporary or design issue (according to some teensy forum, clones tend to have this - ensure the board has an orange LED, but that's second hand info)
Try a hub with dedicated power supply and maybe the systems BIOS/UEFI allows to control whether the port may go out of specs.
If you're on as raspberry pi (you're on the wrong board here, but) you need to ensure to have a good power supply and there's a key in config.txt to control usb voltage specs.

Offline

Board footer

Powered by FluxBB