This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

using serial communication with softdevice

Hi everyone !

I want to use serial communication with my ble project. So i tried to implement  "/example/peripheral/serial " project into my ble project. I encountered too many errors but i fixed most of them by searching on DevZone. Now i got 4 errors and i couldn't fix them. My goal is using serial communication between my board with another custom board. Not over BLE.

Here is my output;

Building ‘nrf52-ble-tutorial-characteristic’ from solution ‘nrf52-ble-tutorial-characteristic’ in configuration ‘Release’
  Linking nrf52-ble-tutorial-characteristic.elf
    Output/nrf52-ble-tutorial-characteristic Release/Obj/nrf_drv_power.o: in function `nrf_drv_power_sd_usbevt_enable':
    undefined reference to `sd_power_usbdetected_enable'
    C:\Users\********\Desktop\Nordic\nRF5_SDK_15.0.0_a53641a\nRF5_SDK_15.0.0_a53641a\integration\nrfx\legacy/nrf_drv_power.c:229: undefined reference to `sd_power_usbpwrrdy_enable'
    C:\Users\*********\Desktop\Nordic\nRF5_SDK_15.0.0_a53641a\nRF5_SDK_15.0.0_a53641a\integration\nrfx\legacy/nrf_drv_power.c:236: undefined reference to `sd_power_usbremoved_enable'
Build failed

What do these functions do? Which librarires and drivers should i include for serial communication. Is there any tutorial for serial ?

and i share the project which using for practise.

Project for nRF52840, SoftDevice S140, SDK 15.0.0

copy the file inside "ble_peripheral".

nrf5-ble-tutorial-characteristic-master.rar

  • Hi.

    Have you had a look at infocenter about serialization?

    Best regards,

    Andreas

  • well, i checked it but i couldn't find my answer in there 

  • Hi.

    The link in my last reply gives a good explination of serialization, I suggest you read it.

    I was able to compile your project by using these includes:

    ../../../config 
    ../../../../../../components
    ../../../../../../components/libraries/sensorsim
    ../../../../../../components/libraries/serial/
    ../../../../../../components/ble/ble_advertising
    ../../../../../../components/ble/ble_dtm
    ../../../../../../components/ble/ble_link_ctx_manager
    ../../../../../../components/ble/ble_racp
    ../../../../../../components/ble/ble_services/ble_ancs_c
    ../../../../../../components/ble/ble_services/ble_ans_c
    ../../../../../../components/ble/ble_services/ble_bas
    ../../../../../../components/ble/ble_services/ble_bas_c
    ../../../../../../components/ble/ble_services/ble_cscs
    ../../../../../../components/ble/ble_services/ble_cts_c
    ../../../../../../components/ble/ble_services/ble_dfu
    ../../../../../../components/ble/ble_services/ble_dis
    ../../../../../../components/ble/ble_services/ble_gls
    ../../../../../../components/ble/ble_services/ble_hids
    ../../../../../../components/ble/ble_services/ble_hrs
    ../../../../../../components/ble/ble_services/ble_hrs_c
    ../../../../../../components/ble/ble_services/ble_hts
    ../../../../../../components/ble/ble_services/ble_ias
    ../../../../../../components/ble/ble_services/ble_ias_c
    ../../../../../../components/ble/ble_services/ble_lbs
    ../../../../../../components/ble/ble_services/ble_lbs_c
    ../../../../../../components/ble/ble_services/ble_lls
    ../../../../../../components/ble/ble_services/ble_nus
    ../../../../../../components/ble/ble_services/ble_nus_c
    ../../../../../../components/ble/ble_services/ble_rscs
    ../../../../../../components/ble/ble_services/ble_rscs_c
    ../../../../../../components/ble/ble_services/ble_tps
    ../../../../../../components/ble/common
    ../../../../../../components/ble/nrf_ble_gatt
    ../../../../../../components/ble/nrf_ble_qwr
    ../../../../../../components/ble/peer_manager
    ../../../../../../components/boards
    ../../../../../../components/drivers_nrf/usbd
    ../../../../../../components/libraries/atomic
    ../../../../../../components/libraries/atomic_fifo
    ../../../../../../components/libraries/atomic_flags
    ../../../../../../components/libraries/balloc
    ../../../../../../components/libraries/bootloader/ble_dfu
    ../../../../../../components/libraries/bsp
    ../../../../../../components/libraries/button
    ../../../../../../components/libraries/cli
    ../../../../../../components/libraries/crc16
    ../../../../../../components/libraries/crc32
    ../../../../../../components/libraries/crypto
    ../../../../../../components/libraries/csense
    ../../../../../../components/libraries/csense_drv
    ../../../../../../components/libraries/delay
    ../../../../../../components/libraries/ecc
    ../../../../../../components/libraries/experimental_log
    ../../../../../../components/libraries/experimental_log/src
    ../../../../../../components/libraries/experimental_memobj
    ../../../../../../components/libraries/experimental_mpu
    ../../../../../../components/libraries/experimental_ringbuf
    ../../../../../../components/libraries/experimental_section_vars
    ../../../../../../components/libraries/experimental_stack_guard
    ../../../../../../components/libraries/experimental_task_manager
    ../../../../../../components/libraries/fds
    ../../../../../../components/libraries/fifo
    ../../../../../../components/libraries/fstorage
    ../../../../../../components/libraries/gfx
    ../../../../../../components/libraries/gpiote
    ../../../../../../components/libraries/hardfault
    ../../../../../../components/libraries/hci
    ../../../../../../components/libraries/led_softblink
    ../../../../../../components/libraries/low_power_pwm
    ../../../../../../components/libraries/mem_manager
    ../../../../../../components/libraries/mutex
    ../../../../../../components/libraries/pwm
    ../../../../../../components/libraries/pwr_mgmt
    ../../../../../../components/libraries/queue
    ../../../../../../components/libraries/scheduler
    ../../../../../../components/libraries/sdcard
    ../../../../../../components/libraries/slip
    ../../../../../../components/libraries/sortlist
    ../../../../../../components/libraries/spi_mngr
    ../../../../../../components/libraries/strerror
    ../../../../../../components/libraries/timer
    ../../../../../../components/libraries/twi_mngr
    ../../../../../../components/libraries/twi_sensor
    ../../../../../../components/libraries/uart
    ../../../../../../components/libraries/usbd
    ../../../../../../components/libraries/usbd/class/audio
    ../../../../../../components/libraries/usbd/class/cdc
    ../../../../../../components/libraries/usbd/class/cdc/acm
    ../../../../../../components/libraries/usbd/class/hid
    ../../../../../../components/libraries/usbd/class/hid/generic
    ../../../../../../components/libraries/usbd/class/hid/kbd
    ../../../../../../components/libraries/usbd/class/hid/mouse
    ../../../../../../components/libraries/usbd/class/msc
    ../../../../../../components/libraries/usbd/config
    ../../../../../../components/libraries/util
    ../../../../../../components/nfc/ndef/conn_hand_parser
    ../../../../../../components/nfc/ndef/conn_hand_parser/ac_rec_parser
    ../../../../../../components/nfc/ndef/conn_hand_parser/ble_oob_advdata_parser
    ../../../../../../components/nfc/ndef/conn_hand_parser/le_oob_rec_parser
    ../../../../../../components/nfc/ndef/connection_handover/ac_rec
    ../../../../../../components/nfc/ndef/connection_handover/ble_oob_advdata
    ../../../../../../components/nfc/ndef/connection_handover/ble_pair_lib
    ../../../../../../components/nfc/ndef/connection_handover/ble_pair_msg
    ../../../../../../components/nfc/ndef/connection_handover/common
    ../../../../../../components/nfc/ndef/connection_handover/ep_oob_rec
    ../../../../../../components/nfc/ndef/connection_handover/hs_rec
    ../../../../../../components/nfc/ndef/connection_handover/le_oob_rec
    ../../../../../../components/nfc/ndef/generic/message
    ../../../../../../components/nfc/ndef/generic/record
    ../../../../../../components/nfc/ndef/launchapp
    ../../../../../../components/nfc/ndef/parser/message
    ../../../../../../components/nfc/ndef/parser/record
    ../../../../../../components/nfc/ndef/text
    ../../../../../../components/nfc/ndef/uri
    ../../../../../../components/nfc/t2t_lib
    ../../../../../../components/nfc/t2t_lib/hal_t2t
    ../../../../../../components/nfc/t2t_parser
    ../../../../../../components/nfc/t4t_lib
    ../../../../../../components/nfc/t4t_lib/hal_t4t
    ../../../../../../components/nfc/t4t_parser/apdu
    ../../../../../../components/nfc/t4t_parser/cc_file
    ../../../../../../components/nfc/t4t_parser/hl_detection_procedure
    ../../../../../../components/nfc/t4t_parser/tlv
    ../../../../../../components/softdevice/common
    ../../../../../../components/softdevice/s140/headers
    ../../../../../../components/softdevice/s140/headers/nrf52
    ../../../../../../components/toolchain/cmsis/include
    ../../../../../../external/fprintf
    ../../../../../../external/segger_rtt
    ../../../../../../integration/nrfx
    ../../../../../../integration/nrfx/legacy
    ../../../../../../modules/nrfx
    ../../../../../../modules/nrfx/drivers/include
    ../../../../../../modules/nrfx/hal
    ../../../../../../modules/nrfx/mdk
    ../config

    You had included S132 instead of S140 header files. I also excluded nrf_soc.h and nrf_soc.c.

    Best regards,

    Andreas

  • Thank you Andreas, it's works fine now. I couldn't notice that because my project was working fine until i added UART.

Related