4 Replies Latest reply on Mar 19, 2018 7:59 AM by e.pratt_1639216

    How to make 2 BLE devices work together ?

    chaplin.u_1533771

      I want to make cooperation of 2 PSOC4 BLE devices. one placed on foot ( step counter) , second placed on chest ( Heart_Rate_Sensor).

      Master on chest and slave on foot .I can connect by smartphone to master and read both sensors.

      Any help or examples are welcome.

        • 1. Re: How to make 2 BLE devices work together ?
          e.pratt_1639216

          The wireless connections are controlled by:

          Central: Initiates connections and can read/write/disconnect

          Peripheral: Advertises until connected with, and can notify/get read/disconnect

           

          It sounds like you will want the chest sensor to be set as either a peripheral so that the phone can connect to it, or as a central/peripheral device which switches between the two operations to get the foot sensor data and be ready for the phone to connect and request the data.

           

          Since the BLE chips only support one simultaneous connection at a time for the PSoC 4 (PSoC 6 supports up to 4), you will need to have some timing to alternate between the phone reading the sensor values from a buffer on one of the devices, and that device reading the sensor data from the second device and buffering it to itself for the phone to use later.

           

          The easiest/fastest approach might be to have the phone connect to and read the two sensors separately one after the other.

          Otherwise, if you really want the sensor data consolidated to the same wireless access point, then you will need to have the device that connects with the phone either:

          1) Read the second sensor on the foot for data periodically by disconnecting from phone, reading data, reconnecting to phone, or just accept that the data won't update on the foot sensor while the phone is connected.

          2) Have the phone and foot sensor connect and read/write data, then disconnect fairly quickly to allow the other device (phone, foot sensor) to connect and read/write data next.

          Essentially, the wireless connection point for the BLE chips behaves like a single parking spot that only one car (other device) at a time can be parked in (connected with for read/write capability). Either you need to have the "cars" take turns parking, or have the parking spot "turn into" a car and park at the alternative parking spot (foot sensor)

          • 3. Re: How to make 2 BLE devices work together ?
            chaplin.u_1533771

            "PSoC 6 supports up to 4"

            PSOC 6 have mesh support ?

            • 4. Re: How to make 2 BLE devices work together ?
              e.pratt_1639216

              Either no but soon, or yes. This information is months old, but helpful: PSoC6 BLE Mesh Support

              This information seems more current:Does PSOC 6 support MESH network?

              Since the mesh setup is mostly firmware, I would suspect that some clever programming would make it work as it is now