5 Replies Latest reply on Dec 9, 2018 10:54 PM by GyanC_36

    Unable to stablish connection using CYBLE 222014-01 Embedded on custom board

      Hi everyone,

       

      I am using CYBLE 222014-01 BLE module on my custom board which is connected to S12 freescale MCU using I2C bus. I followed the instructions from Getting started with CYBLE 222014-01 for FindMe application. I removed LED connections because my BLE module is not connected to LED directly and kept the code for BLE module. I programmed my BLE module using miniprog3. After switching off and On of board I am unable to find device name in Cysmart App.

       

      I am unable to understand what is wrong going on. Is there any sample code available to stablish the connect.

      Kindly provide the help

        • 1. Re: Unable to stablish connection using CYBLE 222014-01 Embedded on custom board
          GyanC_36

          Please make sure that your firmware is not stuck waiting on I2C transfer. Please share your project so that  I can have a look if anything is missing.

           

          (Right Click on the project name -> Archive workspace)

           

          -Gyan

          • 2. Re: Unable to stablish connection using CYBLE 222014-01 Embedded on custom board

            Gyan Chand thank you for quick reply.

            I am very new to BLE work. In my project I dont have any I2C block. Do I need to add I2C block?. I will share my project with you, kindly have look on it.

             

            https://drive.google.com/open?id=1pleBsehuxoFOAzY9nmGQMOseZqmTWJEW

            I have uploaded my project in google drive. You can download from above link.

             

            My project is very simple call FindMe copied from Example codes.

            • 3. Re: Unable to stablish connection using CYBLE 222014-01 Embedded on custom board
              GyanC_36

              In this project, the advertisement timeout ( Double Click on BLE component in Top Design -> GAP setting -> Advertisement Setting ) is set to 30 seconds. If you are not connecting the BLE Module device to CySmart for 30 seconds , Module will go to Low Power Stop Mode.

               

              Below Code snippet from code puts the module in Stop Mode after Advertisement timeout-

              """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

              case CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP:

                          if(CyBle_GetState() == CYBLE_STATE_DISCONNECTED)

                          {

                              /* Advertisement event timed out, go to low power

                               * mode (Stop mode) and wait for device reset

                               * event to wake up the device again */

                              Advertising_LED_Write(LED_OFF);

                              Disconnect_LED_Write(LED_ON);

                              CySysPmSetWakeupPolarity(CY_PM_STOP_WAKEUP_ACTIVE_HIGH);

                              CySysPmStop();

               

              """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

               

              Once the Module goes to stop  mode, you have to reset the Module to make it advertise again.

               

               

              -> Also , please refer this link to set the captrim values for ECO before programming the Module.

                   ECO Capacitance Trim Values for EZ-BLE™ Modules - KBA218990

               

                 

               

              -Gyan

              • 4. Re: Unable to stablish connection using CYBLE 222014-01 Embedded on custom board

                Hello Gyan,

                 

                Thanks for your answer. I tried the procedure told by you but unfortunatly facing the same issue. I found one code from below site

                http://www.cypress.com/documentation/application-notes/an96841-getting-started-ez-ble-creator-modules

                File name: AN96841_Getting_Started_With_EZ-BLE_Module.zip

                I have change the ECO trim value in common.h

                ****************************************************************************************************************************************************

                #define CAPACITOR_TRIM_VALUE      0x0000A0A0; //CAP TRIM VALUE FOR EZ-BLE PRoC Module(MPN: CYBLE-222014-01)

                ****************************************************************************************************************************************************

                 

                And in StackEventHandler function wrote this line

                ****************************************************************************************************************************************************

                CY_SYS_XTAL_BLERD_BB_XO_CAPTRIM_REG = CAPACITOR_TRIM_VALUE;

                ****************************************************************************************************************************************************

                 

                After debugging the code I am facing the issue at line 485 in BLE.c

                ****************************************************************************************************************************************************

                apiResult = CyBle_StackInit(&CyBle_EventHandler, cyBle_stackMemoryRam,

                                    CYBLE_STACK_RAM_SIZE - CYBLE_GATT_PREPARE_WRITE_BUFF_LEN, cyBle_stackDataBuff,

                                    CYBLE_STACK_APP_MIN_POOL, NULL, 0u);

                ****************************************************************************************************************************************************

                 

                After this line debug cursor is not moving.

                 

                Can you suggest something

                • 5. Re: Unable to stablish connection using CYBLE 222014-01 Embedded on custom board
                  GyanC_36

                  Hi Ibrahim,

                   

                      I don't see any issue with this project and it is working fine at my side.

                   

                  Are you putting the device in debug mode and using breakpoints ?

                   

                  If yes,  please do not do so because you need to call CyBle_ProcessEvents() API at least once in an Advertisement or Connection interval.

                   

                  Just program your device and see if the device is discover-able by a Client Device ( CySmart) 

                   

                  -Gyan