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
MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- williamlynn
- Posts: 74
- Joined: Fri Dec 17, 2010 5:51 pm
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)
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.
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.
- williamlynn
- Posts: 74
- Joined: Fri Dec 17, 2010 5:51 pm
Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)
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
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
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)
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.
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.
- williamlynn
- Posts: 74
- Joined: Fri Dec 17, 2010 5:51 pm
Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)
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
" • 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
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)
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.
I'll check with the developer to see if anything needs to be updated.
- williamlynn
- Posts: 74
- Joined: Fri Dec 17, 2010 5:51 pm
Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)
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
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
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)
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.
- Seekwill
- Posts: 3
- Joined: Fri May 13, 2016 5:08 pm
Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)
Hey! I've been a bit backed up, but I'll come up with a fix ASAP
- Seekwill
- Posts: 3
- Joined: Fri May 13, 2016 5:08 pm
Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)
I've just updated Basic Chat on Github. Thanks for your patience.
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)
Thank you Trevor!
- williamlynn
- Posts: 74
- Joined: Fri Dec 17, 2010 5:51 pm
Re: MULTIPLE BLUEFRUIT nRF51(PRODUCT ID#2633)
Trevor
Thank you.
It works as advertised.
Bill
Thank you.
It works as advertised.
Bill
Please be positive and constructive with your questions and comments.