This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to write central module firmware when peripheral is "s110\experimental\ble_app_uart" example

Hi,

I made a peripheral firmware based on "s110\experimental\ble_app_uart" example, but I don't know how to write a central module FW so that these two can pair to each other...

By using this peripheral module, I can use my phone to pair to this module, and this module can do "BLE -> UART", "UART -> BLE" data bypassing.

I hope I can make a central module using nrf51822 so that this central module can pair to my peripheral and do the same bypassing function.

HW: Peripheral -> a board using nRF51822 AA G0, Central -> PCA10005 (nRF51822 AA G0)

SoftDevice: Peripheral -> S110 v6.0.0, Central -> S120 v1.0.0

SDK: Peripheral -> v5.2, Central -> v6.1.0

By using "ble_app_multilink_peripheral/central" example, I can let Central and Peripheral paired. See devzone.nordicsemi.com/.../

But, for peripheral, if I use a FW based on "s110\experimental\ble_app_uart" example, and for central use "ble_app_multilink_central" FW, I cannot let Central and Peripheral pair to each other.

In "ble_app_multilink_central" FW, I modified

MULTILINK_PERIPHERAL_BASE_UUID from original value to "6E400001-B5A3-F393-E0A9-E50E24DCCA9E", which is used in "s110\experimental\ble_app_uart" example.

MULTILINK_PERIPHERAL_SERVICE_UUID from 0x9001 to 0x0001, which is used in "s110\experimental\ble_app_uart" as BLE_UUID_NUS_SERVICE.

MULTILINK_PERIPHERAL_CHAR_UUID from 0x900A to 0x0002, which is used in "s110\experimental\ble_app_uart" as BLE_UUID_NUS_TX_CHARACTERISTIC.

But central module using this modified FW doesn't detect my peripheral using FW based on ble_app_uart example.

Interesting thing is, even if I modified UUID, SERVICE ID, CHARACTERISTICS ID of central module, this central module still detects a peripheral using "ble_app_multilink_peripheral" FW. So I guess central module detects TARGET peripheral not by UUID, SERVICE and CHARACTERISTICS.

Which part I should modify so that I can use tx/rx characteristic and NUS service of my peripheral, and also let my central module find and pair to my peripheral?

Thank you!

Jason

  • A friend told me to modify TARGET_DEV_NAME of ble_app_multilink_central project to the DEVICE NAME of peripheral, and it works! The central module can search my peripheral using custom FW!

    Although it is not done, but it is a big step.

    I think I can get through the rest part of central module FW, but not very confident.

    I hope this question could be closed after I am quite confident.

  • The implementation of the central (S120) is set up to default search for specific peripherals and this is filtered by device name. So by changing your peripherals device name to match what the central is looking for, you should be able to get them paired up.

  • Hi, Asbjørn, thanks for your answer! I have several more questions on central FW using s120.

    1. If I use nrf51822 as a central, what is the max number of packets in one interval? (both central and peripheral using NUS) (In a rough test, I fount it is only 2)
    2. By using sd_ble_gattc_write(), what is the max bytes of data can be sent? (I found only 16 bytes are sent correctly)

    Thank you!

    Jason

  • Using PCA10000 as a central, I found

    1. One packet per interval
    2. Maximum 20 bytes per packet

    Are these max parameters for s120?

    Thank you

  • Yes, what you have found here is the current maximum specs of the S120. The goal is for Nordic to enhance and improve these numbers. To give you details on the time schedule I would contact your local Nordic sales representative or contact me through PM here and I'll patch you through to the sales force.

Related