Teensy 4.1, NativeEthernet, and AppleMIDI Tx

Status
Not open for further replies.

agprimatic

New member
Hi,

I just received my Teensy 4.1 board with my Ethernet adapter, and I'd like to use AppleMIDI with it.

I'm starting with AppleMIDI 2.1.0 examples/EthernetShield_NoteOnOffEverySec example code in Teensyduino 1.53.

I changed
Code:
#define <Ethernet.h>
to
Code:
#define <NativeEthernet.h>

I set up a proper MAC address.

I can connect to the Teensy 4.1 with my Mac's Audio MIDI Setup/MIDI Network Setup app.

But the Note On/Note Off commands aren't making it to my Mac. If I look in Wireshark, all that is ever sent from the Teensy board are Synchronization messages.

I traced that the messages are making it all the way down through Nativesocket.cpp. I can see both the correctly-sent Synchronization messages and the not-sent Note On/Note Off messages at this point. But from there it dives into the FNET library with fnet_socket_sendto(). Instrumenting the FNET library has proven difficult, since it has its own way of generating debugging messages, and it doesn't seem to be connected to Serial.

Has anyone had any success with this combination (Teensy 4.1, NativeEthernet, and AppleMIDI)?

Does anyone with FNET debug experience know how to generate debug messages from it? Maybe I have to use a hardware serial port instead of Serial?


Thanks,

Ag Primatic

P.S. It looks like I can reliably receive AppleMIDI just fine. I made the same modifications to the EthernetShield_ReceivedRawMidiData, and I can see Note On and Note Off messages on the serial console.
 
This does work, try updating the FNET and NativeEthernet libraries first.
Screen Shot 2020-08-28 at 6.42.54 PM.jpg
 
For my tests, I was using NativeEtherenet 1.0.1 and FNET 0.1.3 that were part of Teensyduino 1.53.

I upgraded NativeEthernet to 1.0.3 from https://github.com/vjmuzik/NativeEthernet and got this compile error:
Code:
~/Documents/Arduino/libraries/NativeEthernet/src/NativeEthernetClient.cpp:45:5: error: 'host_name' was not declared in this scope
     host_name = host;
     ^
The version of FNET at https://github.com/vjmuzik/FNET is the same as what is packaged with Teensyduino 1.53

Can you tell me what versions of NativeEthernet and FNET you're using?



Thanks,

Ag
 
That was a compile error I just fixed, FNET has been updated a little bit just without a version change.
 
Status
Not open for further replies.
Back
Top