SIO Command $F0 Enable UDPStream Mode - FujiNetWIFI/fujinet-firmware GitHub Wiki

This is a command for Device $70 - The FujiNet Device itself (see SIO-Commands-for-Device-ID-$70).

Enable UDPStream Mode ($F0)

Description

Given a hostname or ip address (64 characters) and port as aux1 & 2, it will open a UDP port to the address and allow data streaming. This is used to enable MIDIMaze emulation on port 5004.

Parameters

DCB Value
DDEVIC $70
DUNIT $01
DCOMND $FB
DSTATS $80
DBUF Pointer to a 64 byte buffer containing hostname or ip address, example below
DTIMLO $0F
DBYT 64
DAUX1 byte 1 of port
DAUX2 byte 2 of port

Examples

C

/**
 * Enable UDP Stream on HOST / PORT
 */
void fuji_sio_enable_udpstream()
{
  char host[64];
  int port = 6502;
  strcat(host, "192.168.1.118");

  set_sio_defaults();
  OS.dcb.dcomnd = 0xF0; // Enable UDP Stream
  OS.dcb.dstats = 0x80; // Computer->Peripheral
  OS.dcb.dbuf = &host;
  OS.dcb.dbyt = sizeof(host);
  OS.dcb.daux = port;
  siov();
}

See Also