PAN1026 code without SDK


I am using PAN 1026 which I have to connect to PIC micro controller through UART. I want to  use Classic as well as BLE mode.

Instead of using SDK, can I use following steps in simple code for my development

1) As every command is array of hex numbers, I will send it commands in required  sequence and based on response, I will send next command.

2) I can use state machine to use next command.


So is it possible to use above steps so that I can avoid using toshiba SDK and write simple code  ?





3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • As you already noticed, the so-called TCU commands (requests that are sent and responses/events that are received) are based on a straight-forward binary protocol format.

    So in theory it is of course possible to leave out the Bluetooth SDK and send requests and receive responses and events on your own.

    However, you need to consider that every request has input parameters and that every response and event has output parameters. So you need to build requests from parameters and parse parameters from responses and events.

    Additionally you need to follow specific sequences, which are not obvious from reading the documentation alone, but may come from the Bluetooth Core Specification. These sequences, for example handling of the security manager protocol of Bluetooth Low Energy, include a lot of TCU messages that need to be handled correctly.

    And there are certain quirks in the way PAN1026 works, which are properly handled in the Bluetooth SDK and need to be re-implemented by you. These quirks may not documented in the low level TCU specifications.

    For a full-fledged implementation of all the required handling you will probably end up with code that has the same size and complexity when compared to the Bluetooth SDK.

    Especially for a typical Bluetooth Low Energy device, there is not much code you can save from the SDK if you want to have all the basic functionality.

    So I strongly suggest to use Bluetooth SDK instead of hand-crafting your own implementation.

  • Hi Michael,

    Thanks for your reply.

    My main concern is RTOS. SDK is using RTOS whereas I do not want use RTOS. When I go through SDK, there is lot of dependency on RTOS functionality like queues etc which I do not want to use. And replacing this RTOS functionalities is very time consuming task.

    Can you suggest any option for SDK without RTOS ?




  • I have to disagree that the SDK depends on RTOS that is used in the example projects.

    It might not be immediately obvious, but if you look closely at the pure Bluetooth SDK code then you will notice that it only references (callback) functions of the surrounding application. Especially there are no direct references to an RTOS.

    Or in other words: It is totally possible to use the Bluetooth SDK with an RTOS.

    How all the necessary (calloback) functions will implemented is entirely up to the surrounding application.

    For the TMPM369BT/BLE projects FreeRTOS was chosen. But as I said, it is possible to implement the needed functionality without an RTOS as well.

    There is a document that explains how to integrate the Bluetooth SDK into a new environment called software_manual_for_system_integration.pdf. This document explains which functions need to be implemented in your system.

    In short: you need to include all files from the "bluetooth" subfolder, leave out a couple of files that don't match your configuration. The files in the "stub_functions" folder only contain empty stubs which you need to fill with the real functionality. If you start with "uart_api_implementation.c" and "bt_api_implementation.c" then you have basically everything for the Bluetooth Classic parts of PAN1026.

    If you need an explanation how they can be implemented, then you need to check out software_manual_for_host-based_systems.pdf, which shows the general concepts of using a host-based setup, but of course using the FreeRTOS environment.

Like Follow
  • Status Answered
  • 1 yr agoLast active
  • 3Replies
  • 1055Views
  • 3 Following