CPB Not Showing on All Devices - Still Having Advertisement

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
gallaugher
 
Posts: 267
Joined: Tue Aug 14, 2018 12:42 pm

CPB Not Showing on All Devices - Still Having Advertisement

Post by gallaugher »

Hi! I've been doing a lot of work with the CircuitPlayground Bluefruit, but notice intermittent issues. In tonight's project, the Bluefruit app running on my iPhone recognizes the CPB device I'm testing, however the iPad and MacBook Air M1 aren't recognizing the device in their respective Bluefruit Connect apps. Things I've tried:
- Turning off and turning on bluetooth in the devices where the device doesn't show.
- Turning off the iPhone that shows the bluetooth device and keeping it off while I turn on the iPad and Mac - but neither shows the CPB.
- Turn the CPB off, then on again.

I've currently been waiting over 20 minutes. Settings on all apps are identical - Bluetooth is on, "Show Unnamed Devices" and "Must Have UART Service" are both checked. No devices show up in the iPad or Mac apps.
Really worried I'm going to run a class with CPBs this Fall & things aren't going to work as planned, torpedoing the lesson. I "think" I'm doing everything correctly. The device has CircuitPython 6.3 installed.
I haven't rolled back to CircuitPython 5 to try it, but I had previously used lots of CPBs with CP5 in classes and never noticed this situation before.

More weirdness. The iPad and Mac CAN recognize another CPB project in the room if I turn that on, just not the first one. And the restarted iPhone recognizes the first, but not the second CPB project.

Related - even though I set .advertisement in the code, even when the device is recognized, the advertisement name rarely shows. Have tried all steps above. I have noticed occasionally that the name will flash on briefly when I tap the device's default name (some form of CIRCUITPY).

Any thoughts are most welcome.

User avatar
gallaugher
 
Posts: 267
Joined: Tue Aug 14, 2018 12:42 pm

Re: CPB Not Showing on All Devices - Still Having Advertisem

Post by gallaugher »

Here's some more context:
Three devices running Bluefruit Connect app: iPhone, iPad, MacBook Air M1. All three are in the same 7' x 8' room.
Two separate projects are also in the same room, both running CircuitPlayground Bluefruit and CircuitPython 6.3. I know that you can't connect to one device if another device is already connected to it, but that's not the problem. What I see is:
- iPhone only sees the first project (advertisement named "small-mason-jar-nightlight", although this name never shows up).
- Mac and iPad only see second project (advertisement named "HackSign"). BTW: the "HackSign" name never shows on the iPad. It does show on the Mac after connecting to it.
Even though I've shut off CPBs, and the iPhone, iPad, and Mac, plus bluetooth (restarted with Bluetooth coming on during restart) I still see this behavior.
Here are three things to provide context.
Video of the "HackSign" connect on the Mac ("small-mason-jar-nightlight" is not visible on the Mac's Bluefruit Connect app even though this device is on and is visible in the iPhone. Notice .advertisement name is only picked up after the device is connected to).
https://youtu.be/i8ufSKS9H0Y

Here is an image of the "HackSign" project showing up without the advertisement on the iPad. The generic name shown does NOT change even after connecting, like it does on the Mac. This device also does not show "small-mason-jar-nightlight" even though it's on & is showing on the iPhone:
iPad HackSign.png
iPad HackSign.png (209.72 KiB) Viewed 159 times
Finally, here is the iPhone that shows ONLY the generic name for the CPB project "small-mason-jar-nightlight". It does not pick up on the CPB project named "HackSign" even though it's in the same small room:
iPad HackSign.png
iPad HackSign.png (209.72 KiB) Viewed 159 times
Again - even though all devices (CPBs, mobile devices / computers) have been restarted, the weirdness continues with the iPhone only recognizing one CPB, while the other two devices recognize the second, but don't show the first project. All devices (iPhone, iPad, Mac) are on the same WiFi network, not that this should matter.

Hope this is useful if I'm surfacing a problem. If I've missed something obvious, please LMK. Thanks!
John
Attachments
iPhone App.png
iPhone App.png (267.02 KiB) Viewed 159 times

User avatar
gallaugher
 
Posts: 267
Joined: Tue Aug 14, 2018 12:42 pm

Re: CPB Not Showing on All Devices - Still Having Advertisem

Post by gallaugher »

Another update. After about half an hour the iPhone DID recognize the two CPBs as generically named projects (didn't use their advertisement names). The Mac & iPhone still aren't recognizing the first project "small-mason-jar-nightlight", even after disconnecting the iPhone from the first project and powering down the iPhone are restarting the Bluefruit Connect apps on the Mac & iPad.

User avatar
gallaugher
 
Posts: 267
Joined: Tue Aug 14, 2018 12:42 pm

Re: CPB Not Showing on All Devices - Still Having Advertisem

Post by gallaugher »

Finally - code hasn't been cleaned up yet, but if it's useful, here are the two GitHub repos. I doubt the code is the issue here, though, since we're seeing differing behavior on two different CPBs within CircuitPlayground Bluefruit apps across three devices.
First Project "small-mason-jar-nightlight" is in code.py at:
https://github.com/gallaugher/small-mas ... nightlight

And HackSign is in code.py at:
https://github.com/gallaugher/HackSign

Thanks again!
John

User avatar
gallaugher
 
Posts: 267
Joined: Tue Aug 14, 2018 12:42 pm

Re: CPB Not Showing on All Devices - Still Having Advertisem

Post by gallaugher »

SOLVED:
Found a forum post mentioning that advertisement names should not be more than 11 characters. Once I changed this, the errant device showed up on the iPad and the Mac. The iPad still never shows the Advertisement name, even when the device (not 'Connect' button) is clicked in the device selection list. The Mac flashes the advertisement name on and off occasionally. Definitely recommend surfacing the name length issue (this does seem what I'm experiencing) earlier in the docs. As always, thanks for making and updating such wonderful products!
John

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

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”