Closed lyon470 closed 5 years ago
Can you provide more info? Your full sketch, on what microcontroller? What software is sending artnet ?
-- lecaude.com studioimaginaire.com
Le 21 déc. 2018 à 12:17, lyon470 notifications@github.com a écrit :
Hello i have the Artnet Neopixel example running and changed it so that i can set the subnet mask.
Now I have the problem that my output to the neopixels freezes every 4 seconds and nothing changes anymore.
Anybody know what I did wrong?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
I'am using Arduino Mega with Ethernet Shield and Resolume to sending ArtNet.
This is the Sketch i'am using:
Artnet artnet;
// Change ip and mac address for your setup byte ip[] = {10, 0, 1, 199}; byte broadcast[] = {10, 0, 1, 255}; byte mac[] = {0x04, 0xE9, 0xE5, 0x00, 0x69, 0xEC}; byte sub[] = {255,255,255,0};
void setup() { Serial.begin(115200); Ethernet.begin(mac, ip); Ethernet.setSubnetMask(sub); artnet.begin(); artnet.setBroadcast(broadcast); }
void loop() { uint16_t r = artnet.read(); if(r == ART_POLL) { Serial.println("POLL"); } if (r == ART_DMX) { // print out our data Serial.print("universe number = "); Serial.print(artnet.getUniverse()); Serial.print("\tdata length = "); Serial.print(artnet.getLength()); Serial.print("\tsequence n0. = "); Serial.println(artnet.getSequence()); Serial.print("DMX data: "); for (int i = 0 ; i < artnet.getLength() ; i++) { Serial.print(artnet.getDmxFrame()[i]); Serial.print(" "); } Serial.println(); Serial.println(); } }
And what happens without the subnet mask modification?
-- lecaude.com studioimaginaire.com
Le 22 déc. 2018 à 10:23, lyon470 notifications@github.com a écrit :
I'am using Arduino Mega with Ethernet Shield and Resolume to sending ArtNet.
This is the Sketch i'am using:
include
include
include
include
Artnet artnet;
// Change ip and mac address for your setup byte ip[] = {10, 0, 1, 199}; byte broadcast[] = {10, 0, 1, 255}; byte mac[] = {0x04, 0xE9, 0xE5, 0x00, 0x69, 0xEC}; byte sub[] = {255,255,255,0};
void setup() { Serial.begin(115200); Ethernet.begin(mac, ip); Ethernet.setSubnetMask(sub); artnet.begin(); artnet.setBroadcast(broadcast); }
void loop() { uint16_t r = artnet.read(); if(r == ART_POLL) { Serial.println("POLL"); } if (r == ART_DMX) { // print out our data Serial.print("universe number = "); Serial.print(artnet.getUniverse()); Serial.print("\tdata length = "); Serial.print(artnet.getLength()); Serial.print("\tsequence n0. = "); Serial.println(artnet.getSequence()); Serial.print("DMX data: "); for (int i = 0 ; i < artnet.getLength() ; i++) { Serial.print(artnet.getDmxFrame()[i]); Serial.print(" "); } Serial.println(); Serial.println(); } }
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Without the the modification it works correct but i need to configure the subnet
Is it possible the subnet on the sender is not set correctly?
-- lecaude.com studioimaginaire.com
Le 22 déc. 2018 à 10:34, lyon470 notifications@github.com a écrit :
Without the the modification it works correct but i need to configure the subnet
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
the subnet and the ip on the sender is correct. The freezing ist only when the subnet is at 255.0.0.0.
Is there another way to change the subnet ?
Seems like it's part of the Ethernet.begin() constructor: https://www.arduino.cc/en/Reference/EthernetBegin
-- lecaude.com studioimaginaire.com
Le 22 déc. 2018 à 11:44, lyon470 notifications@github.com a écrit :
Is there another way to change the subnet ?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
No i dont't think so because it works correctly when the subnet is at 255.255.255.0. Only when the subnet is at 255.0.0.0 it is freezing.
Now i figured out that the freezing is every time an Art Pool ist coming in.
The test sketch you posted above, what is the output in the console? Do you get poll messages and data. What do you mean by freeze ? It stops forever or it's a hiccup in the frame rate?
-- lecaude.com studioimaginaire.com
Le 22 déc. 2018 à 13:12, lyon470 notifications@github.com a écrit :
No i dont't think so because it works correctly when the subnet is at 255.255.255.0. Only when the subnet is at 255.0.0.0 it is freezing.
Now i figured out that the freezing is every time an Art Pool ist coming in.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
The Ouptut in the console is correct (i get data + poll) but every time a poll is receiving the data stops for about 1 or 2 seconds. It don't stop forever it's like a break in the data signal every time a poll is receiving.
I wonder if the broadcast address for your network is good, perhaps try changing it in the sketch to 10.255.255.255 ?
-- lecaude.com studioimaginaire.com
Le 22 déc. 2018 à 13:24, lyon470 notifications@github.com a écrit :
The Ouptut in the console is correct (i get data + poll) but every time a poll is receiving the data stops for about 1 or 2 seconds. It don't stop forever it's like a break in the data signal every time a poll is receiving.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Thanks so much. Now it's working perfect.
it is possible to change the artnet.begin(mac, ip) to artnet.begin(mac, ip, dns, gateway, subnet); and how can i change the ArtNode name that is sending in the poll reply
Yes you can use the Ethernet.begin call as you would in a normal arduino sketch. You can’t currently change the name via the sketch but you can modify it in the library, here are the lines: https://github.com/natcl/Artnet/blob/master/Artnet.cpp#L107
-- lecaude.com studioimaginaire.com
Le 22 déc. 2018 à 13:37, lyon470 notifications@github.com a écrit :
Thanks so much. Now it's working perfect.
it is possible to change the artnet.begin(mac, ip) to artnet.begin(mac, ip, dns, gateway, subnet); and how can i change the ArtNode name that is sending in the poll reply
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Thank you for the good support :+1:
Now everything is working.
Hello i have the Artnet Neopixel example running and changed it so that i can set the subnet mask.
Now I have the problem that my output to the neopixels freezes every 4 seconds and nothing changes anymore.
Anybody know what I did wrong?