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

Thread: Flashing/uploading program to multiple teensies in one network

  1. #1
    Member
    Join Date
    Oct 2018
    Location
    Poland, Cracov
    Posts
    20

    Flashing/uploading program to multiple teensies in one network

    Hello,

    I am designing system for rehabilitation device. The topology of network will be something like that:

    Desktop (User Interface) -> Master -> Slave 1 -> Slave 2 -> Slave 3

    Desktop on Linux, Master and Slaves on Teensies 3.2-3.6. Desktop with Master will be connected via USB. Master with Slaves will be connected via RS485 (full duplex, isolation etc).

    The problem is with flashing boards from one place (perfectly from Desktop). This problem concerning future software development and upgrading the software in final design during service tests.

    Paul, anyone? What are the ways to achieve that?

  2. #2
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,318

  3. #3
    Member
    Join Date
    Oct 2018
    Location
    Poland, Cracov
    Posts
    20
    Quote Originally Posted by tonton81 View Post
    So If I want to flash multiple boards, I have to get them connected via USB to the host and then do the stuff with tytools. That means additional cables (or one cable and hubs in nodes) between boards, am I right? In order to minimize the number of cables between nodes below will work?

    Click image for larger version. 

Name:	connections.png 
Views:	21 
Size:	14.1 KB 
ID:	14997

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,489
    Yes, that would work. As long as they have valid USB connect, they can be programmed.

    I have 5 T_3.6's just now on this computer - and all 5 can be sent the same HEX in parallel if desired and multi selected in the upload dialog. Or if from a stored HEX file all selected in the GUI and select the file to upload.

  5. #5
    Member
    Join Date
    Oct 2018
    Location
    Poland, Cracov
    Posts
    20
    This design:

    Quote Originally Posted by Matthew View Post
    Click image for larger version. 

Name:	connections.png 
Views:	21 
Size:	14.1 KB 
ID:	14997
    seems to work. I have connected three Teensy 3.6 via USB HUBs, then run tycommander from https://github.com/Koromix/tytools which gives me an overview of connected boards. The only problems that I experienced were problems with the USB HUBs - the OS sometimes won't be able to see all the devices.

    What is more tytools identify each board by ID, so there is a possibility to write scripts (and integrate it into the app) to automate flashing process.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,810
    Quote Originally Posted by Matthew View Post
    The only problems that I experienced were problems with the USB HUBs - the OS sometimes won't be able to see all the devices.
    This is an issue common to all native USB boards. If something goes wrong with the code on the board, such that the USB isn't working, then your PC can't see it.

    Every Teensy has a pushbutton for exactly this reason. The button is dedicated to 1 task - giving you a reliable way to get back into programming mode when things go wrong.

    As part of the command line loader, there's a "rebootor" program you can put onto another Teensy. Obviously this has a huge downside of needing another Teensy dedicated only to the task of pressing the button. But when you need an ultra-reliable way to automate programming for code that might not always behave (like Travis-CI integration) it is the proper solution.

  7. #7
    Member
    Join Date
    Oct 2018
    Location
    Poland, Cracov
    Posts
    20
    Quote Originally Posted by PaulStoffregen View Post
    This is an issue common to all native USB boards. If something goes wrong with the code on the board, such that the USB isn't working, then your PC can't see it.

    Every Teensy has a pushbutton for exactly this reason. The button is dedicated to 1 task - giving you a reliable way to get back into programming mode when things go wrong.

    As part of the command line loader, there's a "rebootor" program you can put onto another Teensy. Obviously this has a huge downside of needing another Teensy dedicated only to the task of pressing the button. But when you need an ultra-reliable way to automate programming for code that might not always behave (like Travis-CI integration) it is the proper solution.
    Paul, thanks for the detailed explanation, however "my problems" weren't serious problems. I am convinced that they were related only to USB HUBs, on boards there was only Blink uploaded.

    TLDR: For the next readers, the problem was related to USB HUbs - some boards were visible for a while (/dev ~ls, the same on tycommander) and not for a moment when connected via HUBs to PC. As I remember correctly (I will check it) the USB HUB replacement removed the "problem".

Posting Permissions

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