You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Tao Han <ta...@zglue.com> on 2018/05/07 10:10:26 UTC

How to use the nimble in other OS?

Hi,

We try to merge Nimble in nuttx OS which is not support the interruption
preemption,  now we can make connection and keep to notification some data
from device A(nrf52832) to devices B(phone app), after sometime, device A
stopped unexceptionally,  the ble_phy_isr not coming any more.

Do you have any suggestion for this issue or some debug way to share with
us.

Thanks.

-- 
Best Regards.
Han Tao

Re: How to use the nimble in other OS?

Posted by Andrzej Kaczmarek <an...@codecoup.pl>.
Hi,

On Mon, May 7, 2018 at 1:41 PM Tao Han <ta...@zglue.com> wrote:

> Hi,

> We try to merge Nimble in nuttx OS which is not support the interruption
> preemption,  now we can make connection and keep to notification some data
> from device A(nrf52832) to devices B(phone app), after sometime, device A
> stopped unexceptionally,  the ble_phy_isr not coming any more.

> Do you have any suggestion for this issue or some debug way to share with
> us.

Did you see any event in application, like disconnection, or it just stops
sending data without any event?
If this is disconnection, then disconnection reason should tell you whether
this was initiated by either side or just timed out (could be due to some
configuration issue then).
If it just stopped suddenly, you should first check if scheduler is running
since this is what will eventually trigger radio. Scheduler is running on
RTC1 at 32768 Hz and executes actions via ble_ll_sched_run(). There should
be some items in scheduler queue also (g_ble_ll_sched_q) and each item has
"start_time" which is number of RTC1 ticks when it should be executed so
you can quickly compare if these values make sense.

BTW, you may want to look on https://github.com/apache/mynewt-nimble/pull/72
which introduces much better support for porting NimBLE to other OS. In
particular, there is small example where complete NimBLE (controller +
host) is runnig on FreeRTOS on nRF52xxx. It's not yet well documented, but
if you have any questions regarding let me know on dev list or Mynewt's
Slack.

> Thanks.

> --
> Best Regards.
> Han Tao

Best,
Andrzej