Connecting two Tag-Boards via bluetooth

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

has anybody experience in connecting two Tag3-boards via bluetooth.

I am looking for a function which I can use for establishing a bluetooth connection to a certain device. The function "bleprofile_Discoverable(HIGH_UNDIRECTED_DISCOVERABLE, NULL);" seems not the right one.

Best regards,

Christoph

0 Likes
1 Solution

Please have a closer look at hello_sensor and hello_client.  The client connects to sensor (in addition to client accepting connection from iOS or Android, or anywhere else).  To establish connection peripheral needs to send advertisements.  When central see advertisements it can decide to connect.  In majority of cases peripheral sends undirected advertisements and any client can see them.  In a very few cases (for example PC and LE HID device), the peripheral can send directed advertisements and central should connect.  If you decide to go this path you need to modify your code to call bleprofile_Discoverable(HIGH_DIRECTED_DISCOVERABLE, remote_addr);.  Of cause it can happen only after initial connection/bonding that you know the address of the central that you need to connect to.

View solution in original post

3 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Take a look at the hello_client and hello_sensor example apps within the SDK as they were designed for this type of use case. These profiles are not only useful for demonstrating connecting a sensor/peripheral to a client/central, but also show how to send data to and process write requests from the client.

In addition, there are iOS, Android and Windows based peerapps included that serve as excellent examples.

0 Likes
Anonymous
Not applicable

Thank you for mentioning the hello_client and hello_sensor projects with their iOS, Android and Windows counterpart software. I have already run this two projects and make my own bluetooth project betwee Android and Tag3-Board.

But now I am trying to establish a bluetooth connection between two Tag3-Boards (without Android). One Tag3 board should be the central and the second the peripheral.

My problem is that I don't find any function in the SDK for connecting the peripheral to a dedicated central.

0 Likes

Please have a closer look at hello_sensor and hello_client.  The client connects to sensor (in addition to client accepting connection from iOS or Android, or anywhere else).  To establish connection peripheral needs to send advertisements.  When central see advertisements it can decide to connect.  In majority of cases peripheral sends undirected advertisements and any client can see them.  In a very few cases (for example PC and LE HID device), the peripheral can send directed advertisements and central should connect.  If you decide to go this path you need to modify your code to call bleprofile_Discoverable(HIGH_DIRECTED_DISCOVERABLE, remote_addr);.  Of cause it can happen only after initial connection/bonding that you know the address of the central that you need to connect to.