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.

Linux: Using texas WL1271 chip without bluez

Other Parts Discussed in Thread: WL1271, TI-BT-4-2-STACK-LINUX-ADDON

Tool/software: Linux

Hi,

I’m trying to use BLE connectivity with WL1271 texas chip, but I want my program to be independent from Bluez stack.

 

This way, to open and configure the serial port I’m not using hciattach. Instead I’m opening  the serial port directly on my code and than construct and send packets to execute BLE functions that I want. I already could set scanning parameters, start scanning with returning parameter status successful, but then I can’t receive any scanning results. I could also set the advertising data, advertising parameters and enable advertising. Then on my phone, using nRF connect app, I can see my advertisement correctly. But when I try to connect, I also don’t receive any event informing the connection was completed, so like was happening with scanning, I can’t receive any meta event.

 

I would like to understand if it might be a problem with the firmware version on the chip, since I’m not loading any firmware version throw hciattach. If the firmware loading is required to every initialization, there’s any way to load it without using hciattach?

 

I have one more question, the WL1271 has support for Bluez, but I would like to know if there’s any BLE Texas stack that I can use with this module instead of Bluez. The documentation about this module is not quite clear, so any additional information would be really appreciated.

 

Thanks for your help.

  • Vanessa,

    Vanessa Martins said:
    This way, to open and configure the serial port I’m not using hciattach. Instead I’m opening  the serial port directly on my code and than construct and send packets to execute BLE functions that I want.

    Are you trying to create your own Bluetooth stack? If not, this can be very challenging. You might be better off using another BT stack (e.g. link below).

    Vanessa Martins said:
    I would like to understand if it might be a problem with the firmware version on the chip, since I’m not loading any firmware version throw hciattach. If the firmware loading is required to every initialization, there’s any way to load it without using hciattach?

    Yes, the firmware service-pack (*.bts) must be downloaded to the Bluetooth controller every-time the device is initialized. You can find the service-pack and the version information on the following git : git.ti.com/.../service-packs

    Vanessa Martins said:
    I have one more question, the WL1271 has support for Bluez, but I would like to know if there’s any BLE Texas stack that I can use with this module instead of Bluez. The documentation about this module is not quite clear, so any additional information would be really appreciated.

    The WL127x devices are pretty old, but I would expect it to work with the TI-BT-4-2-STACK-LINUX-ADDON. If your design requirements allow, it is recommended to use one of the newer WL183xMOD devices instead.

    Best regards,

    Vihang

  • First of all thanks a lot Vihang, your answer was really helpful.

    I’m not trying to have my own stack, but bluez is not a good solution for my project because is heavy and needs to have a lot of permissions to run, so I needed to find some other solution. If I could find any TI library lighter it would be better, that’s why I asked about any TI stack for this chip that I’m using.

    About the bts file and the initialization of the chip, there’s any easier way to run this script than the way that hciattach does it? Because now I’m trying to develop a similar solution to the one present on hciattach: opening bts file, read and execute the actions.

    Best regards,
    Vanessa
  • Vanessa,

    Vanessa Martins said:
    I’m not trying to have my own stack, but bluez is not a good solution for my project because is heavy and needs to have a lot of permissions to run, so I needed to find some other solution. If I could find any TI library lighter it would be better, that’s why I asked about any TI stack for this chip that I’m using.

    Please see if the TI dual-mode Bluetooth stack (runs completely in the user-space) meets your requirements.

    Vanessa Martins said:
    About the bts file and the initialization of the chip, there’s any easier way to run this script than the way that hciattach does it? Because now I’m trying to develop a similar solution to the one present on hciattach: opening bts file, read and execute the actions.

    The service-pack download is something used in the implementation of the Bluetooth stack. For reference, you can refer to the TIBTS.c and BTPSVEND.c implementation in the TI Bluetooth stack referenced above.

    Additionally, if you just want to initialize the BT controller and send few HCI commands to it, you can use the SS1Tool (wiki) of the TI Bluetooth stack for that. The SS1tool has the same syntax as the hcitool used in BlueZ stack. The SS1Tool will download the service pack to the device for the first command and then send the specified HCI command. 

    Best regards,

    Vihang