MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
williamlynn
 
Posts: 74
Joined: Fri Dec 17, 2010 5:51 pm

MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Post by williamlynn »

I have app using multiple BLUEFRUIT nRF51 modules. I am using the BASIC CHAT app; how can I select a particular module.

All the modules show in the BASIC CHAT scene but the module that gets connected is random no matter which module I select.
I have to shut down the modules that I do not want to connect to.

Can you provide guidance on how I can develop the app so the module I select is connected.

Thanks
Bill

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Post by adafruit_support_mike »

The easiest option is to have each BLE module advertise a different device name.

You can also give each BLE module a characteristic that contains an ID number transmitted to it by the BLE central. The central can keep track of the IDs it's assigned, and make sure that no two peripherals get the same ID. The peripherals can also add their assigned ID to their advertising packet so the central doesn't have to open a connection to identify them.

User avatar
williamlynn
 
Posts: 74
Joined: Fri Dec 17, 2010 5:51 pm

Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Post by williamlynn »

Each module is advertising a different device name.

I changed the default name from Adafruit BLE to xxxx and yyyy.

The app seems to accept the module that is at the top of the list.

Bill

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Post by adafruit_support_mike »

To change that, you'll need to modify the code that detects peripherals and displays them.

The code from that project is only a framework to help people get started writing their own BLE apps. It isn't intended to be a full-featured application.

User avatar
williamlynn
 
Posts: 74
Joined: Fri Dec 17, 2010 5:51 pm

Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Post by williamlynn »

The documentation(link below) says that the BASIC CHAT app does the following
" • Once we've found matching peripherals, we'll display them in a table view and allow the user to choose a peripheral to connect to. "

https://learn.adafruit.com/crack-the-code

The problem with the app is that it doesn't allow me to "choose a peripheral to connect to. ", so there must be a bug in the app and I am asking Adafruit to advise what code is missing or incorrect so I can get the app to work as advertised.

Appreciate your help.

Bill

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Post by adafruit_support_mike »

The code is written in Swift, which is still a moving target. I know it's gone from Swift-2 to Swift-4 since that tutorial was written.

I'll check with the developer to see if anything needs to be updated.

User avatar
williamlynn
 
Posts: 74
Joined: Fri Dec 17, 2010 5:51 pm

Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Post by williamlynn »

Thank you for understanding.

FYI Swift is now SWIFT 4, IOS is now 11 and xcode is now 9.

If you can get the developer to upgrade to the current standards, it would help all of us that are struggling to understand.

Thanks again

Bill

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Post by adafruit_support_mike »

Yeah, I'm running all of those. The upgrade of Xcode9 was fairly recent though.. I was using the developer preview and Swift3 a month ago IIRC.

User avatar
Seekwill
 
Posts: 3
Joined: Fri May 13, 2016 5:08 pm

Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Post by Seekwill »

Hey! I've been a bit backed up, but I'll come up with a fix ASAP

User avatar
Seekwill
 
Posts: 3
Joined: Fri May 13, 2016 5:08 pm

Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Post by Seekwill »

I've just updated Basic Chat on Github. Thanks for your patience.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Post by adafruit_support_mike »

Thank you Trevor!

User avatar
williamlynn
 
Posts: 74
Joined: Fri Dec 17, 2010 5:51 pm

Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)

Post by williamlynn »

Trevor

Thank you.

It works as advertised.

Bill

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”