Data is transmitted for the specified number of bytes by communication via Bluetooth MFi
After sending the data, wait for ACK.
The port used is the last port opened using the ComOpen function .
GetMfiAccessoryStatus function Used when the communication status is already connected.
Can be used to communicate with iOS library methods receiveData .

Syntax

 int AccessoryDataTransfer(
  const unsigned char *string,
  int len
); 

Parameters

string
[in] string is a pointer to the string to transfer.
len
[in] Specifies the number of bytes to send.
The range of values ​​is 1 to 16288.
If 0 bytes or less or 16289 bytes or more are specified, an error will be returned.

Return value

The function returns normal termination (OK) or transmission abnormal termination error (ERROR).
value description
OK Normal termination
ERROR Abnormal transmission termination (including when the communication port is not open)

Remarks

The character string is sent from the serial port for the specified number of bytes.
Used when connecting by MFi is specified by Bluetooth SPP (COM3, COM5).
Please refer to Bluetooth MFi Overview for details on Bluetooth MFi communication.

Requirements

Header file:
lib.h : System 5.0 or later.
Library file:
libSTARTUPOPH5000.a : System 5.0 or later.

Related matters

Last updated: 2022/05/09