-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull initial Digirig support #382
base: master
Are you sure you want to change the base?
Conversation
I'm going to base the new AfskProto protocol implementation on the existing KissProto. Make a copy of KissProto and commit it separately to ensure that it's clear what I've changed.
This includes the changes that I needed to make to Charlie's original commit, as well as the changes I made to the copied KissProto implementation. The UI stuff on the app looks mostly correct at this point, and I believe the bones are there to get packet tx/rx working.
While testing a build of this PR, I am getting an immediate crash when I try to "Start Tracking" after enabling DigiRig in the settings. I have not had a chance to dig deeper yet:
|
OK, well, I was able to bypass that crash by adding a
|
It sounds like you might not be testing with a Digirig? Please let me know if I'm wrong about that, and I'll definitely look into it. However, if your issues are with different hardware, I think they should be considered a separate effort from this PR. |
You are correct that I am not using a DigiRig for my testing. I am trying to get it to work with AIOC, however the two crashes I posted don't seem to have anything to do with the hardware, but with how PendingIntents are handles on newer Android API levels. What version of Android did you develop this under? I am using a Pixel 7 Pro with Android 13 (API Level 33). Can you try this under the Android Emulator with API level 13? You will need to set up USB passthrough which seems possible, but I haven't done it before myself. |
OK, I finally understand what the crash is. The fix is merely that you need to pass a flag in when creating the To sum up, please add You can read more about that here: PendingIntent.FLAG_MUTABLE |
Starting with API level 31, a flag for mutable or immutable intent is now required or an exception will be generated crashing the app. This fixes a crash seen in PR ge0rg#382
I'll test this on my device, but I'd still argue that building for a different Android target than the official release is outside the scope of the work that I'm doing here. I specifically set up my environment to build exactly like the production version so that I didn't have to fight with issues that don't exist in production. |
I am a little confused at to what you are referring to. I am building the for the official SDK target that the upstream APRSdroid is targeted for. The
What Android version are you testing under? This crash will only be seen under Android 12 (API level 31) and newer. If you are testing under an older Android release, you won't see any crash and this patch shouldn't change any behavior, although I haven't been able to test it yet under older Android. |
I apologize if I've confused things by bringing up the AIOC board, but my recent comments related to the crash I am seeing are not specific to that board. I've sent you a PR with the fix I am talking about in bxlentpartyon#1 and I expect it to be a simple patch to review. This issue should also affect the DigiRig on newer Android versions. I am also trying to expand your code to support the AIOC board that I have, but that is above and beyond what is in your PR and I am not expecting you to have to do anything. Once I can get this board also working, I'll create a PR to send to either you or @ge0rg, if your PR is approved and merged in by that time. This is great progress you have made and I am pleased to help beta test the code on my set-up! |
I got myself confused looking at the error that you hit here - I'm now understanding that this is an actual issue with my branch, just not one that I'm hitting, because I'm using a pretty old device. I will pick your commit on top of my branch so that it gets included with this PR, since I do believe that it probably belongs with it. Apologies for the confusion here! |
I originally had some hacky code in here to _hopfeully_ ensure that the RTS signal was raise while packets were being transmitted, but it was only a best-guess attempt. This commit implements an OnPlaybackPositionUpdateListener to tell us exactly when the audio for a packet has finished playing, so we know exactly when to clear the RTS signal.
Starting with API level 31, a flag for mutable or immutable intent is now required or an exception will be generated crashing the app. This fixes a crash seen in PR ge0rg#382
e93b820
to
d308e42
Compare
Branch has been updated - I'm still doing some testing, but, as you mentioned, the patch is pretty simple, so I'm not concerned that pulling it in is going to have unintended side-effects. Thanks for the additional improvement here! |
Any update on this? I just found this branch and seems like this is exactly the problem I am facing on my Alinco DR-735T and Digirig trying to run on my Samsung A9+. |
I don't think I ever ran my own build with @penguin359's fix for this, so that is likely why you're still seeing the issue. I will try to run a build tonight with the fix in place and post another release. |
I realized after looking at this some more that I did actually post a more recent release, but I didn't link it over on the issue, or on here. Did you try this release: https://github.com/bxlentpartyon/aprsdroid/releases/tag/digirig-v1.1 Or just the one that I linked over in #382 a while back? @skteagle |
I did download and tried to install that release. I am getting this invalid error when I try and install that version. |
Thanks for these efforts, I've been watching for a while. I tested the 1.1 build. On several occasions I had a situation where upon transmission I get: Presumably RF is putting the digirig/phone into a bad state so the transmitter stays keyed indefinitely which is discussed in the digirig troubleshooting. Likely this can't be solved in APRSDroid, but it's a potential problem with RTS control that people should be aware of. If you've already lost control of the port/RTS then presumably this won't work, but I wonder if there could be other locations in the code where it would make sense to attempt |
Definitely would need a ferrite with this kind of setup. |
Would anyone happen to have any idea why offline mapping doesn’t work with this version of APRSdroid? It won’t load my map file. I wish they would just merge this branch into the main branch and put out an updated apk |
I have been releasing updated versions of APRSdroid (unofficial) which supports mbtiles mapping. It's not as simple as the old school offline maps version was. The reason offline maps is broken is due to the old mapsforge and Android changes. In my build I have a simple workaround. I also have added many features. Feel free to reach out if you need help. Email is on QRZ. |
Indeed @kd2var, @na7q has generously looked into the problem for what is probably a small niche of us who need offline maps for SIM-less devices (so updates to it are done via a host on USB). I have unfortunately not been able to test his work around because my device is storage constrained and I don't have much space to put MBTiles on it nor free up much space for them in parallel. Several other apps I use still rely on Mapsforge basemap files so they have to stay. It would be an ideal situation if APRSdroid could support V5 of Mapsforge and I could update them all in one swoop but that is seemingly a dead end. So I'm still on an old version of APRSdroid along with keeping V3 Mapsforge files for the time being. They are very old but for my purposes the lack of updates is not critical yet. And none of the bugs in APRSdroid are anything more than annoyances either. So it goes. 73, AC0VH |
Digirig support has been added to my builds. I don't have a way to test it, so you're on your own there. https://na7q.com/wp-content/uploads/2024/12/aprsdroid-release-noapi.apk |
Pull Digirig support into master.