I'm finishing up a small project built around a Simblee device using SimbleForMobile, and have run in to some friction now that I'm moving off my benchtop breadboard and into the first of two deliverable finished units. I'm using the current release of the libraries in the current Arduino IDE, and exercising the hardware with the For Mobile app on Android (Nexus 5 running 6.0.1 Marshmallow).
If I flash the same firmware into two Simblee devices, they both appear in the app's list showing identical device name and advertisement. That makes it fun to guess (based on RSSI and distance) which is which device. So I added some code to modify the advertised device name based on a hash of the nRF's factory assigned DEVICEID computed at run time. That works like a charm, and now I have "Block B" and "Block J" and can tag the two blocks easily.
Except that the phone app is now only talking to one of the boards. If I flush the app's data and cache, I can then talk to the other board, and not the first. Having the Arduino IDE reflash a board also seems to make that board be the working board. Until "something" happens.
I'm specifying deviceName, advertisementData, domain, and baseline. For a while it looked like adding domain and baseline was the trick, but after my latest build, that isn't doing it any more.
I just tried again with the SimblyForMobile Temperature example, and it has the problem.
To reproduce, do some of the following:
- Load Temperature in a Simblee
- Verify that works from Android, touch the chip and see the temp rise
- Switch that Simblee to battery
- Verify it still works from phone
- Load Temperature in a second Simblee
- Separate the two by several feet so you can tell them apart
- Note phone shows two Simblees, one near, one far.
- Access the far one. Touch the chip to verify.
- Access the near one. Touch the chip to verify.
At some point, the phone says "Unfortunately For Mobile has stopped."
Clicking OK takes you back to the list of Simblees screen. The other Simblee will still work.
I don't know if the iOS app has the same problem. This is obviously a problem for anyone needing to have multiple units within BLE reception range that contain the same firmware. I can't tell at this point whether the problem is firmware of phone. Either way, I'm feeling frustrated.