From d3865d4eec8ce35c85e011f7d19f7e570a07e15f Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Wed, 20 May 2009 21:35:19 +0000 Subject: [PATCH] getting closer, BlueTool init does not work yet --- Makefile.iphone | 1 + bt_control_iphone.c | 4 ++++ src/main.c | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.iphone b/Makefile.iphone index 4f52e11ff..4651ee13d 100644 --- a/Makefile.iphone +++ b/Makefile.iphone @@ -42,6 +42,7 @@ $(SRCS): $(HEADERS) $(NAME): $(SRCS) $(CXX) $(CXXFLAGS) -o $(NAME) $(filter %.mm,$^) $(filter %.m,$^) $(filter %.c,$^) $(LDFLAGS) export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate ; ldid -S $(NAME) + ssh root@192.168.3.102 rm BTdaemon scp $(NAME) root@192.168.3.102:. .PHONY: all clean diff --git a/bt_control_iphone.c b/bt_control_iphone.c index cc6604ad8..78a6f2888 100644 --- a/bt_control_iphone.c +++ b/bt_control_iphone.c @@ -148,6 +148,10 @@ static int iphone_on (void *config){ fflush(outputFile); pclose(outputFile); + + // pause + sleep(3); + return 0; } diff --git a/src/main.c b/src/main.c index ad467f0dd..cadc813bf 100644 --- a/src/main.c +++ b/src/main.c @@ -31,9 +31,9 @@ void event_handler(uint8_t *packet, int size){ // bt stack activated, set authentication enabled if (packet[0] == BTSTACK_EVENT_HCI_WORKING) { - // hci_send_cmd(&hci_write_authentication_enable, 1); + hci_send_cmd(&hci_write_authentication_enable, 1); // hci_send_cmd(&hci_host_buffer_size, 400, 255, 1, 0, 0); - hci_send_cmd(&hci_inquiry, HCI_INQUIRY_LAP, 30, 0); + // hci_send_cmd(&hci_inquiry, HCI_INQUIRY_LAP, 30, 0); } if ( COMMAND_COMPLETE_EVENT(packet, hci_write_authentication_enable) ) {