Multicast problem? Wemos D1
Posted: Fri Apr 29, 2016 7:59 am
I have been testing a sample sketch (listed below) for the wemos D1 using the Arduino 1.6.8 IDE and the esp8266 version 2.2.0 build installed in the board manager and have become stuck.
The sketch is designed to listen for E1.31 data using either Unicast or Multicast.
In Unicast mode it works great and will run forever.
However if I attempt to use Multicast, after connecting the watchdog timer will reset like clockwork over and over again every 60 seconds.
I have tried this using both the Wemos D1 retired board as well as the Wemos D1 Mini. Same results.
I have even tried adding yield(), delay() to the void loop as well as deleting all the code (out of the void loop) so the board should be doing nothing other than just the setup routine.
Has anyone ever seen this or does anyone have any ideas of what I can do to solve this problem? Thanks.
/*
* ESP8266_Test.ino - Simple sketch to listen for E1.31 data on an ESP8266
* and print some statistics.
*
* Project: E131 - E.131 (sACN) library for Arduino
* Copyright (c) 2015 Shelby Merrick
* http://www.forkineye.com
*
* This program is provided free for you to use in any way that you wish,
* subject to the laws and regulations where you are using it. Due diligence
* is strongly suggested before using this code. Please give credit where due.
*
* The Author makes no warranty of any kind, express or implied, with regard
* to this program or the documentation contained in this document. The
* Author shall not be liable in any event for incidental or consequential
* damages in connection with, or arising out of, the furnishing, performance
* or use of these programs.
*
*/
#include <ESP8266WiFi.h>
#include <E131.h>
const char ssid[] = "........"; /* Replace with your SSID */
const char passphrase[] = "........"; /* Replace with your WPA2 passphrase */
E131 e131;
void setup() {
Serial.begin(115200);
delay(10);
/* Choose one to begin listening for E1.31 data */
e131.begin(ssid, passphrase); /* via Unicast on the default port */
//e131.beginMulticast(ssid, passphrase, 1); /* via Multicast for Universe 1 */
}
void loop() {
/* Parse a packet */
uint16_t num_channels = e131.parsePacket();
/* Process channel data if we have it */
if (num_channels) {
Serial.print("Universe ");
Serial.print(e131.universe);
Serial.print(" / ");
Serial.print(num_channels);
Serial.print(" Channels | Packets: ");
Serial.print(e131.stats.num_packets);
Serial.print(" / Sequence Errors: ");
Serial.print(e131.stats.sequence_errors);
Serial.print(" / CH1: ");
Serial.println(e131.data[0]);
}
}
The sketch is designed to listen for E1.31 data using either Unicast or Multicast.
In Unicast mode it works great and will run forever.
However if I attempt to use Multicast, after connecting the watchdog timer will reset like clockwork over and over again every 60 seconds.
I have tried this using both the Wemos D1 retired board as well as the Wemos D1 Mini. Same results.
I have even tried adding yield(), delay() to the void loop as well as deleting all the code (out of the void loop) so the board should be doing nothing other than just the setup routine.
Has anyone ever seen this or does anyone have any ideas of what I can do to solve this problem? Thanks.
/*
* ESP8266_Test.ino - Simple sketch to listen for E1.31 data on an ESP8266
* and print some statistics.
*
* Project: E131 - E.131 (sACN) library for Arduino
* Copyright (c) 2015 Shelby Merrick
* http://www.forkineye.com
*
* This program is provided free for you to use in any way that you wish,
* subject to the laws and regulations where you are using it. Due diligence
* is strongly suggested before using this code. Please give credit where due.
*
* The Author makes no warranty of any kind, express or implied, with regard
* to this program or the documentation contained in this document. The
* Author shall not be liable in any event for incidental or consequential
* damages in connection with, or arising out of, the furnishing, performance
* or use of these programs.
*
*/
#include <ESP8266WiFi.h>
#include <E131.h>
const char ssid[] = "........"; /* Replace with your SSID */
const char passphrase[] = "........"; /* Replace with your WPA2 passphrase */
E131 e131;
void setup() {
Serial.begin(115200);
delay(10);
/* Choose one to begin listening for E1.31 data */
e131.begin(ssid, passphrase); /* via Unicast on the default port */
//e131.beginMulticast(ssid, passphrase, 1); /* via Multicast for Universe 1 */
}
void loop() {
/* Parse a packet */
uint16_t num_channels = e131.parsePacket();
/* Process channel data if we have it */
if (num_channels) {
Serial.print("Universe ");
Serial.print(e131.universe);
Serial.print(" / ");
Serial.print(num_channels);
Serial.print(" Channels | Packets: ");
Serial.print(e131.stats.num_packets);
Serial.print(" / Sequence Errors: ");
Serial.print(e131.stats.sequence_errors);
Serial.print(" / CH1: ");
Serial.println(e131.data[0]);
}
}