This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Pc-Ble-Driver-Js with custom board and gpio pins

Hi,

We have worked with building a raspberry pi system that uses a nRf52832 dev kit board and the pc-ble-driver-js code to scan and connect to our bluetooth devices.  This has worked well so we decided to use our custom nRF52832 board.  Our board uses a different pin set for the Rx and Tx pins (20 and 16 respectively) while from what I've seen in the devZone the dev kit board uses the UART pins  P0.08, P0.09, P0.10, and P0.11.  The question I have then is if it is possible to recompile the pc-ble-driver and pc-ble-driver-js code to accommodate these different pin settings?  Looking through the pc-ble-driver source code I only see the RX_PIN_NUMBER mentioned in the sdk***_connectivity patch files.  Yet I don't see them set or used when I compile hex files or the drivers themselves.   We would like to build the driver code to accomodate our boards pin lay outs and continue to use the pc-ble-driver code since it has been easy to use and get the project built on.  Let me know if you have more questions.

Thanks,

Derek Wooters

 

  • Hi,

    The question I have then is if it is possible to recompile the pc-ble-driver and pc-ble-driver-js code to accommodate these different pin settings?

    Yes.

    The connectivity hex running on the nRF5 is based on the ble_connectivity example in the SDK, found in  SDK_folder\examples\connectivity\ble_connectivity ,but with this nRF5_SDK_15.3.0_connectivity.patch applied. In the patch, we set the pin defines in ser_phy_config_conn.h to RX_PIN_NUMBER,TX_PIN_NUMBER,CTS_PIN_NUMBER and RTS_PIN_NUMBER. If you build the pca10040(nRF52832-DK) project, then these pins are defined in pca10040.h (components\boards). You can apply the patch, set these pins so they match your custom board, build the example, flash the hex file, and you should be good to go.

Related