June 30, 2017 at 11:41 pm #60272
Hello Richard et al,
I’ve reached out to ACS with this question since it’s really an ACR35 issue and not related to Flomio. I haven’t heard back from them yet, and since you’ve had extensive experience with this hardware, I thought I might ask for some guidance here.
I’m currently using the ACR35 with the ACS drivers under Swift on iOS 10. I’m using a polling loop to keep the reader awake as you’ve suggested in other forum threads. As users navigate to areas of my app that don’t require the ACR35 hardware, I send the sleep command and mute the microphone to conserve battery.
The trouble is that when users navigate back to the NFC reading portion of the app after allowing the ACR35 to sleep for an extended period (5-10 minutes will usually reproduce the issue), I’m not able to reliably wake up the reader. Here’s my sequence:
1. Call reset() from the Main thread
2. In the readerDidReset delegate, I set up a scheduled timer to run every 1.5 seconds.
3. When the timer fires, I issue a piccPowerOnWithTimeout command (from the timer thread) with a timeout of 1 second.
4. The delegates for didNotifyResult and didSendPiccAtr are never called.
After polling in this fashion for many cycles (sometimes 5 or 6, sometimes 10, sometimes 50), the reader eventually starts responding and calling the delegates.
I’ve tried different sequences for waking up the reader. I’ve tried longer timeouts on both the scheduled timer and the power on command. I’ve tried doing a reset/sleep/reset (which I saw in the stuart-xyz/acr35 Cordova wrapper).
Any tips you can give me about how to reliably wake this thing up and start reading NFC tags?
Thanks for any help or direction you can provide!
ScottJuly 2, 2017 at 12:53 pm #60279
Hi Scott, we feel your pain. It’s been a few years since we originally authored our first ACR35 app and that work has evolved into a comprehensive Flomio SDK we now license to customers. From what we’ve learned, the audio jack interface is like the worst channel to dependably send and receive data with an accessory. Performance varies so wildly across host hardware that you end up with spaghetti code, and it’s hard to build a business on a tech platform like that. BLE is a much more standardized interface and our FloBLE readers give much better results in terms of reading tags quickly and reliably.
That being said, to properly reset the ACR35 after putting it to sleep I wouldn’t use timers like you’ve done. The ACR35 time has a heartbeat timer of it’s own so you’re likely colliding with sync traffic it’s working through. The best way is to use the less documented
resetWithCompletionmethod. Here’s a link to it in the API docs. You also need to make sure your device is supported by the ACR3x driver per this list.
hope that helps,
RichardJuly 2, 2017 at 1:45 pm #60280
I do like the BLE approach and you’re convincing me to really consider moving that direction in the future, but with 20 of these ACR35’s I’m committed to the platform at least for the near term.
We depend on the magstripe reader in addition to NFC. We use these devices for check-in at live events (beer festivals are the best example). Check-in often includes scanning a driver’s license (either by magstripe or bar code), tapping an NFC-enabled tasting glass, and swiping a credit card (again, magstripe) to enable cashless payments. Having all of that in a single, handheld device has been incredible….when it works.
I should have mentioned that I’m already using resetWithCompletion to wake up the reader. In that completion handler I start my keep alive timer which calls piccPowerOnWithTimeout on a regular interval to keep the device awake. The trouble is that it doesn’t always respond to the piccPowerOnWithTimeout command after being asleep for a long while.
Thanks for the help,
ScottDecember 7, 2017 at 3:38 am #61785
Its being 4 months this question was asked. I am facing the same problem with ,y ACR35 on waking up the device from sleep mode. Any solution was found on how to wake this device up and start reading NFC tags?December 7, 2017 at 5:36 pm #61791
Hi Anm, we have not experienced the issues that @Scott points out in this thread. Our Flomio SDK and test application support the sleeping and waking of the ACR35. You can try this with the Flomio Test application available through TestFlight by registering here.
RichardDecember 10, 2017 at 12:34 am #61811
I checked out the testflight test application, its for iOS, Im working on ACR35 for android, is there a test SDK for Android. Thank you.December 10, 2017 at 8:44 am #61813
Hi Anm, we do have an SDK for Android but we haven’t added support for the ACR35 since we are in the process of phasing out audio jack readers. BLE based readers are much more sustainable for our business model and will be what we invest in going forward.
That being said, we do offer Flomio Service hours for some customers to sponsor activities that may be outside our business scope. I would estimate adding ACR35 support to our Android SDK would take 30 to 40 hours of work.
RichardDecember 10, 2017 at 8:51 am #61814
Thank you Richard. I managed to program the ACR35 in a way of keeping the device awake without sleep with continuous power on to read NFC cards when touched over. If i face any issue or additional feature i would request for outside support 🙂
You must be logged in to reply to this topic.