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

Writing Values to Characteristics in the Image Transfer Demo

Hello, I've set up the image transfer app from Nordic Playground with the idea in mind to remove the Android App from the equation. I've picked through the Android app itself, and have found the characteristics advertised on the Nordic nrf52-DK necessary to capture images from an Arducam and transmit them over BLE as intended. 

public static final UUID IMAGE_TRANSFER_SERVICE_UUID = UUID.fromString("6e400001-b5a3-f393-e0a9-e50e24dcca3e");
public static final UUID RX_CHAR_UUID       = UUID.fromString("6e400002-b5a3-f393-e0a9-e50e24dcca3e");
public static final UUID TX_CHAR_UUID       = UUID.fromString("6e400003-b5a3-f393-e0a9-e50e24dcca3e");
public static final UUID IMG_INFO_CHAR_UUID = UUID.fromString("6e400004-b5a3-f393-e0a9-e50e24dcca3e");

Above are the three UUID's that I have been writing to via the nrfConnect app. Using nRFConnect, I turned on notifications for UUID's 6e400003 and 6e400004. Then, according to the Android app, writing "0x01" to UUID 6e400002 should trigger a "StartSingleCapture". This is confirmed to work on the nRFConnect app, and I can see the picture data being transferred over.

However, when using the ubuntu tool Bluetoothctl, it seems like writing to the UUID 6e400002 does not trigger a notification on neither of the UUID's 6e400003 and 6e400004. According to a bluetooth sniffer, I am sending the data over, I'm just not getting a response from the Nordic board. Clearly this could be due to a variety of issues, but I wanted to reach out and ask if anyone on the Nordic team has had experience writing values to the nrf52DK using the bluetoothctl tool (version 5.50).

The goal of this experiment is to be able to trigger an image transfer from the stock Nordic image transfer code on the nrf52, and receive the notification data on the linux side sending the data, essentially sidestepping the Android app all together. 

If you need any more information, please reach out.

Parents
  • So to update: 

    I decided to port my entire build system to Linux, and I am able to successfully connect to the Nordic board via Bluetoothctl. Everything works as intended using this tool in the current linux environment...

    The problem that I am now facing, is that I can't seem to connect to the board with code that I've written. Most notably, I'm not able to connect to a socket created to communicate with the board. I am receiving an "OPERATION NOW IN PROGRESS" error, which denotes that the I'm checking the return value for connect() before the board returns. My code works with all other bluetooth devices that I've paired it with, except for the Nordic. I've attached a picture of the function. 

    I know that the original intention of this demo was the connect to Android, so I'm wondering if there are any special security levels or whitelisting that is required to connect to the board with a socket? As far as the board goes, I'm not even seeing an attempt at connection. I can confirm the socket code I'm using now work elsewhere, so I'm thinking that maybe it's returning faster than it can connect to the Nordic board.

    Any tips connecting to the Nordic board manually would be helpful.

  • Hi Richard

    Have you tried to connect to one of the simpler Nordic examples?

    Such as the ble_app_uart or ble_app_hrs example. 

    It would be interesting to know if this is a general problem with the Nordic examples, or something exclusive to the image transfer demo. 

    I am not very familiar with Linux BLE programming, but will get some help from one of the gurus in the office. 

    Best regards
    Torbjørn

Reply
  • Hi Richard

    Have you tried to connect to one of the simpler Nordic examples?

    Such as the ble_app_uart or ble_app_hrs example. 

    It would be interesting to know if this is a general problem with the Nordic examples, or something exclusive to the image transfer demo. 

    I am not very familiar with Linux BLE programming, but will get some help from one of the gurus in the office. 

    Best regards
    Torbjørn

Children
No Data
Related