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

Thread: MacOS version of teensyloader disconnecting regularly

  1. #1
    Junior Member
    Join Date
    Jun 2020
    Posts
    8

    MacOS version of teensyloader disconnecting regularly

    I've tried using one Teensy 2.0 with 3 different mini USB cables, two different macs, a Windows desktop, and a Linux laptop. Programming the slow and fast LED blink hex files works, but when I try to program larger hex files, the download fails because the board disconnects from my macs at regular intervals (around 2s).


    Here's the log:
    Code:
    01:57:10.974 (loader): HID/macos: detach callback: is currently open device
    01:57:11.006 (loader): HID/macos: attach callback
    01:57:11.021 (loader): Device went offline
    01:57:11.258 (loader): HID/macos: number of devices found = 1
    01:57:11.268 (loader): HID/macos: vid=16C0, pid=0478, page=FF9C, usage=001B, ver=1.20
    01:57:11.278 (loader): Device came online, code_size = 32256
    01:57:11.286 (loader): Board is: Teensy 2.0 (ATMEGA32U4)
    01:57:11.294 (loader): set background IMG_ONLINE
    01:57:11.508 (loader): HID/macos: status: ok
    01:57:13.149 (loader): HID/macos: detach callback: is currently open device
    01:57:13.181 (loader): HID/macos: attach callback
    01:57:13.258 (loader): Device went offline
    01:57:13.509 (loader): HID/macos: number of devices found = 1
    01:57:13.519 (loader): HID/macos: vid=16C0, pid=0478, page=FF9C, usage=001B, ver=1.20
    01:57:13.528 (loader): Device came online, code_size = 32256
    01:57:13.537 (loader): Board is: Teensy 2.0 (ATMEGA32U4)
    01:57:13.545 (loader): set background IMG_ONLINE
    01:57:13.758 (loader): HID/macos: status: ok
    01:57:15.325 (loader): HID/macos: detach callback: is currently open device
    01:57:15.358 (loader): HID/macos: attach callback
    01:57:15.508 (loader): Device went offline
    01:57:15.759 (loader): HID/macos: number of devices found = 1
    01:57:15.770 (loader): HID/macos: vid=16C0, pid=0478, page=FF9C, usage=001B, ver=1.20
    01:57:15.779 (loader): Device came online, code_size = 32256
    01:57:15.787 (loader): Board is: Teensy 2.0 (ATMEGA32U4)
    01:57:15.795 (loader): set background IMG_ONLINE
    01:57:16.008 (loader): HID/macos: status: ok
    01:57:17.291 (loader): HID/macos: detach callback: is currently open device
    01:57:17.508 (loader): Device went offline
    01:57:17.758 (loader): HID/macos: number of devices found = 0
    01:57:17.768 (loader): HID/macos: no devices found (empty set)
    The line "01:57:17.291 (loader): HID/macos: detach callback: is currently open device" is the point when the board seems to disconnect from the computer. I have no such problem with Linux or Windows. What could possibly be the problem here? I'm using the latest released versions of teensyloader (1.52 on MacOS).

    My macs are running Catalina and Mojave. I had to use a hub with the machine running Mojave because it only has USB-C ports, while I connected directly to a USB port on the machine running Catalina. I tried both USB ports too, restarting my macs without opening windows automatically when restarting, etc.

  2. #2
    I've not had that issue with High Sierra 10.13.6. I'm running Teensy 1.48 and Teensyduino 1.8.12. Board is a Teensy 3.2

    Then again, my files are not that big. 11,776 bytes of flash and 4880 bytes of dynamic memory.

  3. #3
    Junior Member
    Join Date
    Jun 2020
    Posts
    8
    I'm pretty sure now that it's a bug in the MacOS version of teensy loader 1.52 since I was able to program my Teensy 2.0 properly using the terminal loader built from source.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,513
    Will you please share the .hex file you used? That way I can try to reproduce this problem on my Macbook Air with Catalina, using the exact same file you were using.

    If using "Quick Reply", click the "Go Adavanced" button to get to the full editor which lets you attach a file. Only certain file types are allows, so you might have to put the .hex file into a .zip file to attach it to a forum post.

  5. #5
    Junior Member
    Join Date
    Jun 2020
    Posts
    8
    Here's the hex file I've been trying to flash: https://github.com/hfavisado/adapt-f...ffbjoy-r54.hex (download the raw file). I also got the same results by building that project from source. Teensyloader didn't work because programming took longer than 2 seconds, but the GUI loader would disconnect my board every two seconds.

  6. #6
    Junior Member
    Join Date
    Jun 2020
    Posts
    8
    I just want to clarify one thing: the only way it doesn't work for me is if I use teensyloader on macos. Using any other method on any other os, including the terminal programmer in macos, seems to work. I understand there might be something wrong with both my macs, so in that case, what could possibly be causing this?

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,513
    I was able to upload this .hex file to a Teensy 2.0 using my Macbook Air running Catalina 10.15.4 and Teensy Loader 1.52. I did the upload many times. No errors.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,513
    Here's a quick video so you can see how I tested. Hopefully this helps?


  9. #9
    Junior Member
    Join Date
    Jun 2020
    Posts
    8
    Thank you for your reply. I didn't expect this kind of support. I appreciate it very much. Here's what I'm experiencing:
    https://youtu.be/Bk034iLfzF8
    Last edited by merlin002; 06-04-2020 at 01:23 PM. Reason: Embedded video

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,513
    Looks like you're running both the GUI and command line loaders at the same time! Of course they're conflicting, as they're both trying to talk to the same Teensy.

    Run only 1 of them.

  11. #11
    Junior Member
    Join Date
    Jun 2020
    Posts
    8
    I only had the terminal window and teensy loader open at the same time for creating the video.

    I checked again just now after updating my OS to 10.15.5 and restarting, then running only teensy loader. The same behavior is happening.

  12. #12
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,584
    I had similar issues with a buggy USB serial driver (kext) installed on my Mac once. It was an OEM version of the CP2102 driver. Removing the kext file manually fixed the problem.

  13. #13
    Junior Member
    Join Date
    Jun 2020
    Posts
    8
    I did the following:
    Reinstall operating system by erasing system partition then reinstalling from USB
    Reinstall operating system again by removing all partitions then reinstalling from USB (I didn't think this would improve things, but hey I was desperate)
    Reset SMC
    Reset NVRAM

    but still the same behavior is happening.

    Since this is only happening in macos with the teensy loader GUI, it doesn't feel like a hardware fault, but I'm not sure. Is there anything else I can do to troubleshoot?

  14. #14
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,513
    I really don't know what else you could try, other than maybe use a different Mac or a PC?

    You can see in the video on msg #8 how it should work. I'm updating that Macbook Air to 10.15.5 right now. Will retest, just in case this is some new problem specific to 10.15.5.

    Other than that, I'm not sure what else I can do. This one is a real mystery to me.

  15. #15
    Junior Member
    Join Date
    May 2020
    Posts
    14
    fyi: having no issues with 10.15.5 and my teensy 4.1. so far...

  16. #16
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,513
    I completed the upgrade to MacOS 10.15.5. Ran the test again, GUI Teensy Loader version 1.52. with file "adaptffbjoy-r54.hex". No terminal window open, no use of the command line loader. I pressed the button on my Teensy 2.0. The code loads successfully. Repeated several times, works every time. Unable to reproduce any errors. Pretty much exactly the same as in the video on msg #8, but now with MacOS 10.15.5 rather than 10.15.4.

  17. #17
    Junior Member
    Join Date
    Jun 2020
    Posts
    8
    Not sure if this is related, but each time the teensy loader screen turns gray, that is, when the teensy 2.0 disconnects on its own, I simultaneously get an error in my system.log:

    xpcproxy[38408]: libcoreservices: _dirhelper_userdir: 557: bootstrap_look_up returned (ipc/send) invalid destination port

Posting Permissions

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