This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to initialize CC2564B in Linux?

I want to use CC2564B in my Linux-System.

The following steps are done:
1.) download “initscripts-TIInit_6.7.16_bt_spec_4.0.bts” from  http://processors.wiki.ti.com/index.php/CC256x_Downloads

2.) # cp initscripts-TIInit_6.7.16_bt_spec_4.0.bts /lib/firmware/ti-connectivity/

3.) # hciattach -s 115200 /dev/ttyUSB0 texas 115200

Problem:

# hciattach -s 115200 /dev/ttyUSB0 texas 115200

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 115200, flow control to 1
Can't init device hci1: Device or resource busy (16)Can't initialize device: Device or resource busy

#

Why “initscripts-TIInit_6.7.16_bt_spec_4.0.bts” is not working as linux firmware file?

The same steps (1-3) are working with file “initscripts-TIInit_6.7.16_ble_add-on.bts”.
But a CC2564B with “initscripts-TIInit_6.7.16_ble_add-on.bts” as firmware does not found any other bluetooth device? Why?

  • Hi,

    Can you please check if the attached SP is okay?


    Regards,
    Gigi Joseph.
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/538/5444.initscripts_2D00_TIInit_5F00_6.7.16_5F00_bt_5F00_spec_5F00_4.0_2D00_MOD.bts

  • Hi, 

    The attached SP (initscripts-TIInit_6.7.16_bt_spec_4.0-MOD.bts) is not working. sorry.

    # cp initscripts-TIInit_6.7.16_bt_spec_4.0-MOD.bts /lib/firmware/ti-connectivity/TIInit_6.7.16.bts
    # hciattach -s 115200 /dev/ttyUSB0 texas 115200
    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 115200, flow control to 1
    Can't init device hci1: Device or resource busy (16)Can't initialize device: Device or resource busy
    #

    _________________

    2. Try  

    # strace hciattach -s 115200 /dev/ttyUSB0 texas 115200
    execve("/bin/hciattach", ["hciattach", "-s", "115200", "/dev/ttyUSB0", "texas", "115200"], [/* 23 vars */]) = 0
    brk(0) = 0x7fcbb209d000
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcbb1891000
    access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=191563, ...}) = 0
    mmap(NULL, 191563, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fcbb1862000
    close(3) = 0
    open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
    read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \10\2\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=2095280, ...}) = 0
    mmap(NULL, 3930656, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fcbb1095000
    mprotect(0x7fcbb124c000, 2093056, PROT_NONE) = 0
    mmap(0x7fcbb144b000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b6000) = 0x7fcbb144b000
    mmap(0x7fcbb1451000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fcbb1451000
    close(3) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcbb1861000
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcbb1860000
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcbb185f000
    arch_prctl(ARCH_SET_FS, 0x7fcbb1860700) = 0
    mprotect(0x7fcbb144b000, 16384, PROT_READ) = 0
    mprotect(0x7fcbb1892000, 4096, PROT_READ) = 0
    mprotect(0x7fcbb1675000, 4096, PROT_READ) = 0
    munmap(0x7fcbb1862000, 191563) = 0
    rt_sigaction(SIGALRM, {0x7fcbb167d540, [], SA_RESTORER|SA_NOCLDSTOP, 0x7fcbb10c9a50}, NULL, 8) = 0
    alarm(10) = 0
    open("/dev/ttyUSB0", O_RDWR|O_NOCTTY) = 3
    ioctl(3, TCFLSH, 0x2) = 0
    ioctl(3, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(3, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(3, TCGETS, {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", 12) = 6
    read(3, "\0\6\r\0\220\33", 6) = 6
    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) = 0x7fcbb209d000
    brk(0x7fcbb20be000) = 0x7fcbb20be000
    brk(0) = 0x7fcbb20be000
    open("/lib/firmware/ti-connectivity/TIInit_6.7.16.bts", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0640, st_size=9100, ...}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcbb1890000
    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\0\302\1\0", 8) = 8
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\0016\377", 4) = 3
    read(3, "\0", 1) = 1
    write(2, "texas: changing baud rate to 115"..., 55texas: changing baud rate to 115200, flow control to 1
    ) = 55
    ioctl(3, TCFLSH, 0x2) = 0
    ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(3, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(3, TCFLSH, 0x2) = 0
    ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(3, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    write(3, "\1\3\377\0061O\10\0\1\0", 10) = 10
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\1\3", 4) = 2
    read(3, "\377\0", 2) = 2
    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\320b\10\0\372\7\20G\32\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\312c\10\0\372(5\0016\2.\330\323\0\230D`\10H30\0\220\377\275\300F\255"..., 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\304d\10\0\372\235w&K\313a\t#\223p%J\nb\n\"\242w$JJb\v"..., 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\276e\10\0\372\246F\344J\376D\20G\0(\f\324\343H\0x\4(\10\321\342H\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\270f\10\0\372\206F\330H\376D\0G\2 \240p\326H\3120(b0\275\370\265\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\262g\10\0\372\"\335hqp\275(x\0(\35\321\340N0\34\1$\246F\337I\376"..., 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\254h\10\0\372\226F\334J\376D\20G\2 0U\332I\227 \300\0@\30(bp"..., 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\246i\10\0\372\30\30\20\275\300FP\27\10\0\0\4\32\0\265\365\4\0\371\25\5\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\240j\10\0\372\207m\10\0)n\10\0\360\265\7\34\271iHx\376i\2\37;\320!"..., 259) = 259
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\1\5\377\0", 4) = 4
    read(4, "\25q\10\0\255\231\0\0\370\265\340H\0\210\300\10\337L\"\210\350I\212B9\320\350I\tx\3)"..., 4096) = 4096
    write(3, "\1\5\377\377\232k\10\0\372 b\20\275\300Fi}\2\0\362b\10\0\223\344\4\0..\10\0000"..., 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\224l\10\0\372\0\222\323J\267B\21\321vF6\0066\26^CgF>A\0-\4"..., 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\216m\10\0\372\1 \206F\241H\376D\0G\240I\10`\215H\4\200D\200\20\275\315"..., 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\210n\10\0\372\0Gx\275\373O\10\0\211\221\4\0a\336\0\0\360\265\207\260\6\220k"..., 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\202o\10\0\3720\34\0228\304Q\10 \300\31\4!\256F3J\376D\20G\263 \300"..., 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|p\10\0\372\221B\7\320@i@0,!\1\"\226F\350J\376D\20G\347H+"..., 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\377vq\10\0\372d \246F\337I\376D\10Gh\36\5\6-\16!\340d \1!\216"..., 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\377pr\10\0\372`\212\0018`\202\0 \313I\10`\1 \206F\316H\376D\0Gh"..., 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\377js\10\0\372\10C\246L\n\320\0 \243I\10p\1 \206F\242H\376D\0G "..., 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\377dt\10\0\372\256FsI\376D\10G\0x\250!ACqHG\\8\34\256Fp"..., 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^u\10\0\372DJ\376D\20G\1\34CH\246FCJ\376D\20GBH;0\370"..., 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\313Xv\10\0\306y\225\1\0)\331\0\0\21\336\2\0\24T\10\0\347Y\5\0\"`\32"..., 207) = 207
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\1\5\377", 4) = 3
    read(3, "\0", 1) = 1
    write(3, "\1\5\377\215x{\10\0\210\0\265\370\360A\372\0\275wp\10\0\251r\10\0\7r\10\0007r\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", 4) = 3
    read(3, "\0", 1) = 1
    write(3, "\1\5\377\377\0\0\30\0\372\360\265@N\7\"2p\20#spG \260p\32 \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\377s\372\0\30\0n\30K\32\200\1p\360\275\300F\370O\10\0{\210\4\0\306\5\0\0e"..., 119) = 119
    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", 2) = 1
    read(3, "\4", 1) = 1
    read(3, "\1\203\377\0", 4) = 4
    read(4, "te_VS_Sleep_Mode_Configurations_"..., 4096) = 908
    write(3, "\1\t\375\10X`\32\0\0\20\0\20", 12) = 12
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\1\t", 4) = 2
    read(3, "\375\0", 2) = 2
    write(3, "\1\t\375\10\20`\32\0\20\0\20\0", 12) = 12
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\1\t\375", 4) = 3
    read(3, "\0", 1) = 1
    write(3, "\1v\3751\1!T\0\0aW\0\0\24\5\n\5\0\7\6\n\4\5\10\t\v\f\r\16\20\20\20"..., 53) = 53
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\1v\375\0", 4) = 4
    write(3, "\1\200\375\6\0\1\0\0\0\1", 10) = 10
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\1", 4) = 1
    read(3, "\200\375\0", 3) = 3
    write(3, "\1\200\375\6<\360_\0\0\0", 10) = 10
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\1\200\375\0", 4) = 4
    write(3, "\1\34\375\24\377\210\23\0\0\320\7\0\0\377\377\1\377\377\377\372\0\0\0\0", 24) = 24
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\1\34\375\0", 4) = 4
    write(3, "\0018\376\0", 4) = 4
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\0018", 4) = 2
    read(3, "\376\0", 2) = 2
    write(3, "\1\34\375\24\1\210\23\0\0\320\7\0\0\377\377\4\377\377\377\372\0\0\0\0", 24) = 24
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\1", 4) = 1
    read(3, "\34\375\0", 3) = 3
    write(3, "\1+\375\5\20\0P\0\226", 9) = 9
    read(3, "\4", 1) = 1
    read(3, "\16\4", 2) = 2
    read(3, "\1+\375\0", 4) = 4
    nanosleep({0, 50000}, NULL) = 0
    ioctl(3, TCFLSH, 0x2) = 0
    ioctl(3, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(3, TCGETS, {B115200 -opost -isig -icanon -echo ...}) = 0
    ioctl(3, TIOCSETD, [15]) = 0
    ioctl(3, _IOC(_IOC_WRITE, 0x55, 0xc8, 0x04), 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}, 0x7ffd3a78b070) = 0
    ioctl(3, _IOC(_IOC_READ, 0x55, 0xca, 0x04), 0) = 1
    socket(PF_BLUETOOTH, SOCK_RAW|SOCK_CLOEXEC, 1) = 5
    bind(5, {sa_family=AF_BLUETOOTH, sa_data="\1\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 6) = 0
    ioctl(5, HCIDEVUP, 0x1) = -1 EBUSY (Device or resource busy)
    write(2, "Can't init device hci1: Device o"..., 52Can't init device hci1: 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) = ?
    +++ exited with 1 +++
    #

  • Hi,

    It looks like the firmware download is almost complete (except for the sleep command). It seems to me that there is a conflict for the HCIDEVUP ioctl. Can you please share the .config that you have? Please note that there should be only one BT driver enabled.

    Please also enable: CONFIG_BT_HCIUART_LL.

    Regards,
    Gigi Joseph.
  • ...
    CONFIG_BT_HCIUART_LL=y
    ...

    "CONFIG_BT_HCIUART_LL" was and is enabled. sorry.

    Regards,
    Eik Binschek

  • Hi Eik,

    Can you paste the below information from your setup?

    # zcat /proc/config.gz | grep CONFIG_BT

    Regards,
    Gigi Joseph.
  • Hi,

    I get the same error when I load those firmwares initscripts-TIInit_6.7.16_bt_spec_4.1.bts or initscripts-TIInit_6.7.16_bt_spec_4.0-MOD.bts, but with the ble firmware initscripts-TIInit_6.7.16_ble_add-on.bts there is no problem hciconfig is well setup when lescan is working too.


    Did you solve this issue ?
    And if yes what has to be done ?


    Best regards,