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

pc-ble-driver-py (Python bindings) or compiling pc-ble-driver on OpenWRT?

Hi,

I have a wifi chip MTk7628 that communicates over a usb to ttl chip cp2104 to the NRF52832. I was able to cross compile the heart rate collector and burn the OpenWRT firmware with the executable to the device and have successfully scanned over BLE.

My next goal is to get pc-ble-driver-py working on the device, but so far I've been unsuccessful. It looks Cmake isn't available in opkg and is necessary to install pc-ble-driver-py. Has anyone gotten this working?

Also is it possible to compile pc-ble-driver on OpenWRT itself or am I forced to cross compile? I'm trying to think up of a way to create a suitable development environment. 

Edit - I do see libpc_ble_driver_shared_sd_api_v5.so in /usr/lib. Does this mean all the definitions of functions listed in the pc-ble-driver header files are located here?

Parents
  • Hi,

     

    Building natively is normally not wanted, especially on memory constrained platforms like openwrt. I would recommend that you cross compile. 

    Also is it possible to compile pc-ble-driver on OpenWRT itself or am I forced to cross compile? I'm trying to think up of a way to create a suitable development environment. 

     We do not officially support the MIPS-platform in pc-ble-driver, but if you look at other threads in the forum, you might find a way to cross compile it to MIPS:

    https://devzone.nordicsemi.com/f/nordic-q-a/60485/serialization-problem-using-openwrt-on-mips-board-as-application-part/269766#269766

      

    Edit - I do see libpc_ble_driver_shared_sd_api_v5.so in /usr/lib. Does this mean all the definitions of functions listed in the pc-ble-driver header files are located here?

    This is usually a symlink, that resolves to libnrf-ble-driver-sd_api_v5.so.$(VERSION). The API is listed in the include folder.

    Note: that shared object is specific for an CPU architecture. You cannot take a .so file and run that on another arch than what its compiled for initially.

     

    On a unix-based system, you can run "file /path/to/shared_object.so" and get information about which architecture its compiled for.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    Building natively is normally not wanted, especially on memory constrained platforms like openwrt. I would recommend that you cross compile. 

    Also is it possible to compile pc-ble-driver on OpenWRT itself or am I forced to cross compile? I'm trying to think up of a way to create a suitable development environment. 

     We do not officially support the MIPS-platform in pc-ble-driver, but if you look at other threads in the forum, you might find a way to cross compile it to MIPS:

    https://devzone.nordicsemi.com/f/nordic-q-a/60485/serialization-problem-using-openwrt-on-mips-board-as-application-part/269766#269766

      

    Edit - I do see libpc_ble_driver_shared_sd_api_v5.so in /usr/lib. Does this mean all the definitions of functions listed in the pc-ble-driver header files are located here?

    This is usually a symlink, that resolves to libnrf-ble-driver-sd_api_v5.so.$(VERSION). The API is listed in the include folder.

    Note: that shared object is specific for an CPU architecture. You cannot take a .so file and run that on another arch than what its compiled for initially.

     

    On a unix-based system, you can run "file /path/to/shared_object.so" and get information about which architecture its compiled for.

     

    Kind regards,

    Håkon

Children
No Data
Related