2 Replies Latest reply on Jul 8, 2017 5:13 AM by anpm

    BLE node working as Central or Peripheral for data transfer.

    mritunjay83_2540811

      Hi All,

         

      I am working on a Cypress BLE device for implementing below requirement:
      1. We have same devices "CYBLE-012011-00 31-SMT" on all BLR node.
      2. Each of these nodes will have same board schematics and same firmware.
      3. Each devices will send custom beacons on certain intervals.
      4. Each devices will scan custom beacons.
      5. Based on events generated/timer interval one BLE node has to switch to central mode and should be ready to accept connection from other BLE node.
      6. Other BLE node can connect to central/server BLE node and request custom data which could be 100 bytes in length.

      I have few questions after going through Cypress BLE example and code.
      Questions:
      1. What type of GAP profile is suited for above requirement?
      2. Can we send 90 bytes data at once?
      3. Is Dynamic switching between Central and Peripheral role supported? In between we want be in Observer and broadcast mode also to see eligible node for data transfer.
      4. Is Day049_BLE_Mesh_Flood is verified for Psoc 4.0 and device "CYBLE-012011-00 31-SMT".

         

      5. I can see in code RESTART_BLE_STACK is done whenever role are switched between Central to Peripheral  role. Is this recommended for "CYBLE-012011-00".

         

      Thanks,

         

      Mritunjay

        • 1. Re: BLE node working as Central or Peripheral for data transfer.
          e.pratt_1639216

          1. In order to switch between peripheral and central you will need to setup a custom BLE profile. The "standard" roles for the BLE profiles don't contain enough flexibility for switching between central and peripheral from what I've seen.

             

          2. Yes, the maximum MTU size is 512 bytes I believe

             

          3. Yes, switching between modes is possible; You have to define the software/firmware and settings for each mode, as well as handle switching between them. See above comment about needing custom BLE profile to implement dynamic profile switching.

             

          4. The project day 49 contains a PDF describing its operation/compatibility; Yes, it should work with PSoC 4 devices. And I believe it will work with the specific chip you named (given code-size fits).

             

          5. It is not required to reset/restart between role switches, but it is required to make sure all of the radio transmissions are off/not active when switching modes. Otherwise, you will run into hard fault errors and crashing of the radio/unit when trying to call BLE functions. Generally, I setup my software to try to handle everything without resetting when things are "working", that way the unit will know something went wrong if it resets. But, that is a coding architecture, and it is entirely preference/usage.

          • 2. Re: BLE node working as Central or Peripheral for data transfer.
            anpm

            Hi Mritunjay,

               

            1) What type of GAP profile is suited for above requirement?

               

            => You can use a Custom profile

               

            2) Can we send 90 bytes data at once?

               

            =>  If in adv mode (before connection) (max is 31 byte adv data and 31 byte scan response data) . If you are asking about after connection, then you can send 90 bytes at once.

               

            3) Is Dynamic switching between Central and Peripheral role supported? In between we want be in Observer and broadcast mode also to see eligible node for data transfer. 

               

            => Yes, dynamic switch of peripheral and Central is possible.

               

            4) Is Day049_BLE_Mesh_Flood is verified for Psoc 4.0 and device "CYBLE-012011-00 31-SMT".

               

            => The FW will work for all CyBLE devices.

               

            You just need to select correct pins. Also when using EZ BLE modules like CYBLE-012011-00, please set ECO cap trim value in FW as in following KBA: http://www.cypress.com/knowledge-base-article/eco-capacitance-trim-values-ez-ble-modules-kba218990

               

            5) I can see in code RESTART_BLE_STACK is done whenever role are switched between Central to Peripheral  role. Is this recommended for "CYBLE-012011-00".

               

            => Where did you see RESTART_BLE_STACK ? Its not needed to restart the BLE stack.

               

            Thanks,
            Anjana