Over my vacation to New York I programmed the PIC controller to interface with the AMS002 module instead of being controlled over the serial port so I could test it using the Android app. This ended up being extremely easy. The only change I really had to do was change the error message from ? to str this way it would switch the BLE device into stream mode on any kind of error and I could talk to the phone.
The Android side of things was also very easy. Transitioning to the TruConnect interface of packets containing a serial stream just required some minor tweaking of loops. Then I just had to change it to use Base64 encoding an decoding which already exists in the Android utility library.
In my initial testing I saw you could configure a custom Service UUID in the TruConnect Service. I tried it once changing from the default service UUID 175f8f23-a570-49bd-9627-815a6a27de2a to a randomly generated one (53f06320-d9d2-11e4-8830-0800200c9a66). However even after numerous power cycles I was unable to get it to use the new service ID and changed the app back to the default one as well as resetting the UUID in the flash memory of the device. Or atleast so I thought. I may have forgotten to do SAVE command to commit the new UUID to memory. Either way the observed behaviour is quite puzzling. I used the app with the radio for several days and it worked fine. But this morning I got nothing out of it. Interestingly enough I found it was using the new UUID I had given it several days before and given up on.
I really have no Idea how this happened. But it certainly is something to watch out for if you are using these modules and plan to program custom UUID's into their firmware. It may not work when you try it and then days later start doing what you asked!
Going forward I plan to design and order the prototype boards for the non breadboard prototype by the end of this week. Typically I get board back from OSH park in about 3 weeks so expect some pictures of the prototype then. While I'm waiting on the boards I plan to work on the android app. Shining it up from the raw test program it is into a actually useful APRS app that can be as simple as a locator beacon to as advanced as a full fledged Digipeater, IGate, tracking station.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.