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.

Problem creating a SPP on a PC

Other Parts Discussed in Thread: CC2564MODN, CC2564

Greetings,

Here is the hardware\setup we are using:

1. Panasonic EVAL_PAN1323ETU evaluation board that has a TI CC256x chip 

2. Freescale SoloX Evaluation board with a Cortex A9 processor (i.MX 6)

3. Yocto Linux with BlueZ 5.28 stack

4. TIInit_6.7.16.bts ( found here: https://e2e.ti.com/support/wireless_connectivity/bluetooth_cc256x/f/660/t/441580

 

We use the hciattach utility that comes with BlueZ to load the combined initialization script and add-on script.

So far we are not able to set up a serial port profile (SPP)...i.e. it does not show up as a serial port (COM port) on a PC.

Ubuntu Linux on the other hand can talk to the module via a rfcomm socket (or port).

 

Our questions: 

1. Will this setup work for a PC? Will it show as a SPP port?

2. If yes, what are the right combination in terms of versions: BlueZ, TI's scripts, and chip version?

Any help on this matter would be greatly appreciated!

  • Hi,

    The e2e link with the TIInit_6.7.16.bts is for CC2564MODN (based on CC2564B). The Panasonic module PAN EVAL_PAN1323ETU that you are using is based on the older CC2564 (not B). You will need to use the bts file from this download page for the PAN1323.

    Best regards,

    Vihang

  • Here is the situation,

    The PAN EVAL_PAN1323ETU BT module we are using has a PAN1326 radio on it. Not a PAN1323.
    These are different with respect to the .bts files that must be loaded because each of those parts has a different ROM running it.

    When we try to load any of the .bts from the service pack that is referenced in their E2E posting, we get,

    root@imx6sxsabresd:~# hciattach /dev/ttymxc4 texas 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 hci0: Device or resource busy (16)Can't initialize device: Device or resource busy

    which indicates that the firmware did not execute.

    We found this thread,

    e2e.ti.com/.../441580

    which offers a "merged" .bts for the PAN1326. This merged .bts combines the base 4.0 firmware and the BLE extension into a single load. This .bts loads and executes correctly on our PAN1326 radio.

    However, we then encounter the serial port profile issue with Windows and potentially the inability to run the UART at 3000000 bps.

    We need a proper, supported .bts file for the PAN1326 that will operate at
    3 Mbps with the BlueZ 5.28 stack.

    TI can either provide such as a "merged .bts file" or they can provide us with the tool to take the two seperate .bts from their official service pack and marge it into a single .bts file, which is what BlueZ "hciattach" needs to load.

    Without one of those solutions, it is not likely we will get the PAN1326 working with BlueZ.
  • Hi,

    The HCI tester tool can be used to merge the two bts files into 1. It can be downloaded as part of the Wireless Tools package. 

    Best regards,

    Vihang

  • I am helping Jason with this issue and we appreciate the link to the Wireless Tools package. I have that software installed and the .bts files from the v1.5 service pack available but it is not at all obvious how to correctly merge the two .bts with the HCITester tool. There is no discussion of "merging" in the documentation as far as I could find. Can you provide some instructions on the proper way to do this merge and create a single .bts from the two? I have used HCITester in the past to modify a few parameters but I have never done a merge with it. Where does the BLE-add on get inserted into the base 4.1 .bts for example?

    Also, how can we ensure that the baud rate used by the PAN1326 after this merged .bts is loaded, will be 3000000 bps? The hciattach will expect to run the UART at this rate.
  • I'm trying to reply to this seeking more help but my replies are not showing up
  • Hi,

    First of all, the the PAN1326 is based on CC2564 and PAN1326B is based on CC2564B. Please refer to the datasheet and verify if your module is based on CC2564 or the CC2564B. You will need to use the appropriate initscript for the TI Device inside it. 

    Follow these steps to combine initscripts-TIInit_6.7.16_bt_spec_4.1.bts and initscripts-TIInit_6.7.16_ble_add-on.bts. (Assuming your module has CC2564B)

    1. Open initscripts-TIInit_6.7.16_bt_spec_4.1.bts in HCITester.

    2. The first command HCI_VS_Update_Uart_HCI_Baudrate in the bts file sets the baud rate of 115200 bps (0x0001c200). You will need to change this parameter to 3000000 bps (0x002DC6C0) to ensure the CC256x will switch to 3mbps baud rate after sending the HCI_Command_Complete_VS_Update_Uart_HCI_Baudrate_Event.

    3. There are 2 HCI_VS_Sleep_Mode_Configurations command in the initscripts-TIInit_6.7.16_bt_spec_4.1.bts. Line 105 and Line 137. Comment the Line 105 and Line 106 with # at the beginning.

    4. Open initscripts-TIInit_6.7.16_ble_add-on.bts in HCITester.

    5. Copy the content of the initscripts-TIInit_6.7.16_ble_add-on.bts between the Wait_HCI_Command_Complete_VS_Fast_Clock_Configuration_btip_Event and the Send_HCI_VS_Stop_VS_Lock lines of the initscripts-TIInit_6.7.16_bt_spec_4.1.bts.

    6. Save the merged file under different name.

    This should do it.


    I would like to point out that the officially supported stack on CC256x is the TI Dual Mode Bluetooth Stack and BlueZ is not officially supported. The support regarding any stack issues that may arise from integrating the CC256x with BlueZ may be sought from BlueZ support forums.


    Best regards,

    Vihang

  • Vihang, thank you for this information. It does help. We had figured out the baud rate adjustment and had that working while we waited for your response. Where to paste the ble_add-on script into the other was the remaining missing piece.

    Our hardware is clearly stamped "PAN1326" on the metal can. There is no "B" suffix so we have been basing the firmware choice on that. Is it possible to more accurately determine given the BDADDR that the device exhibits? ie, one of ours is 00:17:E9:D3:55:68. Can we determine from that whether the module contains CC2564 or CC2564B?

    Chris
  • It appears that even though our module is stamped "PAN1326" (without any "B"), it does contain a CC2564B radio. I conclude this because the CC2564 .bts (bluetooth_init_cc2564_2.14.bts) fails to load. The hciattach for our radio requests the file "TIInit_6.7.16", which is the .bts file found in the CC2564B service pack. I have now merged and modified for 3Mbps, the v1.5 firmware from the latest service pack for CC2564B and successfully loaded it on our radio. Now we can pursue the original problem of pairing and Serial Port Profile functionality with a Windows computer.

    Thank you for your help Vihang.

    Chris
  • Vihang,

    We continue to struggle with no ability to get the PAN1326/CC2564B to operate with Serial Port Profile (SPP) to a Windows box.  I have tried many combinations of .bts service pack, especially v1.5 as recommended earlier in this thread, and this does not help our situation.

    On this embedded Linux platform, if we use a USB BT dongle and keep all of the other BlueZ stack components constant, we can successfully pair and operate the serial port profile between the Linux platform and a Windows computer.   But when we change to using the PAN1326/CC2564B radio, connected over UART with "hciattach", we never see the Serial Port Profile exposed.  We can pair with the Linux platform and see other services over Bluetooth but the Serial Port Profile never appears.

    We also know that the Serial Port Profile is operating somewhat because we can connect to this embedded Linux platform from a Linux desktop system and get a successful Serial Port Profile connection between the two Linux environments.   It is really that the Windows platform is not seeing the SPP service advertised for some reason only when we are using the PAN1326/CC2564B device.

    How can we get to the bottom of this?

    Chris

  • Hi Vihang,

    Team wanted to remind TI that there is no issue with the SAME BlueZ stack (identical version 5.28) talking through a USB BT dongle and getting full discovery of the SPP service. The failing case is UART connected PAN1326 not BlueZ in general. So, is there something based on this you could identify in the .bts or Firmware?

    Btw, what stack do you recommend for our hardware and Linux setup if BlueZ is not it?

    Mark
  • Hi Mark,

    The initscript in the .bts file or the FW running on the CC2564 device does not have anything exclusively related to the Serial Port Profile or the Service Discovery Protocol. All of that is handled in the bluetooth stack running on the host (BlueZ in this case). The FW of the CC2564 is reponsible for managing the Link Layer and Baseband Layer of the connection. Higher level protocols like Service Discovery Protocol and profiles such as SPP are handled by the host stack. Please refer to the Bluetooth specifications to understand these roles.

    Since the device is working and registering SPP profile with certain devices and not working properly with PC, it is a stack issue. I would recommend leveraging the BlueZ support forums to debug this issue.

    TI Dual Mode Bluetooth stack is the recommended stack. Only this stack is supported through these forums. 

    Best regards,

    Vihang