3 Replies Latest reply on Apr 11, 2017 8:36 AM by epr_1639216

    BLE LocalName

      Hello guys,

         

      I need your help again :)

         

      I configured my PSoC 4200 BLE as I²C to BLE Bridge as shown in the PSoC 100 projects in 100 day (No.35).
      The project works great, my data sent by an Arduino Uno to the PSoC.
      With the Cypress BLE App I can read the Characteristics and the value.

         

      But I want to display the value without reading the characteristics(a scanning client should be able to read the value just by scanning).
      I heard that it is possible to directly transfer the value as the name of the device.
      So I want to let a variable be the "Local Name" of the device.

         

      I know that there is the API " CyBle_GapSetLocalName" but how do I get the I²C value in this command?

        • 1. Re: BLE LocalName

          void sendI2CNotification(void) is called whenever new I2C data is received; Rewrite the internal logic to set the CyBle_GapSetLocalName() based on the I2C data received. wrBuf is the pointer to the I2C received buffer, and byteCnt is the count of data bytes received. You might need to turn off the BLE radio advertising/connecting/scanning in order to set the local name, but you should be able to determine that yourself :)

          • 2. Re: BLE LocalName

            Okay, I understand.
            But the parameter of GapSetLocalName is a const8 char.
            The value of the I²C data is integer datatype.

               

            At the moment I have problems converting this integer value into string/const8 char.
            Can you help me at this issue?

            • 3. Re: BLE LocalName

              Since it requires a string, you merely need to convert the integer how you want into a character or multiple characters and pass them as a string to the function call.

              1 of 1 people found this helpful