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

Thread: Teensyduino 1.27 Beta #1 Available

  1. #1
    Administrator Paul's Avatar
    Join Date
    Oct 2012
    Posts
    334

    Teensyduino 1.27 Beta #1 Available

    Here is a first beta test for Teensyduino 1.27.


    Edit: old beta test linkes removed. Full non-beta release is here:
    http://www.pjrc.com/teensy/td_download.html



    The version adds support for Arduino 1.6.7.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,037
    Paul: I pulled 1.27b1 down to my Win10 w/IDE 1.6.6 and compiled my recent serial and scrolling and touch examples - No problem.

    One Issue with the TOUCH PULL. I'll go issue a new pull request ASAP. <edit: done>

    I didn't see this on your merge but "#define Z_THRESHOLD_INT 75" got dropped or I did a bad pull request <edited> missing "#define Z_THRESHOLD 400" - this regularly leads to breaks in the interrupt functionality.

    It was a specific fix that helped greatly taking 80 lines of 'sketch' code to 20 when I moved it native to the 'library', made the INT code stable and prevented forced "over reading". Since the interrupt only comes once per touch - any failed touch return (without this 'conditioning' below) prevents future readings [on that 'touch'], i.e. "isrWake = false". 400 is valid minimum for a real touch, but the hardware doesn't have that limitation - a touch is a touch. A light finger on its way to full pressure registers a light initial touch under 400, then ramps up. Likewise a sliding finger may go 'light' of 400 without 'untouching' Once the touch is rejected - the interrupt 'read/update() enable' [i.e. "if (!isrWake) return;"] is distinguished even though the touch never was 'lost' to the hardware to generate a new interrupt.

    Admittedly the '75' is arbitrary though worked 100% in my testing after I picked it, and it returns to working as soon as I put code below back As soon as I uploaded the compiled 1.27b1 code I was seeing the failure to sense touch, with the lines below restored so was full functionality.

    Code:
    #define Z_THRESHOLD_INT	75
    
    		if (z < Z_THRESHOLD_INT) { //	if ( !touched ) {
    			if (255 != tirqPin) isrWake = false;
    		}
    <edit> On Win10 I've been using 1.6.6 so I decided to try 1.6.7 - TD_1.27b1 then installed properly to that fresh unzipped directory and recent sketches compile.
    Last edited by defragster; 12-20-2015 at 08:48 PM.

  3. #3
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    961
    Is there a reason why this code gets a compile error, it worked with 1.25rc2. Or is this Arduino issue? Using Arduino 1.6.7 an this threads teensyduino for this error.

    Code:
    void setup() {
      // put your setup code here, to run once:
    }
    
    void loop() {
      // put your main code here, to run repeatedly:
    }
    
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    void test() { 
      Serial.println("test");
      delay(1000);
    }
    
    #ifdef __cplusplus
    }
    #endif
    error:
    Code:
    /var/folders/bj/vlzk0z7x3bqb_jzmz0k0vv2h0000gp/T/arduino_fa81b5de50bf36d94dd70f91df9696b7/sketch_dec20b.ino: In function 'void test()':
    sketch_dec20b:15: error: previous declaration of 'void test()' with 'C++' linkage
    void test() {
    ^
    sketch_dec20b:15: error: conflicts with new declaration with 'C' linkage
    void test() {
    ^
    exit status 1
    conflicts with new declaration with 'C' linkage
    but this works:
    Code:
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    void test() { 
      Serial.println("test");
      delay(1000);
    }
    
    #ifdef __cplusplus
    }
    #endif
    
    void setup() {
      // put your setup code here, to run once:
    }
    
    void loop() {
      // put your main code here, to run repeatedly:
    }
    Also if I get error using the top c linkage code in a new tab.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,312
    Quote Originally Posted by duff View Post
    Is there a reason why this code gets a compile error, it worked with 1.25rc2. Or is this Arduino issue?
    Yup, they massively changed the build process in Arduino 1.6.7.

    Most of the changes are a huge improvement, but automatically extracting function prototypes is still a bunch of tough trade-offs. Obviously ctags isn't very aware of "extern C".

    You should probably move this sort of thing into its own .cpp and .h file. Long-term, that's the only way that's likely to keep working with all versions of Arduino.

  5. #5
    Junior Member
    Join Date
    Nov 2013
    Posts
    7
    Hello Paul,

    Quote Originally Posted by Paul View Post
    Here is a first beta test for Teensyduino 1.27.
    Mac OS-X:
    http://www.pjrc.com/teensy/td_127-beta1/teensyduino.dmg
    The version adds support for Arduino 1.6.7.
    On Macosx 10.11.2 i cannot install teensyduino for 1.6.7 beta, as i get the following during installation:

    Checking Arduino 1.6.7:
    version: "Contents/Java/lib/version.txt" version matches
    file: "Contents/MacOS/Arduino" present
    file: "Contents/Info.plist" present
    file: "Contents/Java/jssc-2.8.0.jar" present
    java: "Contents/Java/pde.jar" object: "processing/app/Base.class" checksum mismatch, unsupported Arduino version
    Does not match Arduino 1.6.7

    More info:
    >file Base.class
    Base.class: compiled Java class data, version 52.0


    >javap -verbose Base
    Classfile /Applications/Arduino.app/Contents/Java/pde/processing/app/Base.class
    Last modified Dec 22, 2015; size 62548 bytes
    MD5 checksum 9d539363803959432bd4b1a6dbf3bd54
    Compiled from "Base.java"
    public class processing.app.Base
    SourceFile: "Base.java"
    InnerClasses:
    [cut]


    >java -version
    java version "1.7.0_40"
    Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
    Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

    Greetings

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,312
    Quote Originally Posted by mercyful View Post
    On Macosx 10.11.2 i cannot install teensyduino for 1.6.7 beta, as i get the following during installation:
    They updated the mac version this morning. That's a good thing. The mac version they've had for download these last few days has a mysterious difference from the published source code.

    I'll prepare 1.27-beta2 soon.

  7. #7
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,037
    Quote Originally Posted by PaulStoffregen View Post
    I'll prepare 1.27-beta2 soon.
    Paul: can you look at including my TouchScreen Interrupt pull (post #2) for beta #2? It seems my weak GitHub skills got you an incomplete version the other week. Without that the int code is inclined to give disappointing results.

  8. #8
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    899
    for those using FastLED, there is still an issue with compile errors for 1.6.6 on for Teensy 3. Had to go back to 1.6.5.
    https://github.com/FastLED/FastLED/issues/234

  9. #9
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    The multicast support provided by the standard Arduino Ethernet library is missing from the Ethernet library provided by Teensyduino 1.2.7b.
    I've updated the EthernetBonjour library to work with Arduino 1.6.6 out of the box and it wold be nice to see this in Teensyduino as well ;-)

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,312
    Quote Originally Posted by Headroom View Post
    I've updated the EthernetBonjour library to work with Arduino 1.6.6 out of the box and it wold be nice to see this in Teensyduino as well ;-)
    I merged a ton of updates to Teensyduino's Ethernet library.

    https://github.com/PaulStoffregen/Ethernet

    I tested several of the examples and things seem to be working. Some of the API updates I can't really test because none of the examples use them.

    I compiled EthernetBonjour's DiscoveringServices example and it's running, but not discovering anything on my network. I'm really not familiar with how it works or what string I need to give it.

    Please give this updated Ethernet a try and let me know how it works for you?

  11. #11
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    I've tested the service discovery and it works here.
    My network router is an Airport Time Capsule and the Bonjour browser on my iMac shows these Bonjour services to be available:
    Click image for larger version. 

Name:	Screen Shot 2015-12-26 at 10.55.53 PM.png 
Views:	304 
Size:	57.5 KB 
ID:	5906

    So if you have the sketch look for _http or _ sbm or _atp it will discover these services.

    Code:
    >>Send to /dev/tty.usbmodem451371: "_smb"<<
    Discovering services of type '_smb' via Multi-Cast DNS (Bonjour)...
    Found: 'Peter's AirPort Time Capsule' at 10.0.1.1, port 445 (TCP)
    	txt record: netbios=
    Finished discovering services of type _smb
    
    >>Send to /dev/tty.usbmodem451371: "_http"<<
    Discovering services of type '_http' via Multi-Cast DNS (Bonjour)...
    Found: 'EyeTV Peter Doering’s iMac' at 10.0.1.4, port 2170 (TCP)
    	txt record: path=/eyetv/
    Finished discovering services of type _http

  12. #12
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    Registering a Bonjour service record, for example an OSC service (_osc._udp) works as well:

    Code:
    Connected to /dev/tty.usbmodem451371 at 9600
    My MAC is: 04:E9:E5:00:B0:51
    Starting Network using DHCP.
    My IP is 10.0.1.32
    Setting Bonjour Host Name : 04:E9:E5:00:B0:51.local
    Bonjour Service Record added successfully

    Thanks for adding this!!!
    Last edited by Headroom; 12-27-2015 at 04:51 PM.

  13. #13
    Senior Member
    Join Date
    Jun 2013
    Location
    Montréal
    Posts
    467
    The attachment doesn't seem to work...

  14. #14
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    It was just a screenshot of the Bonjour browser showing the registered service. Ive already deleted it ;-)

  15. #15
    Junior Member
    Join Date
    Jul 2014
    Posts
    15
    Quote Originally Posted by Paul View Post
    Here is a first beta test for Teensyduino 1.27.

    Mac OS-X:
    http://www.pjrc.com/teensy/td_127-beta1/teensyduino.dmg

    The version adds support for Arduino 1.6.7.
    I'm trying this with Arduino 1.6.7 on OS X 10.11.2. When I run the Teensyduino installer and select the Arduino directory the "Next" button of the installer stays ghosted. Clicking on "?", I get:

    Code:
    Directory: /Applications/Arduino-1.6.7.app/
      Checking Arduino 1.0.6:
        version: "Contents/Resources/Java/lib/version.txt"  file missing
        Does not match Arduino 1.0.6
      Checking Arduino 1.6.1:
        version: "Contents/Resources/Java/lib/version.txt"  file missing
        Does not match Arduino 1.6.1
      Checking Arduino 1.6.3:
        version: "Contents/Java/lib/version.txt"  wrong version: 1.6.7    Does not match Arduino 1.6.3
      Checking Arduino 1.6.5-r5:
        version: "Contents/Java/lib/version.txt"  wrong version: 1.6.7    Does not match Arduino 1.6.5-r5
      Checking Arduino 1.6.6:
        version: "Contents/Java/lib/version.txt"  wrong version: 1.6.7    Does not match Arduino 1.6.6
      Checking Arduino 1.6.7:
        version: "Contents/Java/lib/version.txt"  version matches
        file: "Contents/MacOS/Arduino"  present
        file: "Contents/Info.plist"  present
        file: "Contents/Java/jssc-2.8.0.jar"  present
        java: "Contents/Java/pde.jar" object: "processing/app/Base.class" checksum mismatch, unsupported Arduino version
        Does not match Arduino 1.6.7

  16. #16
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,312
    Quote Originally Posted by ratkins View Post
    I'm trying this with Arduino 1.6.7 on OS X 10.11.2. When I run the Teensyduino installer and select the Arduino directory the "Next" button of the installer stays ghosted. Clicking on "?", I get:

    Code:
        java: "Contents/Java/pde.jar" object: "processing/app/Base.class" checksum mismatch, unsupported Arduino version
        Does not match Arduino 1.6.7
    Use 1.27-beta2.

    https://forum.pjrc.com/threads/32273...ta-2-Available

  17. #17
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,312
    @Headroom - Any chance you could give my latest edits to Ethernet a try? I don't have any realistic way to test if UDP multicast is working.

    https://github.com/PaulStoffregen/Ethernet

    Over the last few days, I've made some major changes & optimizations. TCP should be much faster, especially for the case of reading 1 byte at a time.

  18. #18
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    I have not tested intensely, but Bonjour service registration per UDP multicast and OSC protocol per UDP transfer function fine.
    This was tested against Arduino 1.6.6 and the Arduino Eclipse plugin as I mainly have stopped working with Arduino IDE.

  19. #19
    Senior Member
    Join Date
    Jun 2013
    Location
    Montréal
    Posts
    467
    I just tried Arduino 1.6.7 with Teensyduino 1.27 and Paul's new Ethernet library on github and I can't get the EthernetBonjour Library to work at all.
    I tried the RegisteringServices example and it doesn't seem to register and I can't ping the device.

    Any ideas ?

    I do get some warnings when compiling:

    Code:
    /Users/nathanaell/Documents/Arduino/libraries/EthernetBonjour/EthernetBonjour.cpp: In member function 'MDNSError_t EthernetBonjourClass::_sendMDNSMessage(uint32_t, uint32_t, int, int)':
    /Users/nathanaell/Documents/Arduino/libraries/EthernetBonjour/EthernetBonjour.cpp:488:1: warning: label 'errorReturn' defined but not used [-Wunused-label]
    errorReturn:
    ^
    /Users/nathanaell/Documents/Arduino/libraries/EthernetBonjour/EthernetBonjour.cpp: In member function 'MDNSError_t EthernetBonjourClass::_processMDNSQuery()':
    /Users/nathanaell/Documents/Arduino/libraries/EthernetBonjour/EthernetBonjour.cpp:619:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    ir = (tr > sizeof(DNSHeader_t)) ? sizeof(DNSHeader_t) : tr;
    ^
    /Users/nathanaell/Documents/Arduino/libraries/EthernetBonjour/EthernetBonjour.cpp:761:54: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    ir = (tr > sizeof(DNSHeader_t)) ? sizeof(DNSHeader_t) : tr;
    ^
    /Users/nathanaell/Documents/Arduino/libraries/EthernetBonjour/EthernetBonjour.cpp:854:54: warning: value computed is not used [-Wunused-value]
    ptrName[buf[0]]; // this catches uncompressed names
    ^
    /Users/nathanaell/Documents/Arduino/libraries/EthernetBonjour/EthernetBonjour.cpp:854:54: warning: statement has no effect [-Wunused-value]
    /Users/nathanaell/Documents/Arduino/libraries/EthernetBonjour/EthernetBonjour.cpp:1031:103: warning: 'xid' may be used uninitialized in this function [-Wmaybe-uninitialized]
    (void)this->_sendMDNSMessage(this->remoteIP(), xid, (int)MDNSPacketTypeServiceRecord, j-2);
    ^
    /Users/nathanaell/Documents/Arduino/libraries/EthernetBonjour/utility/EthernetUtil.c:64:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
    #pragma mark -
    ^
    /Users/nathanaell/Documents/Arduino/libraries/EthernetBonjour/utility/EthernetUtil.c:65:0: warning: ignoring #pragma mark Private [-Wunknown-pragmas]
    #pragma mark Private
    ^
    Plusieurs bibliothèque trouvées pour "Ethernet.h"
    Utilisé : /Users/nathanaell/Documents/Arduino/libraries/Ethernet
    Non utilisé : /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/libraries/Ethernet
    Non utilisé : /Applications/Arduino.app/Contents/Java/libraries/Ethernet

  20. #20
    Senior Member
    Join Date
    Jun 2013
    Location
    Montréal
    Posts
    467
    Update:
    Using the standard Ethernet library in 1.6.7 I could get the library to work but it doesn't seem to work with Paul's latest version.

  21. #21
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,312
    I'm not very familiar with the Bonjour protocol. I do have some Apple devices that use it for network discovery. I also have an Arduino Yun.

    Can you give me any hints about how I might use these and examples from that library?

  22. #22
    Senior Member
    Join Date
    Jun 2013
    Location
    Montréal
    Posts
    467
    The most simple way to test is to run this example: https://github.com/TrippyLighting/Et...ngServices.ino
    If you have a mac around you can use the free Bonjour browser to see if the device gets registered on the Network: http://www.tildesoft.com/files/BonjourBrowser.dmg
    From the mac you should also be able to ping the device by it's hostname (arduino.local)

  23. #23
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    @nleclaude, thanks for the help. I'll take a look at the examples and try to test against Arduino 1.6.7 tonight and over the weekend.
    I usually don't work with the Arduino IDE but use the Arduino Eclipse IDE (mac user here ;-) so i am oftern a version or more behind in the Arduino IDE.

    I have tested service registration successfully with Paul's updated Ethernet library against Arduino 1.6.6 using the Arduino Eclipse IDE but I have not tested it agains the Arduin 1.6.7 IDE.

    My standard test rig is a Teensy 3.0 or 3.1 connected to a WIZ820io , which is connected per Ethernet cable to an recent Apple Airport Time Capsule. This I testet successfully with service registration (TCP & UDP) and service discovery.

    I've also previously had success registering services connecting a wireless mini router to the WIZ820io but the service discovery did not work in that setup.

    The Bonjour browser app is very helpful and is also available for the iPhone I believe..
    Last edited by Headroom; 01-08-2016 at 04:46 PM.

  24. #24
    Senior Member
    Join Date
    Jan 2013
    Posts
    966

    Testing multicast, Bonjour, mDNS and DNS-SD

    I successfully tested two of the 4 examples from the Arduino EthernetBonjour library with Arduino 1.6.7 and Teensyduino 1.27 from the main download here (not from the beta threads from the forum). In both cases I simply loaded the code into the editor and compiled and uploaded to a Teensy 3.1 without any modifications. This tests the two main parts of Bonjour, service Registration via mDNS and service discovery vis DNS-SD.

    1. The RegisteringServices.ino registers a _http._tcp service and a little web site called "Arduino Bonjour Webserver Example" shows up in Safari:

    Click image for larger version. 

Name:	Screen Shot 2016-01-11 at 7.48.52 PM.png 
Views:	273 
Size:	36.2 KB 
ID:	6079

    When selected it simply displays text: "Hello from a Bonjour-enabled web-server running on your Arduino board!"
    It shows up in the Bonjour Browser with the same name.

    2. The DiscoverServices.ino attempts to find specific registered services on the network. The Bonjour Browser indicates which services are registered at the moment:

    Click image for larger version. 

Name:	Screen Shot 2016-01-11 at 8.02.57 PM.png 
Views:	275 
Size:	62.7 KB 
ID:	6080

    To find these series, once the sketch is compiled and uploaded to the board, open the serial monitor and type one of the device types into the entry line and hit enter. For example "_http" will discover all http services:

    Click image for larger version. 

Name:	Screen Shot 2016-01-11 at 8.00.21 PM.png 
Views:	273 
Size:	34.4 KB 
ID:	6081

    Here is a returned result:

    Click image for larger version. 

Name:	Screen Shot 2016-01-11 at 8.00.29 PM.png 
Views:	269 
Size:	51.8 KB 
ID:	6082

    It works the same with _smb and _daap:

    Click image for larger version. 

Name:	Screen Shot 2016-01-11 at 8.01.21 PM.png 
Views:	277 
Size:	77.3 KB 
ID:	6083

    This hopefully helps to test whether multicast works as expected.

  25. #25
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,086
    Quote Originally Posted by PaulStoffregen View Post
    @Headroom - Any chance you could give my latest edits to Ethernet a try? I don't have any realistic way to test if UDP multicast is working.
    you might look at installing/using iperf on your linux box. iperf can do multicast, see
    https://gist.github.com/jayjanssen/5697813

Posting Permissions

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