Hi,
a strange thing is happening on transmitting OSC UDP packets to broadcast address (for instance x.x.x.255)
UDP packet are not arriving to pc, and instead is received:
if destination of packets is transformed to a static ip everything goes just fine:
I suspect a bug somewhere, because everything was double checked (no firewall active on connection).
any idea?
here the example code:
a strange thing is happening on transmitting OSC UDP packets to broadcast address (for instance x.x.x.255)
UDP packet are not arriving to pc, and instead is received:
if destination of packets is transformed to a static ip everything goes just fine:
I suspect a bug somewhere, because everything was double checked (no firewall active on connection).
any idea?
here the example code:
C:
#include <Ethernet.h> //internal teensy 1.59.0 library
#include <EthernetUdp.h> //internal teensy 1.59.0 library
#include <SPI.h> //internal teensy 1.59.0 library
#include <OSCBundle.h> //internal teensy 1.59.0 library
#include <OSCBoards.h> //internal teensy 1.59.0 library
#include <OSCMessage.h> //internal teensy 1.59.0 library
const uint8_t mioMAC[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress teensyIP(169, 254, 0, 1);
IPAddress outIP(169, 254, 192, 255); // WITH 169,254,192,40 WORKS FINE
IPAddress subnet(255, 255, 0, 0);
const int outPORT = 1234;
const int inPORT = 9900;
EthernetUDP udpCanale;
void setup() {
Serial.begin(115200);
//start UDP
Ethernet.begin(mioMAC, teensyIP);
udpCanale.begin(inPORT);
Ethernet.init(10);
Ethernet.setSubnetMask(subnet);
}
void loop() {
send_goal();
delay(1000);
}
void send_goal() {
udpCanale.beginPacket(outIP, outPORT);
OSCMessage msgOUT("/rnbo/inst/0/messages/in/goal1");
msgOUT.send(udpCanale);
udpCanale.endPacket();
msgOUT.empty();
Serial.println("osc message sent");
}