This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640R2F: Client/Server code for Ble 5.0

Part Number: CC2640R2F

Is Client/Server Ble 5.0 code available for CC2640R2. 

  • Do you mean to ask if TI provide both BLE central and peripheral examples for CC2640R2F? If so, it's YES. For BLE central, you can refer to simple_central. For BLE peripheral, you can refer to simple_peripheral.

  • There is a Client/Server ble 4.2 example available in github, similarly is there any Client/Server ble 5 example available. 

  • Check if is what you want.

  • Thanks for the link.

    I tried to bulid the client code in ccs but following compilation error is occuring, can you please help me to resolve this issue.

     .

  • Those examples are based on simplelink_cc2640r2_sdk-3.30. Do you use matched SDK version?

  • Compilation error occured when i was compiling with SDK version 3.30.00.20.

  • Make sure you also download source\ti folder content in and copy all the folder contents into your 3.30.00.20 source\ti folder.

  • Before compiling i had coped the folder contents, but still i am facing same compilation issues. I even tired compiling project zero but same error is occurring for that project also.

  • Can you attach build log and errors shown on CCS console?

  • Attaching build log and screenshot of problems.

    **** Build of configuration FlashROM_Library for project ble5_simple_serial_socket_client_cc2640r2lp_stack_library ****
    
    "C:\\ti\\ccs1000\\ccs\\utils\\bin\\gmake" -k -j 4 all -O 
     
    C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/../../../tools/ble5stack/lib_search/lib_search         --opt C:/Users/Neville/workspace_v10/ble5_simple_serial_socket_client_cc2640r2lp_stack_library/TOOLS/build_config.opt         --lib-dir C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/blelib/cc26x0r2         --cmd C:/Users/Neville/workspace_v10/ble5_simple_serial_socket_client_cc2640r2lp_stack_library/FlashROM_Library/lib_linker.cmd         --xml C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/../../../tools/ble5stack/lib_search/lib_search.xml         --sym-dir C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/symbols/cc26x0r2
    <<< Using library: C:\ti\simplelink_cc2640r2_sdk_3_30_00_20\source\ti\ble5stack\blelib\cc26x0r2\ctrl\hci_xcxx.a >>>
    <<< Using library: C:\ti\simplelink_cc2640r2_sdk_3_30_00_20\source\ti\ble5stack\blelib\cc26x0r2\ctrl\ll_xcxx.a >>>
    <<< Using library: C:\ti\simplelink_cc2640r2_sdk_3_30_00_20\source\ti\ble5stack\blelib\cc26x0r2\hci_tl\hci_tl_none.a >>>
    <<< Using library: C:\ti\simplelink_cc2640r2_sdk_3_30_00_20\source\ti\ble5stack\blelib\cc26x0r2\host\att_xcxx.a >>>
    <<< Using library: C:\ti\simplelink_cc2640r2_sdk_3_30_00_20\source\ti\ble5stack\blelib\cc26x0r2\host\gap_xcxx.a >>>
    <<< Using library: C:\ti\simplelink_cc2640r2_sdk_3_30_00_20\source\ti\ble5stack\blelib\cc26x0r2\host\gatt_xcxx.a >>>
    <<< Using library: C:\ti\simplelink_cc2640r2_sdk_3_30_00_20\source\ti\ble5stack\blelib\cc26x0r2\host\l2cap_xcxx.a >>>
    <<< Using library: C:\ti\simplelink_cc2640r2_sdk_3_30_00_20\source\ti\ble5stack\blelib\cc26x0r2\host\profiles_xcxx.a >>>
    <<< Using library: C:\ti\simplelink_cc2640r2_sdk_3_30_00_20\source\ti\ble5stack\blelib\cc26x0r2\host\smp_xcxx.a >>>
    <<< Using library: C:\ti\simplelink_cc2640r2_sdk_3_30_00_20\source\ti\ble5stack\blelib\cc26x0r2\host\sm_xcxx.a >>>
    <<< Not modifying lib_linker.cmd. Stack configurations have not changed. >>>
     
    <<< Using xcxx.symbols >>>
     
    Building file: "C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/osal/src/common/osal.c"
    Invoking: ARM Compiler
    "C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-arm_20.2.0.LTS/bin/armcl" --cmd_file="C:/Users/Neville/workspace_v10/ble5_simple_serial_socket_client_cc2640r2lp_stack_library/TOOLS/defines/ble5_simple_serial_socket_client_cc2640r2lp_stack_library_FlashROM_Library.opt" --cmd_file="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/config/build_components.opt" --cmd_file="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/config/factory_config.opt" --cmd_file="C:/Users/Neville/workspace_v10/ble5_simple_serial_socket_client_cc2640r2lp_stack_library/TOOLS/build_config.opt"  -mv7M3 --code_state=16 -me -O4 --opt_for_speed=0 --include_path="C:/Users/Neville/workspace_v10/ble5_simple_serial_socket_client_cc2640r2lp_stack_library" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/controller/cc26xx/inc" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/inc" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/rom" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/common/cc26xx" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/common/cc26xx/npi/stack" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/icall/inc" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/hal/src/target/_common" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/hal/src/target/_common/cc26xx" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/hal/src/target" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/hal/src/inc" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/icall/src/inc" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/npi/src" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/osal/src/inc" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/services/src/aes/cc26xx" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/services/src/nv/cc26xx" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/services/src/nv" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/services/src/saddr" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/rf_patches" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/devices/cc26x0r2/inc" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source" --include_path="C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/kernel/tirtos/packages" --include_path="C:/ti/ccs1000/xdctools_3_61_00_16_core/packages" --include_path="C:/ti/ccs1000/ccs/tools/compiler/ti-cgt-arm_20.2.0.LTS/include" --define=DeviceFamily_CC26X0R2 -g --c99 --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi --preproc_with_compile --preproc_dependency="OSAL/osal.d_raw" --obj_directory="OSAL"  "C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/osal/src/common/osal.c"
     
    >> Compilation failure
    OSAL/subdir_rules.mk:9: recipe for target 'OSAL/osal.obj' failed
    "C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/osal/src/common/osal.c", line 413: error #167: too few arguments in function call
    1 error detected in the compilation of "C:/ti/simplelink_cc2640r2_sdk_3_30_00_20/source/ti/ble5stack/osal/src/common/osal.c".
    gmake[1]: *** [OSAL/osal.obj] Error 1
    gmake[1]: Target 'main-build' not remade because of errors.
    gmake: *** [all] Error 2
    makefile:178: recipe for target 'all' failed
    
    **** Build Finished ****
    

  • If you install SDK 3.30.00.20 without overriding by those example source codes, can you build project_zero in ble5stack folder successfully?

  • No not able to build with stand alone SDK 3.30.00.20 also. I tried to compile simple broadcaster in IAR, i am able to build successfully. In ccs simple broadcaster is giving error. 

  • SDK 3.30.00.20 uses CCS-9.0.0.00013 by default. Maybe try to install CCS-9.0.0.00013 to test again.

  • I was able to bulid the client and server code in ccs v8.1.0. I loaded the binary files to CC2640R2 Development kit. Both boards got connected and red LED was glowing, but notification was not enabled and Green LED was not glowing. Can you please guide me to solve notification enable issue.

  • I download and build the example and I can see both red and green led work normally. I attach my firmware for your reference.

    ble5_simple_serial_socket.zip

  • After changing ROSC settings it got conneced and notification also got enabled. Now i am able to communicate with each other.

    Is it possible to combine client and server code to a single project.

  • I would say it's possible but you have to do it by yourself.