Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Hide Teensy from IDE Ports list

  1. #1

    Hide Teensy from IDE Ports list

    Hi all, i have a bunch of teensys that i'm always working on, many inside custom MIDI controllers and I've gotten used only having the 1 teensy i'm working on plugged to my computer. I do that to avoid uploading to the wrong Teensy.

    However i was going thru an old box of broken boards and i had 2 teensy 3.2s with ripped off USB pads so i figured i could use one as a USB to MIDI DIN and vice-versa box, I put wired up a MIDI IO circuit and did a quick test and worked great so i left it plugged in.

    Then i went back to work on another 3.2 and i accidentally uploaded the sketch to the USB to MIDI DIN box, maybe it's a bad habit to not check what port is selected...

    I did some searches on the forum and i found the FSEC mod so i gave it a try and that did prevent the sketch from uploading to the board, i got the error on the IDE to press the PROGRAM button, i did that and i was able to upload a sketch.

    However the board still shows up on the port list that can make it confusing if i have another teensy 3.2 showing as well.

    Is there a way to block the IDE from seeing that specific board? and if so would i still be able to upload new firmware by pressing the PROGRAM button?

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,467
    You could make a copy of the Arduino IDE, and within that copy edit the vendor ID in usb_desc.c to something other than 0x16C0. Upload to that Teensy 3.2. Then do not use that copy of Arduino again (unless you want to reprogram that Teensy 3.2).

    When the vendor ID is changed, Teensyduino will believe it is some other completely different USB device. But if you press the button, you can still reprogram and upload new code. Just remember if you want to have that new code not be seem as a Teensy, use the modified copy of Arduino where the vendor ID is changed.

  3. #3
    Paul thank you for the idea, is there a reason to make a copy of the IDE? would it be enough to relaunch the IDE with a new VENDOR_ID for USB_MIDI then relaunch it back to 0x16C0?

  4. #4
    Quote Originally Posted by PaulStoffregen View Post
    You could make a copy of the Arduino IDE, and within that copy edit the vendor ID in usb_desc.c to something other than 0x16C0. Upload to that Teensy 3.2. Then do not use that copy of Arduino again (unless you want to reprogram that Teensy 3.2).

    When the vendor ID is changed, Teensyduino will believe it is some other completely different USB device. But if you press the button, you can still reprogram and upload new code. Just remember if you want to have that new code not be seem as a Teensy, use the modified copy of Arduino where the vendor ID is changed.
    Paul this worked great, i didn't make a copy of the IDE instead i just changed the Vendor ID to 0xF6C0 since i didn't see a vendor for that ID online, to make sure i remember it i used the usb_product_name.c mod to change the name which includes the Vendor ID i used, i tested it and it won't show on the COM Port list, i tried to upload the sketch with the default Vendor ID and board didn't respond, then pressed the program button on the teensy and it uploaded the sketch with the default vendor id and started showing again.

    All and all that's exactly what i was trying to achieve, thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •