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

NRF52 BLE UART + Proximity

Hi,

I am using NRF52832 to read the sensor data (BMI160 accelerometer sensor) by using I2C.

I try to send the sensor data to mobile by using BLE_UART. upto this i finished now. I need is.

1.calculate the BATTERY level without using ADC. is there any register used to read the battery?

2. need to know the paired device distance. or proximity?

Parents
  • HI Sunil, 

    Q1: There are no internal peripheral that measures VDD on the NRF52. You need to use the ADC to measure VDD. Alternatively, if yo ujust want to know if VDD has fallen below a certain threshold, then you can use the LPCOMP. 

    Q2: You can use the RSSI to determine of the connected device is close of far away, see S132 SoftDevice v6.1.0: RSSI get sample.

    Best regards

    Bjørn 

  • Hi Bjorn,

    I need a clarification in BLE_Proximity. in that I download the code and I connect  with Mobile phone. It ask for pair the device. and pair the device.

    In app it shows the Battery level and location enable disable option.

    1) battery level is measure based on LPCOMP or using ADC pin connection?

    2) the proximity output as led 2 ON is this because of RSSI ?

    can you please give a brief explanation about this BLE_Proximity.

    If the battery level measure due to ADC means shall i get the schematic of the NRF52832 development board. I need a bit clarification about this.

  • i got one more problem that is while pair with device. after some time i did un-pair in mobile phone. and i reconnect with the device but it doesn't pair with phone

    in log it shows

    <info> app: No Alert.
    <info> app: Connected.
    <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 133
    <info> app: Fast advertising.
    <info> app: Disconnected.
    <info> app: No Alert.
    <info> app: Connected.
    <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 133
    <info> app: Fast advertising.
    <info> app: Disconnected.

Reply
  • i got one more problem that is while pair with device. after some time i did un-pair in mobile phone. and i reconnect with the device but it doesn't pair with phone

    in log it shows

    <info> app: No Alert.
    <info> app: Connected.
    <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 133
    <info> app: Fast advertising.
    <info> app: Disconnected.
    <info> app: No Alert.
    <info> app: Connected.
    <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 133
    <info> app: Fast advertising.
    <info> app: Disconnected.

Children
Related