cannot convert '<anonymous struct>*' to 'byte**

trying to send a structure but cant convert he struct to bytes?

cannot convert '<anonymous struct>*' to 'byte** {aka unsigned char**}' for argument '2' to 'void sendCommand(IPAddress, byte**, int, char*, char*)'

if not byte what should i use?

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <WiFiUdp.h>
#include <EEPROM.h>
IPAddress sta_local_IP(192, 168, 4, 2);
IPAddress sta_gateway(192, 168, 4, 1);
IPAddress sta_subnet(255, 255, 255, 0);
WiFiUDP Udp;
unsigned int ServerPort = 4210;

const char* sta_ssid = "xxxx";
const char* sta_password = "xxxx";

unsigned long now4 = 0;
int addr = 0;

struct {
  unsigned long timeOn;
  unsigned long timeOff;
  bool systemStatus;

void sendCommand(IPAddress to, byte * data[], int size, char delimiter[], char delimiter2[]) {
  Udp.beginPacket(to, ServerPort);
  Udp.write((byte *)data, size); //cast to bytes

void setup() {
  EEPROM.begin(512);  //Initialize EEPROM
  EEPROM.get(addr, _EEPROM);
  WiFi.begin(sta_ssid, sta_password);
  WiFi.config(sta_local_IP, sta_subnet, sta_gateway);

void loop() {
    if (millis() - now4 >= 1000) {
    sendCommand(sta_gateway, &_EEPROM, sizeof(_EEPROM), "NODEUD", "UDNODE");
    now = millis();

In your sendCommand declaration, drop the after the data parameter.

In your sendCommand declaration, drop the after the data parameter.

I'm still getting the same error

Post what you have now. And the error.

Try this. It works for me:

void sendCommand(IPAddress to, void * data, int size, const char *delimiter, const char *delimiter2)