This reverts commit 8a03376544.
The patch needs to be split up and the gdbus/ changes were bogus
compared to the original commit message.
Conflicts:
Makefile.am
Makefile.obexd
profiles/cyclingspeed/cyclingspeed.c
profiles/heartrate/heartrate.c
src/error.c
Instead of trying to include config.h in each file over the tree and
possibly forgetting to include it, give a "-include config.h" argument
to the compiler so it's guaranteed that a) it will be included for all
source files and b) it will be the first header included.
gdbus/ directory is left out, since it would break other projects using
it.
override speed setting if firmware script issues serial settings command,
otherwise the value given in the firmware script will be overridden.
Example:
hciattach /dev/ttyO1 texas 115200
will fail, because /dev/ttyO1 will be opened with 115200 b/s, then
the firmware script will set the buadrate to 3000000 b/s, after UART init
hciattach.c will set the baudrate to 115200, so communication is broken.
The only correct way is to set both speeds:
hciattach -s 115200 /dev/ttyO1 texas 3000000
With this patch only initial speed must be specified. The former semantic
will be preserved in case the firmware script doesn't provide serial
settings action.
Tested with wl1271 and firmware TIInit_7.2.31.bts
The Texas specific initialization code sends HCI commands over the
bluetooth socket, but does not bring up the device. This gives these
errors when running "hciattach /dev/ttyUSB0 texas":
Found a Texas Instruments' chip!
Firmware file : /lib/firmware/TIInit_XX.Y.ZZ.bts
Loaded BTS script version 1
Cannot send hci command to socket: Network is down
Can't initialize device: Network is down