Hi all,
I am having an issue trying to change the baud rate on my CC2564B to 3000000 baud. I have used a variety of different init scripts, and it seems that only the scripts which specify a 115200 baud rate will work. I am on a TI DM8148 host processor which has been used in the past with some WiLink module that worked fine at 3 megabaud. When I run the hciattach command, i get the following output:
root@ti814x-unified:~# hciattach -s 115200 /dev/ttyO5 texas B3000000 Found a Texas Instruments' chip! Firmware file : /lib/firmware/ti-connectivity/TIInit_6.7.16.bts Loaded BTS script version 1 texas: changing baud rate to 3000000, flow control to 1 Can't init device hci0: Device or resource busy (16)Can't initialize device: Device or resource busy
Here is an strace of the hciattach:
root@ti814x-unified:~# strace hciattach -s 115200 /dev/ttyO5 texas B3000000 execve("/usr/bin/hciattach", ["hciattach", "-s", "115200", "/dev/ttyO5", "texas", "B3000000"], [/* 11 vars */]) = 0 brk(0) = 0x2b000 uname({sys="Linux", node="ti814x-unified", ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400eb000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=65017, ...}) = 0 mmap2(NULL, 65017, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4014e000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0(W\1\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1179832, ...}) = 0 mmap2(NULL, 1221884, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40205000 mprotect(0x40322000, 32768, PROT_NONE) = 0 mmap2(0x4032a000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11d) = 0x4032a000 mmap2(0x4032d000, 9468, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4032d000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400bd000 set_tls(0x400bd4c0, 0x400bdb98, 0x400c6050, 0x400bd4c0, 0x400c6050) = 0 mprotect(0x4032a000, 8192, PROT_READ) = 0 mprotect(0x400c5000, 4096, PROT_READ) = 0 munmap(0x4014e000, 65017) = 0 rt_sigaction(SIGALRM, {0x9a40, [], SA_NOCLDSTOP|0x4000000}, NULL, 8) = 0 setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={10, 0}}, {it_interval={0, 0}, it_value={0, 0}}) = 0 open("/dev/ttyO5", O_RDWR|O_NOCTTY) = 3 ioctl(3, TCFLSH, 0x2) = 0 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B9600 opost isig icanon echo ...}) = 0 ioctl(3, SNDCTL_TMR_START or TCSETS, {B9600 -opost -isig -icanon -echo ...}) = 0 ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0 ioctl(3, TCFLSH, 0x2) = 0 write(3, "\1\1\20\0", 4) = 4 read(3, "\4", 1) = 1 read(3, "\16\f", 2) = 2 read(3, "\1\1\20\0\6\0\0\6\r\0\220\33", 12) = 12 write(2, "Found a Texas Instruments' chip!"..., 33Found a Texas Instruments' chip! ) = 33 write(2, "Firmware file : /lib/firmware/ti"..., 64Firmware file : /lib/firmware/ti-connectivity/TIInit_6.7.16.bts ) = 64 brk(0) = 0x2b000 brk(0x4c000) = 0x4c000 open("/lib/firmware/ti-connectivity/TIInit_6.7.16.bts", O_RDONLY) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=10475, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4019f000 read(4, "BTSB\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096 write(2, "Loaded BTS script version 1\n", 28Loaded BTS script version 1 ) = 28 write(3, "\0016\377\4\300\306-\0", 8) = 8 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\0016\377\0", 4) = 4 write(2, "texas: changing baud rate to 300"..., 56texas: changing baud rate to 3000000, flow control to 1 ) = 56 ioctl(3, TCFLSH, 0x2) = 0 ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0 ioctl(3, TCFLSH, 0x2) = 0 ioctl(3, SNDCTL_TMR_START or TCSETS, {B3000000 -opost -isig -icanon -echo ...}) = 0 write(3, "\0017\376\2\7\20", 6) = 6 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\0017\376\0", 4) = 4 write(3, "\1\5\377\377@a\10\0\372\7\20G \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377:b\10\0\372(5\0016\2.\330\323\0\230D`\7H30\0\220\377\275\300F\223"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\3774c\10\0\372\342H \"\22\\\1*\22\321\t\\\0)\17\320A\177\10)\f\321\t"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377.d\10\0\372\377-;\3208\34)\34\246F\327J\376D\20G\327H\2!\246F\326"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377(e\10\0\372OM$\320h84\321\377 }0\200]\r(/\321 i\1x0"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\"f\10\0\372@!\31@\336\21\366\0011C\22\321,\33\\I\2061\tx\t\2\214"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\34g\10\0\372Y\25\10\0\205\207\4\0?\203\2\0\21$\3\0\370\265\16\34\4\34\0"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\26h\10\0\372\376D\10G\0(\366\321\3\340\337Ij1\0\230\1b\f7\1=\347"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\20i\10\0\372\6%(\34\1\340\7 \6%0p\00160\34\r!\1$\246F\271"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\nj\10\0\372\10\0U1\31\0>\246\33\0Gq\10\0\255\231\0\0000\265\1i\302"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\4k\10\0\372\6\334\22x\266\32\3\340\26x\0+\0\334vB\337J\22x\335K\32"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 read(4, "\0\1@\0300b\360\2751O\10\0\347*\0\0\373O\10\0\211\221\4\0\312\4\0\0a\336\0\0"..., 4096) = 4096 write(3, "\1\5\377\377\376k\10\0\372_ \0\1@\0300b\360\2751O\10\0\347*\0\0\373O\10\0\211"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\370l\10\0\372\360\275\20\265ILCH\4\200\1 \206F\277H\376D\0G\276I\10"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\362m\10\0\372$#\1%\256F\210M\376D(G\35444b\360\275`a\10\0Q"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\354n\10\0\372\20GW!\t\1\311Y\246FSJ\376D\20G\">\361Y\246FP"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\346o\10\0\372\4\0\201*\0\0\25_\5\0003O\10\0\0\0\10\0\201\224\3\0\331"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\340p\10\0\372\236F\335K\376D\30G\0\4\0\f\4(\6\335l\215\300\36\204B\6"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\332q\10\0\372\361\321\250\211@\5@\17\27\320\7 \0\2h\201/\202\353H(\201,"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\324r\10\0\372S0\367F\301hCh\nx\f*\7\321\273J\22x\0*\1\321\6"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\316s\10\0\372\1$\244\2\5\340\1 \206F\346H\376D\0G\1<\250xix\t"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\310t\10\0\372\240i``\310H\2010\370\275\311H\0330\367F\255E\5\0\245!\10"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\302u\10\0\372\4\0\271(\5\0Da\10\0\333\"\3\0001O\10\0]\206\2\0\347"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\274v\10\0\3720\211\0(\t\321J!\1\230\10\\\0(\4\321\2/\2\320\377!\2"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\266w\10\0\372p\275'He0\367F\300F\37\3\0\0\337\207\4\0\24$\10\0\31"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377e\260x\10\0`\376\367\374\375\377\275\377\265hF\376\367\203\377\377\275\377\265hF\376\367*"..., 105) = 105 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\215x{\10\0\210\0\265\370\360A\372\0\275gp\10\0\301r\10\0\37r\10\0Or\10"..., 145) = 145 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\205\4\363\32\0\200\36\215\0\0,#\3\0:\337\2\0:\32\2\0d\206\2\0\350(\5"..., 137) = 137 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 read(4, "\7\0\0\0\4\16\4\0\5\377\0\1\0\3\1\1\5\377\377\0\0\30\0\372\360\265_N\7\"2p"..., 4096) = 2283 write(3, "\1\5\377\377\0\0\30\0\372\360\265_N\7\"2p\20#spG \260p \360p\3%("..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\372\0\30\0\3727N3\200\2p8J\23\200O0\4p\t !!\311\0\17\"5"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\377\364\1\30\0\372\303\216\3\0006\2\32\0\265\365\4\0\240\27\10\0\313\7\4\0\7X\2"..., 259) = 259 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\267\356\2\30\0\262#J\nd\22\"\2q\"HHd\0 #I\10\200#I\10\200\31"..., 187) = 187 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\5\377\361\240N\30\0\354p\265\6\34,L\240\212\17(\35\332 \211\0(\32\320*H\4!\1"..., 245) = 245 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\5\377\0", 4) = 4 write(3, "\1\203\377\24y{\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 24) = 24 read(3, "\4", 1) = 1 read(3, "\16\4", 2) = 2 read(3, "\1\203\377\0", 4) = 4 nanosleep({0, 50000}, NULL) = 0 ioctl(3, TCFLSH, 0x2) = 0 ioctl(3, SNDCTL_TMR_START or TCSETS, {B3000000 -opost -isig -icanon -echo ...}) = 0 ioctl(3, TIOCSETD, [15]) = 0 ioctl(3, UI_BEGIN_FF_UPLOAD, 0x4) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({1, 0}, 0xbeeceaa0) = 0 ioctl(3, UI_BEGIN_FF_ERASE, 0) = 0 socket(PF_BLUETOOTH, SOCK_RAW|SOCK_CLOEXEC, 1) = 5 bind(5, {sa_family=AF_BLUETOOTH, sa_data="\0\0\0\0\354\276\3\0\0\0\20\374\354\276"}, 6) = 0 ioctl(5, 0x400448c9, 0) = -1 EBUSY (Device or resource busy) write(2, "Can't init device hci0: Device o"..., 52Can't init device hci0: Device or resource busy (16)) = 52 close(5) = 0 close(3) = 0 write(2, "Can't initialize device: Device "..., 49Can't initialize device: Device or resource busy ) = 49 exit_group(1)
As a note, I am using bluez 5.39. I have also attached an example bts script I have used. What am I missing here? Any pointers would be appreciated.
BTSB R #-------------------------------------------------------------------------------- 8 # Description : Orca L PG 2.0 ROM Initialization Script # "