0

im new to E1.31 or sACN. I am trying to send a command to an E1.31 receiver that was created with an ESP8266 with Arduino from a PHP service. However, I keep encountering an error message:

"INVALID DMP VECTOR: 0x0".

this error is given by the ESP each time i send the command by PHP.

I have confirmed that the E1.31 receiver is functioning properly, as it works without issue when using the QLC+ software. The issue only arises when trying to send commands from the PHP service.

this is my php code:

<?php
$universe = 1;
$dmxData = array_fill(0, 512, 0); // Initialize all channels to 0
$dmxData[0] = 255; // Set channel 1 to full brightness

// Create E1.31 packet
$header = array(
    0x00, 0x10, // preamble size
    0x00, 0x00, // post-amble size
    0x41, 0x53, 0x43, 0x2d, 0x45, 0x31, 0x2e, 0x31, // ACN packet identifier
    0x00, 0x00, 0x00, 0x04, // ACN root CID
    0x00, 0x00, 0x00, 0x00, // framing flags and length
    0x02, // vector = Data Packet
    0x00, 0x00, // source name (16-bit Pid)
    0x00, 0x00, 0x00, 0x01, // priority = 1 (lowest priority)
    0x00, 0x00, // synchronization address
    0x00, // sequence number
    0x00 // options = 0 (defaults)
);
$dmxData = array_merge(array(0x00), $dmxData); // Add start code before DMX data
$packet = array_merge($header, $dmxData); // Combine header and DMX data
// Create socket and send packet
$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_set_option($socket, IPPROTO_IP, MCAST_JOIN_GROUP, array('group'=>'239.255.0.1', 'interface'=>0));
socket_set_option($socket, SOL_SOCKET, SO_BROADCAST, 1);
socket_sendto($socket, pack("C*", ...$packet), strlen(pack("C*", ...$packet)), 0, '239.255.0.1', 5568+($universe-1));
print_r(pack("C*", ...$packet));
socket_close($socket);

i´ve already tried using different AI´s but all output some kind of code which still throws the same INVALID DMP VECTOR error. i´d love to use a different protocol instead of this one but i´m forced to use sACN.

If anyone has encountered a similar issue or has any advice on how to troubleshoot this issue, I would greatly appreciate your help. Thank you in advance.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149

0 Answers0