Connecting two Teensy 3.2 on OSX

Status
Not open for further replies.

jensa

Well-known member
Hi all,
I have a setup with two (custom) Teensy 3.2 based boards and I run into problems having both of them connected to my Mac at the same time.

If I connect only board #1, it comes up as /dev/tty.usbmodem42949672951
If I connect only board #2, it also comes up as /dev/tty.usbmodem42949672951
If I connect board #1 first, and then board #2, the first board will be /dev/tty.usbmodem42949672951 and the second will be /dev/tty.usbmodem8.

This sort of works, but if I now unplug board #1 (on /dev/tty.usbmodem42949672951), board #2 (on /dev/tty.usbmodem8) will instantly disappear and only the device on /dev/tty.usbmodem42949672951 remains. This is however now board #2. This is really messy and it causes one board to get the firmware of the other. I guess this might have more to do with how OSX/Mac handles this, but it really hampers my development at the moment as I'm unsure of which board I'm programming at any time.

I'd like to know if others have had this problem debugging intercommunication between two boards. I'd also appreciate any suggestions as to how I can keep both boards connected and still program and debug them individually.
 
Wild guess: Can it be that your custom Teensy does not set a usb serial number or sets the same usb serial number (42949672951 / 9 FFFF FFF7?) on all devices? I know that then at least Windows gets confused and assigns different com ports to the boards whenever you plug/unplug the device.
 
Funny, completely forgot that I wrote that WIKI article :). Anyway, good that it finally was of any help.
 
Update: It's still a little messy from a debug & develop perspective as the Teensy Loader will happily program any Teensy connected :-/
I'm using Platformio as my IDE. There you can set debug and upload port in the platformio.ini file. The problem seems to be that the Teensy Loader is a little too complex for what Platformio usually does and apparently there are several others with the same problem.

I guess that I'll just have to live with this for now, or compile via command line using Teensy CLI. Hopefully I can set som time aside in this project after xmas to solve this in a good way for Platformio users.
 
Update: It's still a little messy from a debug & develop perspective as the Teensy Loader will happily program any Teensy connected :-/
Have a look at tyCommander, it nicely handles uploading when there is more than one Teensy on the bus. It remembers which firmware to load onto which board (uses the serial number for this). You can also upload to all boards or select the board to upload manually. It also has a very nice serial monitor integrated. I don't use PIO often but I think it shouldn't be too difficult to integrate it. Here the commandline I use to call it:
Code:
UPL_TYCMD   := $(UPL_TYCMD_B)/tyCommanderC upload $(TARGET_HEX) --autostart --wait --multi

You might run into problems with your custom serial numbers though. IIRC, in bootloader mode the board reports the serial number which is stored in the bootloader chip. That means, it will change from your serial number to the one from the bootloader chip and back during a programming cycle, which used to confuse tyCommander.

However, that probably can be fixed easily:
  • Connect your Teensy to tyCommander and press the programming button. TyCommander should then show you the serial number from the bootloader chip
  • If you use this one for your custom serial number it should not change during a programming cycle and tyCommander should be happy. Never tried this trick but I'm quite sure it will work :)
 
Status
Not open for further replies.
Back
Top