Communication between BlueZ Linux machine and a BT832X (nRF52832 based) module

Hello,

I am trying to develop a communication between a Linux machine that had a ASUS USB-BT500 (an universal bluetooth connector that is supporting Bluetooth 5 as well), using BlueZ library. What I am trying to achieve is a very simple scenario. I need to open a socket, send a package to BT832X ("hello from linux"), and then receive another package ("hello from nordic").

I succeeded to scan the BLE devices using a custom agent of bluetoothctl in order to obtain the MAC of the device. Then I'm trying to open a socket RF_COMM type, L2CAP type and so on. Nothing works. It hangs at connect. Therefore do you have a tiny piece of code in order to just open a proper socket and send a byte of data?

This is my last attempt of many:

Thank you and looking forward for you reply.

Parents Reply Children
  • Hi,

     

    Bluez is used in most linux based distros and systems, and it has LE capabilities.

    However; it might not have the exact samples that you're after, ie. written in pure C.

     

    Writing a sample directly in C, with posix sockets, is not likely to work with LE based links, but I'm not a bluez expert. I would recommend that you contact the community there to ask if there's any C-based samples available if that is what you're after.

     

    Kind regards,

    Håkon

Related