-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stability issues on Ubuntu #28
Comments
Hi, This sounds like something we will need to look into, we do not currently have any info on this. |
Hi, |
Hi @bihanssen, It seems that your commit fixes that problem on Intel Edison (Yocto). Many thanks, |
Hi @bihanssen, Unfortunately not the good news on my end. The modification helps with a cleaner shut down (earlier it was a crash as shown above) now but has the same/similar problem with a different message (I believe the error is still the same) Here is what I have done :
Please note :
My environment :
c: close adapter #1 status: {"id":6,"name":"RESET_PERFORMED","message":"Target Reset performed","time":"2016-09-13T13:47:31.902Z"} Failed to open the nRF5 BLE driver. assert.js:85 |
Hi @ksachdeva, @bihanssen After longer testing time, I've started to get exactly the same issue as @ksachdeva shown above. I investigated this further and it seems to me that this is a race condition problem in h5_transport in the pc-ble-driver. The H5Transport::open runs UartBoost::open and then sets _exitCriterias->isOpened to true when port is successfully opened. However startStateMachine() starts new thread which sets _exitCriterias->isOpened to false by executing exit->reset() method. If state machine thread runs first everything works well but if H5Transport::open sets isOpened first, the program fails. I've added a few debug messages and logged program flow for expected and unexpected STATE_START initialization. Exepcted STATE_START initialization
Unexpected STATE_START initialization
For now I applied a nasty work around as I don't have time to look into this further. I simply added 500 ms delay before setting isOpened to true in H5Transport::open method. Simply add the following line in L135 of h5_transport.cpp. @ksachdeva are you able to check if the work around works for you too? I may look into this properly later. BR, |
@rosek86, thanks for sharing your findings and for the proposed workaround. |
@rosek86 How do I recompile after I've added your fix? |
@vikeri there is build.js script in the main directory, you can run 'node build.js' |
Hi, I had another problem when setting up the driver on Ubuntu 16.04 LTS. Basically, the driver never enters ACTIVE state. As a workaround, I have increased PACKETS_RETRANSMISSIONS from 4 to 255 and now it enters active time each time. |
@rosek86 @ksachdeva Are you able to reproduce the error now? There has been some fixes in pc-ble-driver that should fix this issue (NordicSemiconductor/pc-ble-driver#65) |
Closing due to inactivity. Feel free to reopen if there are new findings. |
Hi,
My primary development machine has been OS X and things have worked quite well. However my app is to be deployed on Ubuntu and am facing lot of stability issues when opening the adapter.
When adapter.open() is called then a lot of time I end up with below mentioned error message
Failed to open the nRF5 BLE driver.
node: ../deps/uv/src/unix/core.c:168: uv_close: Assertion `0' failed.
Even connecting/disconnecting the DK does not help. Some times rebooting the Ubuntu helps
Any help/guidance on what may be wrong and if any workaround will be very helpful
Regards & thanks
Kapil
The text was updated successfully, but these errors were encountered: