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

Unable to connect (bond) to nrf52810 using nrfConnect

Hi, I have been developing on the nRF52832. I am now in the process of moving to the nRF52810.

I am using the SDK v15. 

I have commented out the DEVELOP_IN_NRF52832 define in the pca10040e Makefile.

It seems to be working OK. I can see the device on the nrf connect app. However, when I click connect, it is unable to connect.

 

If I comment back in DEVELOP_IN_NRF52832 and switch back to the nRF52832, everything works perfectly.

I have made my own custom service. But I don't think that should matter. Any ideas?

Parents
  • Hi,

    When you developed your application on the 52832, did you use the s132 or s112 softdevice? Also, can you provide a list of the defines you have in your Makefile? Reason I ask is that I wonder if the application might be using APIs not available in s112.

      

  • I used the s132 soft device originally, however, when I flash the nrf52832 with the s112 soft device it works fine aswell. 

    Is this the part of the Makefile that your after?

    # Libraries common to all targets
    LIB_FILES += \
    
    # Optimization flags
    OPT = -Os -g3
    # Uncomment the line below to enable link time optimization
    #OPT += -flto
    
    # C flags common to all targets
    CFLAGS += $(OPT)
    CFLAGS += -DBOARD_PCA10040
    CFLAGS += -DCONFIG_GPIO_AS_PINRESET
    # CFLAGS += -DDEVELOP_IN_NRF52832
    CFLAGS += -DFLOAT_ABI_SOFT
    CFLAGS += -DNRF52810_XXAA
    CFLAGS += -DNRF52_PAN_74
    CFLAGS += -DNRF_SD_BLE_API_VERSION=6
    CFLAGS += -DS112
    CFLAGS += -DSOFTDEVICE_PRESENT
    CFLAGS += -DSWI_DISABLE0
    CFLAGS += -mcpu=cortex-m4
    CFLAGS += -mthumb -mabi=aapcs
    CFLAGS += -Wall -Werror
    CFLAGS += -mfloat-abi=soft
    # keep every function in a separate section, this allows linker to discard unused ones
    CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
    CFLAGS += -fno-builtin -fshort-enums
    
    # C++ flags common to all targets
    CXXFLAGS += $(OPT)
    
    # Assembler flags common to all targets
    ASMFLAGS += -g3
    ASMFLAGS += -mcpu=cortex-m4
    ASMFLAGS += -mthumb -mabi=aapcs
    ASMFLAGS += -mfloat-abi=soft
    ASMFLAGS += -DBOARD_PCA10040
    ASMFLAGS += -DCONFIG_GPIO_AS_PINRESET
    # ASMFLAGS += -DDEVELOP_IN_NRF52832
    ASMFLAGS += -DFLOAT_ABI_SOFT
    ASMFLAGS += -DNRF52810_XXAA
    ASMFLAGS += -DNRF52_PAN_74
    ASMFLAGS += -DNRF_SD_BLE_API_VERSION=6
    ASMFLAGS += -DS112
    ASMFLAGS += -DSOFTDEVICE_PRESENT
    ASMFLAGS += -DSWI_DISABLE0
    
    # Linker flags
    LDFLAGS += $(OPT)
    LDFLAGS += -mthumb -mabi=aapcs -L$(SDK_ROOT)/modules/nrfx/mdk -T$(LINKER_SCRIPT)
    LDFLAGS += -mcpu=cortex-m4
    # let linker dump unused sections
    LDFLAGS += -Wl,--gc-sections
    # use newlib in nano version
    LDFLAGS += --specs=nano.specs
    
    nrf52810_xxaa: CFLAGS += -D__HEAP_SIZE=2048
    nrf52810_xxaa: CFLAGS += -D__STACK_SIZE=2048
    nrf52810_xxaa: ASMFLAGS += -D__HEAP_SIZE=2048
    nrf52810_xxaa: ASMFLAGS += -D__STACK_SIZE=2048
    
    # Add standard libraries at the very end of the linker input, after all objects
    # that may need symbols provided by these libraries.
    LIB_FILES += -lc -lnosys -lm
    
    
    .PHONY: default help
    
    # Default target - first one defined
    default: nrf52810_xxaa

Reply
  • I used the s132 soft device originally, however, when I flash the nrf52832 with the s112 soft device it works fine aswell. 

    Is this the part of the Makefile that your after?

    # Libraries common to all targets
    LIB_FILES += \
    
    # Optimization flags
    OPT = -Os -g3
    # Uncomment the line below to enable link time optimization
    #OPT += -flto
    
    # C flags common to all targets
    CFLAGS += $(OPT)
    CFLAGS += -DBOARD_PCA10040
    CFLAGS += -DCONFIG_GPIO_AS_PINRESET
    # CFLAGS += -DDEVELOP_IN_NRF52832
    CFLAGS += -DFLOAT_ABI_SOFT
    CFLAGS += -DNRF52810_XXAA
    CFLAGS += -DNRF52_PAN_74
    CFLAGS += -DNRF_SD_BLE_API_VERSION=6
    CFLAGS += -DS112
    CFLAGS += -DSOFTDEVICE_PRESENT
    CFLAGS += -DSWI_DISABLE0
    CFLAGS += -mcpu=cortex-m4
    CFLAGS += -mthumb -mabi=aapcs
    CFLAGS += -Wall -Werror
    CFLAGS += -mfloat-abi=soft
    # keep every function in a separate section, this allows linker to discard unused ones
    CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
    CFLAGS += -fno-builtin -fshort-enums
    
    # C++ flags common to all targets
    CXXFLAGS += $(OPT)
    
    # Assembler flags common to all targets
    ASMFLAGS += -g3
    ASMFLAGS += -mcpu=cortex-m4
    ASMFLAGS += -mthumb -mabi=aapcs
    ASMFLAGS += -mfloat-abi=soft
    ASMFLAGS += -DBOARD_PCA10040
    ASMFLAGS += -DCONFIG_GPIO_AS_PINRESET
    # ASMFLAGS += -DDEVELOP_IN_NRF52832
    ASMFLAGS += -DFLOAT_ABI_SOFT
    ASMFLAGS += -DNRF52810_XXAA
    ASMFLAGS += -DNRF52_PAN_74
    ASMFLAGS += -DNRF_SD_BLE_API_VERSION=6
    ASMFLAGS += -DS112
    ASMFLAGS += -DSOFTDEVICE_PRESENT
    ASMFLAGS += -DSWI_DISABLE0
    
    # Linker flags
    LDFLAGS += $(OPT)
    LDFLAGS += -mthumb -mabi=aapcs -L$(SDK_ROOT)/modules/nrfx/mdk -T$(LINKER_SCRIPT)
    LDFLAGS += -mcpu=cortex-m4
    # let linker dump unused sections
    LDFLAGS += -Wl,--gc-sections
    # use newlib in nano version
    LDFLAGS += --specs=nano.specs
    
    nrf52810_xxaa: CFLAGS += -D__HEAP_SIZE=2048
    nrf52810_xxaa: CFLAGS += -D__STACK_SIZE=2048
    nrf52810_xxaa: ASMFLAGS += -D__HEAP_SIZE=2048
    nrf52810_xxaa: ASMFLAGS += -D__STACK_SIZE=2048
    
    # Add standard libraries at the very end of the linker input, after all objects
    # that may need symbols provided by these libraries.
    LIB_FILES += -lc -lnosys -lm
    
    
    .PHONY: default help
    
    # Default target - first one defined
    default: nrf52810_xxaa

Children
Related