Author Topic: Potential SDK v2.2.2+ and iOS 8.2+ conflict related to analogRead()  (Read 1393 times)

notsolinear

  • RFduino Jr. Member
  • **
  • Posts: 52
  • Karma: +3/-0
    • View Profile
Over the past few months I've been updating my RFduino SDK and keeping up with Xcode updates as well. I recent got a note from a freelance customer than newer builds I made were no longer staying connected to RFduino, which I confirmed.

I'm still in the process of tracing the root of the issue, but I believe I've narrowed it down to:

On iOS 8.3 devices recent builds of apps that should be receiving a steady stream of data from RFduino are suddenly seeing the stream stop. The BLE connection does NOT drop. Log lines on each main() loop seem to indicate that RFduino's main loop is also hanging.

In a nutshell, the RFduino firmware is sampling analog values from 4 pins on a timer (Timer.h v1.3 attributed to Jack Christensen) at 400Hz and pushing this out BLE to the iOS device. It's worked flawlessly for quite a while. I started restoring old RFduino SDKs in order and found that 2.2.2 has the problem while 2.2.1 does not. I think it's probably not coincidental that 2.2.2 release notes refer to changes in analogRead.

I realize this is probably difficult to comment on without an example project demonstrating the issue. I will work with my freelance client on that front, but do any minds smarter than mine see any obvious issue with the analogRead changes made in RFduino v2.2.2?

tolson

  • Global Moderator
  • *****
  • Posts: 827
  • Karma: +19/-0
    • View Profile
    • Thomas Olson Consulting

notsolinear

  • RFduino Jr. Member
  • **
  • Posts: 52
  • Karma: +3/-0
    • View Profile
Re: Potential SDK v2.2.2+ and iOS 8.2+ conflict related to analogRead()
« Reply #2 on: April 14, 2015, 10:35:56 PM »
Awesome. Sounds very similar, I will be watching that thread to see how it ends up. Doesn't quite explain the perceived effect of iOS version/SDK but perhaps that was coincidence or yet another issue. Will have to wait and see.

Thanks again.

tolson

  • Global Moderator
  • *****
  • Posts: 827
  • Karma: +19/-0
    • View Profile
    • Thomas Olson Consulting
Re: Potential SDK v2.2.2+ and iOS 8.2+ conflict related to analogRead()
« Reply #3 on: April 15, 2015, 03:38:51 PM »
The fix that orenlederman pointed out seems to work and I've made the same change to my 2.2.4. Seems to work OK. And it now has been corrected in 2.3. But 2.3 can only be installed using the new Arduino method in 1.6.3+.


 

anything