Hi all,
I’m trying to connect an ESP32 to TouchDesigner via Ethernet, and I’ve gotten as far as being able to ping the ethernet, meaning that I can communicate with the ESP32. However, the message packets are just not being received in my OSC In Dat, and I don’t know what the issue is.
I attached my code and OSC In DAT below, though I scrubbed the IPs of my laptop, but I placed those in const IPAddress outIp() and in the Local Address parameter.
Here is my Arduino code below (sorry about the awful formatting, the code formatting feature keeps crashing my page):
#include <Ethernet.h> #include <OSCMessage.h> #include <SPI.h> #define ETH_SPI_SCS 5 // CS (Chip Select), Green // Define MAC and IP byte mac[] = { 0x94, 0xB9, 0x7E, 0x6B, 0x10, 0x14 }; IPAddress ip(169, 254, 116, 118); EthernetUDP Udp; // A UDP instance to let us send and receive packets over UDP const IPAddress outIp(*); // remote IP of your computer const unsigned int outPort = 9999; // remote port to receive OSC const unsigned int localPort = 8888; // local port to listen for OSC packets (actually not used for sending) void setup() { Serial.begin(9600); delay(1000); Serial.println("Starting Ethernet connection..."); SPI.begin(18, 19, 23); // SCK, MISO, MOSI //Set the CS pin, required for ESP32 as the arduino default is different Ethernet.init(ETH_SPI_SCS); //Start the Ethernet connection Ethernet.begin(mac, ip); //Hardware check Serial.println("Checking Ethernet hardware..."); if (Ethernet.hardwareStatus() == EthernetNoHardware) { Serial.println("ERROR: No Ethernet hardware detected!"); return; } else { Serial.println("Ethernet hardware detected!"); } //Check if cable is connected if (Ethernet.linkStatus() == LinkOFF) { Serial.println("Link is OFF. Check cable connection."); } else { Serial.println("Link is ON. Cable is connected. Ready to go!"); Serial.print("To test connection, please ping: "); Serial.println(ip); } Udp.begin(localPort); #ifdef ESP32 Serial.println(localPort); #else Serial.println(Udp.localPort()); #endif } void loop() { OSCMessage msg("/test"); msg.add("hello, osc."); Serial.print("Sending OSC to "); Serial.print(outIp); Serial.print(":"); Serial.println(outPort); Udp.beginPacket(outIp, outPort); msg.send(Udp); Udp.endPacket(); msg.empty(); delay(500); }
And here is a screenshot of my parameters for the OSC In DAT:


