Hi, I am trying to create an application (c/cpp) that would allow me to send custom commands to the CSR8510 Bluetooth chip on my development board. I was able to find out from the bluedroid source that the function being used to perform such actions is *btu_hcif_send_cmd *and that this function is available in the bluetooth.default.so library. I tried linking the bluetooth.default.so library to my application which was using *btu_hcif_send_cmd *and* osi_malloc *functions. The code snippet I used is below.
* uint8_t controllerID = LOCAL_BR_EDR_CONTROLLER_ID; size_t cmdSize = HCI_CMD_BUF_SIZE; cmdPacket = (BT_HDR*)osi_malloc(cmdSize); cmdPacket->event = 0; cmdPacket->offset = 0; cmdPacket->layer_specific = 0; cmdPacket->len = HCIC_PREAMBLE_SIZE; /*! RESET Command doesn't have any parameters */ cmdStream = cmdPacket->data; UINT16_TO_STREAM(cmdStream, HCI_RESET); UINT8_TO_STREAM(cmdStream, 0); /*! RESET Command doesn't have any parameters */ btu_hcif_send_cmd(controllerID, cmdPacket);* However, I keep getting the following undefined reference errors when trying to compile the application within the AOSP build. error: undefined reference to 'osi_malloc(unsigned int)' error: undefined reference to 'btu_hcif_send_cmd(unsigned char, BT_HDR*)' Could someone please tell me if I am doing this right and if not, how to do what I want to achieve properly? Regards, Tijo -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.