Send a file to a Bluetooth enabled device.
Synopsis:
int bt_opp_send_file(const char *remote_device_addr, const char *filename)
Arguments:
- remote_device_addr
-
The Bluetooth MAC address of the remote device, including the terminating NULL character. For example, 00:00:00:00:00:00\0.
- filename
-
The complete NULL-terminated path of the file you wish to send.
Library:
libbtapi (For the qcc command, use the -l btapi option to link against this library)
Description:
This function initiates the sending of a single file to a remote device. It will trigger the send operation, but does not wait until the operation is completed. Updates on the transfer progress will be provided through the callbacks.
Returns:
0 is returned upon successfully starting transfer,
-1 with the
errno set otherwise. Any
errno value other than the following indicates that a system error has occurred:
- EINVAL: An invalid value was passed in for remote_device_addr or filename.
- EBUSY: A transfer to this device is already in progress.
- EAGAIN: The stack is currently busy. You can try again.
- ENXIO: The remote device does not support the Object Push Profile.