Teensy conflict problem?

Status
Not open for further replies.

Cue777

Member
I have my Teensy wired up with the octo board but cant get past the point of it working in windows correctly and not sure what I am missing. I loaded the teensy software on another computer, not the one I am trying to use it on.

I have a device on com 3, and when I plug the teensy in it shows it on com4, everything looks OK in Device manager, but when I try to use the device on com 3 in another program, it gives me the error that it cant find the device on com 3? It is like when I am trying to access the device on com 3, it is trying to access the teensy instead of the other device because I see the light on the teensy flashing rapidly. if I unplug the teensy then the device on com 3 works fine.
 
Last edited:
Not really, probably need a lot more information on what Other program/device is running.

Is it configured to "Com3" or does it scan Com ports and chooses one? It may be that it's smarts for choosing one is not working well and it is choosing the Teensy instead.

But again just guessing from the data you provided.
 
Sounds like another case of Windows Mysterious Messed Up.

First, is this Windows XP, 7, 8, 10? Version 10 uses an INF from Microsoft. All others lack the INF, so the Teensyduino installer adds one.

Either way, the actual driver is always USBSER.SYS within Windows. But again, the version matters. All pre-10 Windows have serious bugs in that driver.

Unfortunately, most of these Windows problems are usually "solved" by blind fumbling which almost never yields any useful learning. So I don't have really specific suggestions, like are possible on Linux where you can really get to the bottom of something (complex as it may be). A first place to start might be in the Windows Device Manager. Look for an Advanced tab, which gives you an option to change settings. The one you want is the option to reassign to a different COM port number. Again, no idea if that will really do anything, but it's probably a good first step to try.

If that doesn't work, could you click on both COM ports in the Device Manager, and find the panel where you can get the Hardware-Id and Compatible-Id info (likely more than 1 line per Id). What does it show for each of them?
 
I tried changing the com ports and it didnt help. Here is a picture of the hardware id and compatible id.
 

Attachments

  • 1.jpg
    1.jpg
    67.5 KB · Views: 192
  • 2.jpg
    2.jpg
    76.7 KB · Views: 182
Just guessing:
looks like the PINDMD internally also uses a Teensy running in serial mode. Depending on how smart they programmed their detection algorithm they might try to connect to your board instead of theirs which doesn't work of course. Do you need to have your board in USB_SERIAL mode? If not try to change it to something else....
 
The pindmd does not use a teensy or anything like it I dont think. Not sure what you mean by serial mode either or how to change it or for which device?
The pindmd is a dot matrix display for the back of a pinball machine, when I load the virtual pinball software and load a game table, the display lights up to show the scores and animations you normally see on a pinball machine. When I plug the teensy into my computer, the display will not work.
 
The pindmd does not use a teensy or anything like it I dont think.
VID/PID clearly shows that the pindmd "is" a Teensy. Just to rule out any Windows issue: can you make the same screenshot as above with your Teensy disconnected?
 
Im not sure how it shows that it is a teensy? I took a screenshot of each one next to each other. I can take a new screenshot later this evening but it will only be of the pindmd on the left of course. I did have some issues with the driver install though on the teensy though and it did label the pindmd a teensy till I removed everything and installed the driver for the pindmd again so maybe thats some of the issue?
 
The combination of

VID = 0x16C0 (Vendor: VOTI / PJRC)
PID = 0x0483 (Product Teensyduino USB_SERIAL)

normally defines a Teensy running a firmware compiled with Tools | USB_Settings | Serial. If you look at your screenshot of COM 3 and COM 4, you see that both devices have this VID/PID. I can imagine that the driver of the pindmd might get confused if there is another 0x16C0/0x483 device on the bus and it talks to the wrong one. But that's just wild guessing.

If you don't need the serial connection on your Teensy you can try to compile your sketch with Tools | USB_Settings | Raw_HID. If my guesses are correct it should work then.
 
This product is using the exact same ID numbers as Teensy, which means it either has a Teensy inside, or similar hardware and is running code made with Teensyduino (which is not unusual - lots of people do use the code to make their own products), or someone went to a lot of trouble to precisely mimic the ID of a Teensy on completely unrelated hardware (which seems very unlikely - that's extra work for no real benefit).

Now for some guesswork....

This product probably was designed with Teensy and then made with the same chip and uses all the same USB code, but they probably didn't put the bootloader chip on their board. I'm also going to guess they didn't disable the _Teensyduino_reboot_() function in their code. If this is true (remember, I'm guessing) then their product is probably trying to go into bootloader mode when Arduino finds it instead of your Teensy. If this is true, then you MUST NOT CLICK UPLOAD. You will need to click Verify in Arduino, and then physically press the button on your Teensy. Also make sure you close the Arduino Serial Monitor before you press the button!

To make matters even more confusing, those screenshots look like Windows 7. I don't see anywhere in this thread which version of Windows you are using, so this is more guesswork...

All pre-10 versions of Windows have a terribly confusing USB serial driver bug. Normally Arduino avoids it because the serial monitor automatically closes. But in this case, if another program is using that board's COM port and Arduino mistakenly causes it to try to enter bootloader mode, then you can his this issue:


This is really confusing, because the problem manifests later (even hours or days later) when you plug and reconnect the device. If you have 2 serial devices and the wrong one is rebooting (or getting stuck trying to reboot), and you have Windows 7, then you are going to hit this driver bug over and over. It's very confusing in practice.

On Windows 7, all you can do is very VERY CAREFUL to always first close the serial monitor. Then click Verify, not Upload, and press the button on Teensy after the code verifies.

If you are able to open that pinball maching controller, I would be very curious to see a photo of the circuit board. If you contact the company, please suggest to them to use their own VID/PID numbers (or just make some up that aren't the same as Teensyduino), and if they did use the Teensyduino code without the bootloader chip, send them this advice to at the very least comment out the _Teensyduino_reboot_() function in a future version of their firmware, so their product doesn't lock up when someone with Arduino+Teensyduino tries to upload to a real Teensy.
 
Sorry, forgot to mention I am using Windows 7 64 bit. The pindmd must be using the teensy driver from when it got messed up while installing the teensy originally so that must be my problem. When I originally installed/plugged in the teensy it caused my pindmd to say it was a teensy and it wouldnt work at all, so I had to uninstall the driver and reinstall it.

To clarify some more, I have no problem connecting to the teensy and uploading code to it, I already have it loaded with the software that I need for it to run my LED strips which is what I want to use it for, its just that when I plug it in, it conflicts with the pindmd.

there is a picture of the back of the dmd as well here, https://virtuapin.net/index.php?main_page=product_info&products_id=231

Lots of people use this combination with their DMD's so this is a isolated issue. I followed this tutorial http://www.vpforums.org/index.php?showtopic=36156
and the only issue I have is when its plugged in the dmd doesnt work cause of the driver issue. I think I will remove both of them and try reinstalling again to see if that does anything as well.

if you click on the install guide on this page and scroll down, it has a link to the USB drivers the pindmd3 uses.
http://www.pindmd.com/
 
if you click on the install guide on this page and scroll down, it has a link to the USB drivers the pindmd3 uses.
http://www.pindmd.com/

It's an exact copy of PJRC's INF, except they replaced "Copyright (C) 2014 PJRC.COM, LLC." with "Copyright (C) 2015 VirtuaPin pinDMD" in the comments at the top, and MFGNAME="PJRC.COM, LLC." & DEVNAME="Teensy USB Serial" with MFGNAME="VirtuaPin" & DEVNAME="VirtuaPin pinDMD3" in the [Strings] section.

It even still has "CatalogFile=cdcacm.cat". They didn't even change this name to match "pinDMD3". Of course they aren't providing a corresponding pinDMD3.cat or cdcacm.cat file with a proper signature, like I do with Teensyduino.
 
It's an exact copy of PJRC's INF, except they replaced "Copyright (C) 2014 PJRC.COM, LLC." with "Copyright (C) 2015 VirtuaPin pinDMD" in the comments at the top, and MFGNAME="PJRC.COM, LLC." & DEVNAME="Teensy USB Serial" with MFGNAME="VirtuaPin" & DEVNAME="VirtuaPin pinDMD3" in the [Strings] section.

It even still has "CatalogFile=cdcacm.cat". They didn't even change this name to match "pinDMD3". Of course they aren't providing a corresponding pinDMD3.cat or cdcacm.cat file with a proper signature, like I do with Teensyduino.

So then I guess I do have the correct driver for my DMD?
 
The combination of

VID = 0x16C0 (Vendor: VOTI / PJRC)
PID = 0x0483 (Product Teensyduino USB_SERIAL)

normally defines a Teensy running a firmware compiled with Tools | USB_Settings | Serial. If you look at your screenshot of COM 3 and COM 4, you see that both devices have this VID/PID. I can imagine that the driver of the pindmd might get confused if there is another 0x16C0/0x483 device on the bus and it talks to the wrong one. But that's just wild guessing.

If you don't need the serial connection on your Teensy you can try to compile your sketch with Tools | USB_Settings | Raw_HID. If my guesses are correct it should work then.

I tried running it in raw_hid and it didnt conflict anymore but it wont work with my pinball software that way. Not sure what to try next.
 
I tried running it in raw_hid and it didnt conflict anymore but it wont work with my pinball software that way. Not sure what to try next.
If this is your software. You would need to convert your code to use reading/writing to it using the RAWHID protocoll, instead of the Serial read/writes.

Other options: None overly great

You might try re-configuring the Com port numbers and see if that helps. If so total kludge!

If I remember correctly you say the Screen shows up as COM3 and your board shows up as COM4 and the software for the screen appears to try to use your board...
So what happens if you go into the Device manager and renumber COM3 to maybe Com10? I believe this is in the Advanced options for the device...

You might contact the vendor and see if they have an idea.

You might try to see what communications the software is doing to the display board. Is there some handshake that it does at startup? If so maybe there is a way for your board to answer the software and say NOT me.
 
Upgrading to windows 10 or linux isn't an option, that will cause other problems with the pinball software. I tried changing the com port numbers and it didn't help.
 
Last edited:
The combination of

VID = 0x16C0 (Vendor: VOTI / PJRC)
PID = 0x0483 (Product Teensyduino USB_SERIAL)

normally defines a Teensy running a firmware compiled with Tools | USB_Settings | Serial. If you look at your screenshot of COM 3 and COM 4, you see that both devices have this VID/PID. I can imagine that the driver of the pindmd might get confused if there is another 0x16C0/0x483 device on the bus and it talks to the wrong one. But that's just wild guessing.

If you don't need the serial connection on your Teensy you can try to compile your sketch with Tools | USB_Settings | Raw_HID. If my guesses are correct it should work then.

Sorry to bump this old thread but the problem indicated in this thread is still unresolved. It is not possible to use RAW_HID mode. I don't have access to the PinDMD code but I do have the ability to change the other Teensy device. I'm guessing that the PinDMD looks for particular VID and PID to determine the COM port (and of course can choose the wrong one or gets confused). Suppose I change the PID for the other device to something unused such as 0x0489. I may need Paul to approve this and register it with the USB database.

The file that needs to be changed is \teensy\avr\cores\usb_hid\usb_private.h, which has the following code:
Code:
#ifndef usb_serial_h__
#define usb_serial_h__

#include <stdint.h>

...

#define VENDOR_ID               0x16C0
#define PRODUCT_ID              0x0482
Let me know what you think. Especially Paul.
 
I couldn't edit my post as the edit time expired. I got the wrong file. It is \teensy\avr\cores\usb_serial\usb_private.h and the code is:
Code:
#ifndef STR_SERIAL_NUMBER
#define STR_SERIAL_NUMBER       L"12345"
#endif

...

#define VENDOR_ID               0x16C0
#define PRODUCT_ID              0x0483
I'm not sure but it might just work with a different serial number and keep the PRODUCT_ID the same. Does anyone know this?
 
I went ahead and tried to build it with PID 0x0483. I found out that the file to be changed is actually \teensy\avr\cores\teensy3\usb_desc.h. The binary compared well and the correct PID is showing up in the device manager. Now I'm going to get the fix tested against the original PinDMD hardware that caused the problem.
 
I don't know anything about this virtual pinball software or the non-Teensy hardware you're trying to mimic or emulate.

I also don't know key details, like which Teensy model you're using. Which specific files to edit vary depending on whether you are using Teensy LC/3.x or 4.x or 2.0. The files you mentioned in msg #20 and 21 are for Teensy 2.0. The file mentioned in msg #22 is for Teensy 3.x or LC.

If you need help with something on the Teensy, please explain what you need. Remember I don't know anything about this pinball application. I can't see your screen or know what you're trying to do unless you show screenshot or photos or explain clearly. Without details and without understanding what you're trying to do, I really can't help much.
 
Status
Not open for further replies.
Back
Top