18a655b4bSMatthias Ringwald# BTstack Port for POSIX Systems with H4 Bluetooth Controller 28a655b4bSMatthias Ringwald 38a655b4bSMatthias Ringwald## Configuration 48a655b4bSMatthias RingwaldMost Bluetooth Bluetooth Controllers connected via UART/H4 require some special configuration, e.g. to set the UART baud rate, and/or require firmware patches during startup. In this port, we've tried to do most of these automatically based on information gathered from the Bluetooth Controller. Here's some Controller specific details: 58a655b4bSMatthias Ringwald 68a655b4bSMatthias Ringwald## TI CC256x 78a655b4bSMatthias RingwaldThe CC2564x needs the correct init script to start up. The Makfile already has entries for most silicon revisions: 88a655b4bSMatthias Ringwald 98a655b4bSMatthias Ringwald- CC2560: bluetooth_init_cc2564_2.14.c 10f2eb0907SMatthias Ringwald- CC2564B: bluetooth_init_cc2564B_1.8_BT_Spec_4.1.c 11*01f72e3dSMatthias Ringwald- CC2564C: bluetooth_init_cc2564C_1.5.c 128a655b4bSMatthias Ringwald 138a655b4bSMatthias RingwaldPlease pick the correct one. The main.c verifies that the correct script is loaded, but the init script is linked to the executable. 148a655b4bSMatthias Ringwald 158a655b4bSMatthias Ringwald## Broadcom BCM/CYW 43430 168a655b4bSMatthias Ringwald 178a655b4bSMatthias RingwaldThe correct firmware file needs to be provided in the current working directory. The Makefile downloads the one for the BCM43430 e.g. found on later Raspberry Pi editions. Please see the separate port/raspi, too. 188a655b4bSMatthias Ringwald 198a655b4bSMatthias Ringwald 208a655b4bSMatthias Ringwald## Compilation 218a655b4bSMatthias Ringwald 228a655b4bSMatthias RingwaldBTstack's POSIX-H4 does not have additional dependencies. You can directly run make. 238a655b4bSMatthias Ringwald 248a655b4bSMatthias Ringwald make 258a655b4bSMatthias Ringwald 268a655b4bSMatthias Ringwald 278a655b4bSMatthias Ringwald## Running the examples 288a655b4bSMatthias Ringwald 298a655b4bSMatthias RingwaldOn start, BTstack prints the path to the packet log and prints the information on the detected Buetooth Controller. 308a655b4bSMatthias Ringwald 318a655b4bSMatthias Ringwald $ ./le_counter 328a655b4bSMatthias Ringwald Packet Log: /tmp/hci_dump.pklg 338a655b4bSMatthias Ringwald BTstack counter 0001 348a655b4bSMatthias Ringwald BTstack up and running on 00:1A:7D:DA:71:13. 358a655b4bSMatthias Ringwald 368a655b4bSMatthias RingwaldPlease note that BTstack will increase the baudrate. Before starting again, you should reset or power-cycle the Bluetooth Controller. 37