Forum Rule: Always post complete source code & details to reproduce any issue!
Page 4 of 5 FirstFirst ... 2 3 4 5 LastLast
Results 76 to 100 of 116

Thread: Serial Issue with Teensy

  1. #76
    Quote Originally Posted by PaulStoffregen View Post
    Ok then, let's try digging deeper to see where the problem is really happening.

    Here's a copy of arduino-core.jar which prints the number of bytes it's actually getting for each serial event.

    https://www.pjrc.com/teensy/beta/arduino-core.jar

    MD5 = 32c3ae4c34c320b0d16f2ba16738568d

    Here's how it looks when I run it.

    Attachment 12200

    To use this, download the JAR file. I recommend running "md5 arduino-core.jar" in a Terminal window, to make sure you have the right file.

    Quit Arduino, if it's running. Control-click Arduino and click "Show Package Contents". Then navigate to Contexts/Java. Replace the copy of arduino-core.jar with this one.

    When you run Arduino again and open the serial monitor, you should see the messages printing in the console panel. The big question is whether Arduino on your Mac really is receiving all the incoming bytes and somehow losing them internally, or perhaps they're not ever coming into the serial event handler. This test should let us know.
    done
    md5 check is correct.

    Click image for larger version. 

Name:	Bildschirmfoto 2017-12-09 um 09.49.58.jpg 
Views:	50 
Size:	63.6 KB 
ID:	12201

  2. #77
    better picture..
    Click image for larger version. 

Name:	Bildschirmfoto 2017-12-09 um 09.53.52.jpg 
Views:	46 
Size:	134.2 KB 
ID:	12202

  3. #78
    every time the Serial monitor shows new data, your debugging Line does as well.

    My Mac does for sure receive all data! I can check with Screen command as well as with TYCommander.
    It is very interesting that Arduino loos only complete Lines??!!

    for example see Line "Serial readBytes 6"
    in the Serial monitor you can clearly see " arduino-core.jar replaced" is missing.

    Click image for larger version. 

Name:	Bildschirmfoto 2017-12-09 um 10.03.45.jpg 
Views:	80 
Size:	126.6 KB 
ID:	12203
    Last edited by PeterG.; 12-09-2017 at 08:05 AM.

  4. #79
    does not has do to anything with new line!

    Click image for larger version. 

Name:	Bildschirmfoto 2017-12-09 um 10.10.15.jpg 
Views:	47 
Size:	94.8 KB 
ID:	12206

  5. #80
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,829
    At least we now know the data isn't getting lost within the Java stuff.

    I must confess, I don't really know much about the code that is between the unix/iokit API and serialEvent....

  6. #81
    Quote Originally Posted by PaulStoffregen View Post
    At least we now know the data isn't getting lost within the Java stuff.

    I must confess, I don't really know much about the code that is between the unix/iokit API and serialEvent....
    What is the difference between USB Type "RAW HID" and "Serial"? because RAW HID works 100% reliable!
    Maybe this question can point us a direction?
    Last edited by PeterG.; 12-09-2017 at 08:42 AM.

  7. #82
    I managed to restart in safe mode now.
    Arduino does not recognize the teensy board at all.
    Does somebody know which processes I have to start, and may can also tell me how?

    thanks

  8. #83
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,829
    Just a quick followup on this old thread. I haven't forgotten. In fact, I'm working now on major improvements to how Teensy communication is done through Arduino. I hope to have something for testing next week.

  9. #84
    Hey Paul, Thank you for this Information.

    I haven't find out any more details. Problem is still the same.
    let me know if there is something to test. I can still reproduce the bug. So we should know quickly if it is fixed with the update.

    best regards, Peter

  10. #85
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,829
    I've posted 1.42-beta1 with the new serial monitor code.

    https://forum.pjrc.com/threads/49831...no-1-42-Beta-1

    Please give this a try. I'd really like to know if it solves this elusive Mac serial issue?

    While using 1.42-beta1, the new serial monitor stuff is only used when you select the board from the "Teensy" ports. If you select it from "Serial Ports", the old serial monitor using the Java JSSC library is used.

  11. #86
    hey Paul,

    Does not work on my machine:

    Build options changed, rebuilding all
    Archiving built core (caching) in: /var/folders/w9/c8t26_712cs3gfghqhhhyyr40000gn/T/arduino_cache_753021/core/core_teensy_avr_teensy35_usb_serial,speed_120,opt_ o2std,keys_en-us_cee3a1d70ca5f7f18ab44a012a95ee10.a
    Sketch uses 13204 bytes (2%) of program storage space. Maximum is 524288 bytes.
    Global variables use 4892 bytes (2%) of dynamic memory, leaving 191716 bytes for local variables. Maximum is 196608 bytes.
    /Applications/Arduino.app/Contents/Java/hardware/teensy/../tools/teensy_post_compile -test -file=sketch_feb19a.ino -path=/var/folders/w9/c8t26_712cs3gfghqhhhyyr40000gn/T/arduino_build_669318 -tools=/Applications/Arduino.app/Contents/Java/hardware/teensy/../tools -board=TEENSY35 -reboot
    An error occurred while uploading the sketch
    teensy_serialmon, loc = 14600000
    USB add callback
    usb_add: location=14600000
    USB remove callback
    USB remove callback
    USB add callback
    usb_add: location=14600000
    teensy_serialmon, loc = 14600000
    USB add callback
    usb_add: location=14600000
    USB remove callback

    Click image for larger version. 

Name:	Bildschirmfoto 2018-02-19 um 11.55.18.jpg 
Views:	25 
Size:	68.1 KB 
ID:	12982

    "No device"Serialmonito =offline

    the teeny 3.5 is only detected while programming.... see pic.

    Click image for larger version. 

Name:	Bildschirmfoto 2018-02-19 um 11.57.14.jpg 
Views:	26 
Size:	98.3 KB 
ID:	12983

  12. #87
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,829
    Looks like I still have more work to do here!

    This week I've been putting quite a bit of work into improved logging. Thanks for taking the time to do this testing. Hopefully the next attempt will be able to give us much better info.

    I really do want to find & fix this elusive Mac problem!

  13. #88
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,829
    Another new beta is available. This one fixes several problems with High Sierra.

    https://forum.pjrc.com/threads/50254...no-1-42-Beta-3

    Any chance you could give this new beta a try on your machine? I'm determined to fix this strange Mac serial problem, but it doesn't happen on any of the Macs I use.

    This new beta also features much better logging, which you can access from Teensy Loader's Help > Verbose Info menu. If it still doesn't work, hopefully we'll get some useful info about what's going wrong.

  14. #89
    Of course!!!
    The affected machine still has the same setup.
    I have tried to leave the system as unchanged as possible in order to be able to reproduce the error.
    I will test it tomorrow or on Wednesday.

    best regards.

  15. #90
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,829
    Thanks for keeping with this. It's a huge help, since I don't have any Macs that reproduce this problem.

    When you try this, you should see Teensy appear twice in the Port menu. If you select under "Serial", the old code is used. You should see the exact same problem.

    If you select under "Teensy", the new code is used to talk to the serial port. Hopefully this will work better?

  16. #91
    Click image for larger version. 

Name:	Bildschirmfoto 2018-03-14 um 15.22.02.jpg 
Views:	36 
Size:	132.4 KB 
ID:	13288

    Hey Paul Beta 3 still does not work. Yes I have pressed the PROGRAM Button.
    Port = no device.
    The old way is still working with Beta 3.

    Teensy did not respond to a USB-based request to enter program mode.
    Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
    An error occurred while uploading the sketch
    teensy_serialmon, loc = 14600000
    USB device add callback
    loc=14600000, vid=16C0, pid=0483, ver=0200, ser=2397460
    actual serailnum=239746
    USB device remove callback
    Serial add callback
    name=/dev/cu.usbmodem2397461, loc=14600000, vid=16c0, pid=0483, ver=0200
    Serial remove callback
    HID Manager started
    errorPipeListener thread exit

  17. #92
    update....

    after a system restart I can select the "new" Port option.
    I'm currently testing with 64bit Version Beta4-pre1.

    After some seconds the Serial monitor just stop printing.
    I tried with 1ms delay instead of 100ms, a delay of 1-4ms works, but some lines are still lost, (with both Port settings. (old Arduino Serial monitor and new Teensy one))
    A delay greater then 4ms doesn't work, (Serial monitor stop printing after a few seconds).


    An error occurred while uploading the sketch
    teensy_serialmon, loc = usb:14600000
    USB device add callback
    loc=14600000, vid=16C0, pid=0483, ver=0200, ser=2397460
    actual serailnum=239746
    USB device remove callback
    Serial add callback
    name=/dev/cu.usbmodem2397461, loc=14600000, vid=16c0, pid=0483, ver=0200
    Serial remove callback
    HID Manager started
    serial_event write
    serial_event read error -1

    I will downgrade again to Beta 3 and try again.

  18. #93
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,829
    Let's focus on testing with the "Teensy" entry in the Ports menu.

    These new betas collect a lot more info. It's in Teensy Loader's Help > Verbose Info. That windows has a Log menu to save the data to a file. Any chance you could save that log file on the next attempt?

  19. #94
    Should I go on with 64 bit or downgrade to beta 3?

  20. #95
    delay 100ms, reconnect.pdf
    delay 1ms, reconnect.pdf
    delay 100ms.pdf
    delay 1ms.pdf

    Here are some Logfiles...

    I have uploaded the Code, with 1ms and 100ms.. then try to open Serial monitor.
    The pdf. files called reconnect...Are log files running the same Code, but with reconnecting the USB Cable.

    Hopefully that Helps... still running 64bit Version...

  21. #96
    Quote Originally Posted by PeterG. View Post
    still running 64bit Version...
    sorry wrong Information, I have already done a downgrade...

  22. #97
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,829
    I'm looking at the logs now. The first strange thing I notice is there seems to be 2 instances of "teensy_ports" running. That's not supposed to happen. Any chance you could look with activity monitor, or "top" or "ps -aux" in the terminal to check if there really are 2 copies running?

  23. #98

  24. #99
    Verbis Informationen shows sometimes this Line:
    19:37:13.154 (loader): redraw, image 9

    redraw, event.pdf

  25. #100
    I have closed Teensy Loader and Arduino via activity monitor.
    If I restart Arduino, there are two teensy_ports processes showing up again.

    Edit:

    Closed an restarted again, now there are 3 processes called teensy_ports.

Posting Permissions

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