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

nRF51822 UART interfacing and HID over GATT

Dear Nordic Team,

I am currently working on a project to develop firmware for S110 nRF51822 softdevice with the following requirements.

  • Read ASCII chars from a third party hardware over UART
  • Send these chars using HID over GATT from nRF51822 to IPAD or other Bluetooth devices.

I am new to nRF51 SDK and I am struggling with following questions.

  1. how do I receive chars from UART

  2. how do I sent these chars from UART to HID over GATT.

I have seen the following examples but not sure which one to use.

  1. UART/Serial Port Emulation over BLE

or

  1. HID Keyboard Application

are there any other examples available.

Please guide me in understating how to solve this.

Kind regards,

Ven

  • @Ven: It's depend on what you want your device to be interfaced with the phone/tablet. If you want them to function as keyboards then you have to use HID. If you simply want to transfer UART data, you don't have to use HID profile.

    Regarding programming the module, you would need to find the pinout description of the module, then find the 4 pins: VDD, GND, SWDIO, SWDCLK to connect to your programmer.

    I would suggest you to also find the support from the module maker on how to program the module.

  • Hi Hung, Thank you for the response. I want to receive ascii chars from device connected to nRF51822 UART interface and pass them via GATT to any divices(ipad or phablet) that connects to the nRF51822 via blue tooth. Below is the flow.

    third party device-----(ascii)-------> nRF51 UART interface -> GATT -------------- (ascii chars via bluetooth)---------------------> ipad,iphone

    Please let me know if need to use HID here.

  • @ven: no you don't need HID, you can have a look at the ble_app_uart example we have. We also have nRF UART app, as well as UART profile in our nRF Toolbox app.

  • Thank you Hung. Do I still need GATT (for advertising)? Do I need to use any GATT code form HID Keyboard Application Or can I use Nordic UART Service.

  • @ven: If you want to send data when in connection you should have GATT. If you plan to send data just by broadcasting ( advertising) you don't need GATT. You don't need HID Keyboard unless you want to use it as a keyboard to control your mobile device.

Related