You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Jeff Belz <jb...@vectorform.com> on 2018/07/10 18:46:09 UTC

BLE uart read write

I'm working with the BLE uart example and I have it working as is, but it's a little hidden where the read and write data goes.

I want to do something simple, like write a BLE uart, string  and then read a BLE uart string.   I need these functions in the main.c.   What functions need to be brought forward to the main.c just to do a simple read and write operation.

Jeff

Re: BLE uart read write

Posted by Amr Bekhit <am...@gmail.com>.
Are you referring to the host/services/bleuart package? Looking at the code
for that, it appears that there are no callbacks or hooks to allow you to
read and write data. The code appears hard coded to read and write data
from the console.

Regarding receiving data, looks like you'll need to replace lines 105 and
108. To transmit data you'll need to replace lines 154-162 in bleuart.c

Amr

On Tue, 10 Jul 2018, 9:46 p.m. Jeff Belz, <jb...@vectorform.com> wrote:

> I'm working with the BLE uart example and I have it working as is, but
> it's a little hidden where the read and write data goes.
>
> I want to do something simple, like write a BLE uart, string  and then
> read a BLE uart string.   I need these functions in the main.c.   What
> functions need to be brought forward to the main.c just to do a simple read
> and write operation.
>
> Jeff
>