ble_gatt_client
|
various bluetooth functions More...
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include "bluetooth.h"
#include "hci.h"
Go to the source code of this file.
Functions | |
void | baswap (bdaddr_t *dst, const bdaddr_t *src) |
char * | batostr (const bdaddr_t *ba) |
bdaddr_t * | strtoba (const char *str) |
int | ba2str (const bdaddr_t *ba, char *str) |
int | str2ba (const char *str, bdaddr_t *ba) |
int | ba2oui (const bdaddr_t *ba, char *str) |
int | bachk (const char *str) |
int | baprintf (const char *format,...) |
int | bafprintf (FILE *stream, const char *format,...) |
int | basprintf (char *str, const char *format,...) |
int | basnprintf (char *str, size_t size, const char *format,...) |
void * | bt_malloc (size_t size) |
void | bt_free (void *ptr) |
int | bt_error (uint16_t code) |
const char * | bt_compidtostr (int compid) |
various bluetooth functions
Definition in file bluetooth.c.
int ba2oui | ( | const bdaddr_t * | ba, |
char * | str | ||
) |
Definition at line 107 of file bluetooth.c.
int ba2str | ( | const bdaddr_t * | ba, |
char * | str | ||
) |
Definition at line 86 of file bluetooth.c.
Referenced by l2cap_le_att_connect().
int bachk | ( | const char * | str | ) |
Definition at line 112 of file bluetooth.c.
Referenced by str2ba().
int bafprintf | ( | FILE * | stream, |
const char * | format, | ||
... | |||
) |
Definition at line 149 of file bluetooth.c.
int baprintf | ( | const char * | format, |
... | |||
) |
Definition at line 137 of file bluetooth.c.
int basnprintf | ( | char * | str, |
size_t | size, | ||
const char * | format, | ||
... | |||
) |
Definition at line 173 of file bluetooth.c.
int basprintf | ( | char * | str, |
const char * | format, | ||
... | |||
) |
Definition at line 161 of file bluetooth.c.
void baswap | ( | bdaddr_t * | dst, |
const bdaddr_t * | src | ||
) |
Definition at line 50 of file bluetooth.c.
Referenced by strtoba().
char* batostr | ( | const bdaddr_t * | ba | ) |
Definition at line 60 of file bluetooth.c.
References bt_malloc().
const char* bt_compidtostr | ( | int | compid | ) |
Definition at line 270 of file bluetooth.c.
int bt_error | ( | uint16_t | code | ) |
Definition at line 196 of file bluetooth.c.
References HCI_ACL_CONNECTION_EXISTS, HCI_AUTHENTICATION_FAILURE, HCI_CLASSIFICATION_NOT_SUPPORTED, HCI_COMMAND_DISALLOWED, HCI_CONNECTION_TERMINATED, HCI_CONNECTION_TIMEOUT, HCI_ENCRYPTION_MODE_NOT_ACCEPTED, HCI_HARDWARE_FAILURE, HCI_HOST_TIMEOUT, HCI_INSUFFICIENT_SECURITY, HCI_INVALID_LMP_PARAMETERS, HCI_INVALID_PARAMETERS, HCI_LMP_ERROR_TRANSACTION_COLLISION, HCI_LMP_PDU_NOT_ALLOWED, HCI_MAX_NUMBER_OF_CONNECTIONS, HCI_MAX_NUMBER_OF_SCO_CONNECTIONS, HCI_MEMORY_FULL, HCI_NO_CONNECTION, HCI_OE_LOW_RESOURCES, HCI_OE_POWER_OFF, HCI_OE_USER_ENDED_CONNECTION, HCI_PAGE_TIMEOUT, HCI_PAIRING_NOT_ALLOWED, HCI_PAIRING_NOT_SUPPORTED, HCI_PARAMETER_OUT_OF_RANGE, HCI_PIN_OR_KEY_MISSING, HCI_QOS_NOT_SUPPORTED, HCI_QOS_REJECTED, HCI_QOS_UNACCEPTABLE_PARAMETER, HCI_REJECTED_LIMITED_RESOURCES, HCI_REJECTED_PERSONAL, HCI_REJECTED_SECURITY, HCI_REPEATED_ATTEMPTS, HCI_ROLE_SWITCH_PENDING, HCI_SCO_OFFSET_REJECTED, HCI_SLOT_VIOLATION, HCI_TRANSACTION_COLLISION, HCI_UNKNOWN_COMMAND, HCI_UNKNOWN_LMP_PDU, HCI_UNSUPPORTED_FEATURE, HCI_UNSUPPORTED_LMP_PARAMETER_VALUE, and HCI_UNSUPPORTED_REMOTE_FEATURE.
void bt_free | ( | void * | ptr | ) |
Definition at line 190 of file bluetooth.c.
Referenced by hci_lmtostr().
void* bt_malloc | ( | size_t | size | ) |
Definition at line 185 of file bluetooth.c.
Referenced by batostr(), hci_commandstostr(), hci_dflagstostr(), hci_lmtostr(), lmp_featurestostr(), and strtoba().
int str2ba | ( | const char * | str, |
bdaddr_t * | ba | ||
) |
Definition at line 92 of file bluetooth.c.
References bachk().
Referenced by hci_devid(), main(), and strtoba().
bdaddr_t* strtoba | ( | const char * | str | ) |
Definition at line 73 of file bluetooth.c.
References baswap(), bt_malloc(), and str2ba().