mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-27 14:37:12 +00:00
iPhone BT power cycling working\!
This commit is contained in:
parent
70459f982a
commit
d965992270
@ -41,8 +41,10 @@ static hcidump_hdr header_bluez;
|
||||
static pktlog_hdr header_packetlogger;
|
||||
|
||||
void hci_dump_open(char *filename, hci_dump_format_t format){
|
||||
dump_file = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
|
||||
dump_format = format;
|
||||
if (dump_file < 0) {
|
||||
dump_file = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
|
||||
dump_format = format;
|
||||
}
|
||||
}
|
||||
|
||||
void hci_dump_packet(uint8_t packet_type, uint8_t in, uint8_t *packet, uint16_t len) {
|
||||
@ -91,5 +93,6 @@ void hci_dump_packet(uint8_t packet_type, uint8_t in, uint8_t *packet, uint16_t
|
||||
|
||||
void hci_dump_close(){
|
||||
close(dump_file);
|
||||
dump_file = -1;
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,6 @@ static int h4_open(void *transport_config){
|
||||
}
|
||||
|
||||
static int h4_close(){
|
||||
hci_dump_close();
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ int main (int argc, const char * argv[]) {
|
||||
|
||||
bt_control_t * control = NULL;
|
||||
|
||||
#if 1
|
||||
#if 0
|
||||
//
|
||||
if (argc <= 1){
|
||||
printf("HCI Daemon tester. Specify device name for Ericsson ROK 101 007\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user