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

How to advertise more than 31 bytes, but less than 255 bytes

I have two nRF52840 dongles, an nRF52 DK, several Linux PCs with USB 3 connectors, and both an Android Samsung S20+ and iPhone 12 Pro - both which I have proven are capable of extended advertising - and have the following primary needs:

  1. To be able to write a sending application in C (called the sender) that is installed on a linux machine that I can use to cause the nRF52840 dongle to advertise between 31 and 255 bytes (with associated Service UUID), with the first n characters being a constant magic number that identifies that such advertisements belong to this system, with the info to be advertised passed to the dongle from the sender application.
  2. To be able to write a receiving application in C that is installed on a linux machine that receives the above advertisements (and associated Service UUID) from a receiving nRF52840 dongle, which dongle filters any advertisments it receives using the magic number at the start of the message, and passes all messages (and associated Service UUIDs) with that magic number to the receiving application, which in turn pipes the info elsewhere.
  3. Just to be clear, we are seeking to send advertisements that are between 31 and 255 bytes, where the receiving device filters them based upon a magic number at the start of the advertisement, and this is because (at the start) the receiving devices will be unaware of which Service UUIDs to look out for.

It seems to me that a simple 'Hello Extended Advertising' sample would help me get on my way to producing these applications, because the requirement to send more than 31 bytes but less than 255 bytes, distinguishes between BT 4 and 5, with the latter incorporating the Extended Advertising protocol.

However, I can't find a sample that allows me to specify a Service UUID and Message of such a length and simply send it - with the further need being that a program on the linux machine should specify the UUIID and Message for sending, as well as any other info and/or switches, as necessary.

Similarly, I haven't found a sample that shows how to receive that which is sent above, nor pass it to an operating system application.

  • Does anyone have any training resources that would allow me to do the above?

Secondarily, I want to be able to both receive and send the above information using the nRF52 DK, so does anyone have any training resources for that?

And Thirdly, I then want to be able to both receive and send the same information from an Android phone, and iPhone, but using the Xamarin framewo0rk for both, and NOT Java and Objective C (or Swift respectively).

We've just spent £10k on a patent application for a device that needs all of the above interoperability, but we are struggling to make any headway as per the above questions.

We'd very much appreciate any help, which I'll summarize into the following headings:

  1. Sending Extended Advertising (between 31 and 255 bytes) using a nRF52840 dongle to send, initiated from Linux
  2. Receiving Filtered Extended Advertising (between 31 and 255 bytes) using a nRF52840 dongle to receive, passing the results to a Linux app
  3. Using the nRF53 DK as per 1 above
  4. Using the nRF52 DK as per 2 above
  5. Sending Extended Advertising (between 31 and 255 bytes) from an Android device, using the Xamarin Framework, so that it can be received by 2 and 4 above
  6. Receiving Extended Advertising (between 31 and 255 bytes) from an Android device, using the Xamarin framework, as sent from 1 and 3 above
  7. The same as 5 above but for iPhone, also using the Xamarin framework
  8. The same as 6 above, but for iPhone, also using the Xamarin framework

I've been looking at the Nordic documents for a few weeks but have made very little headway into this.

I have all of the hardware mentioned above, and have the toolset fully installed.

I'd be most grateful for any help as we have just 3 months before we have to have a demo ready for our investors.

Kind regards! 

Related