travisgoodspeed / md380tools

Python tools and patched firmware for the TYT-MD380
804 stars 245 forks source link

GPS data and maidenhead implementation #864

Open ghost opened 6 years ago

ghost commented 6 years ago

Related to #160. I've been poking at the GPS and playing with a maidenhead square implementation.

GPS data is now easily available, and parsing correctly, but I don't know the signs of lat and lon and the current comments don't match my data, so they are just always positive for now. Some of the maidenhead functions are just stubs, but a few critical ones (latlon->maidenhead and back) are done and tested.

I have tested on one GPS MD380V for testing the new stuff, and one non-GPS MD380U to make sure the new code doesn't cause build or flashing problems.

This is my first stab at applet code. Does it look alright?

DL2MF commented 6 years ago

Great implementation, has much potential for new features. I did implement it on my dev repo, it compiled without any errors and I was able to flash my MD-390/G. But the radio became very unstable after a few minutes, with or without GPS fix the menu was frozen, after a new startup it was rebooting itself after 4-5 mins, USB dmesg also frozen ...?

Please can anyone else test, building an image with this PR and confirm it with MD-390G?

ghost commented 6 years ago

I have an early MD380G in VHF, and it's been stable so far. I'll leave it on and keep an eye on it!

DL2MF commented 6 years ago

My own branch is ahead the master, but without the new GPS feature it's stable on my MD-390/G UHF. Can you please make a flash_S13 build and mail the experimental.bin to mycall@darc.de or give me a download link?

ghost commented 6 years ago

@DL2MF Try this: http://w2fbi.com/files/MD380/20180406_81206af_experiment.bin

DL2MF commented 6 years ago

Did flash your version, running and waitung until GPS fix. Then connected to USB, starting dmesgtail and pressing RedKey gives GPS Data in hex and decoded correct format. After 3rd GPS frame request (by keypress) the radio is rebooting again.

ghost commented 6 years ago

I might be reproducing the issue. I just got a freeze, where no controls get a response , display doesn't get an update, and USB with dmesgtail shows no hints or new output (but doesn't die, either).

I haven't figured out the pattern yet, but I'm taking notes and trying to recreate whatever happened now.

ghost commented 6 years ago

Alright, I can consistently get it to crash following this pattern: Turn on, press "8" key to get the netmon with a spinner in the top left to help identify crashes. turn on dmesgtail. Press the "8" key several times. I do not know yet how many are necessary, but 10 is sufficient. Radio crashes within next three minutes or so, often very shortly (seconds) after the screen dims.

Edit: It has been crashing with this much simplified procedure: Radio is connected to computer. Turn on radio, start dmesgtail. Crash within 6 minutes.

Further edit: @DL2MF Can you confirm your reboots /only/ happens on my build? I am actually getting crashes on the official master branch (e396ded) following the above procedure, but only on my VHF+GPS radio. UHF no gps seems rock solid no matter what. So far, it is rock solid on the VHF GPS radio as long as it's not being dmesgtail'd, issues with which would seem at first glance to be #295 related.

DL2MF commented 6 years ago

Sorry, I've been very busy the last weeks. Will start regular work on MD380tools now again, but with very small time budget. Just updating all my repos to make a fresh build including all latest changes.

DL2MF commented 6 years ago

Further edit: @DL2MF Can you confirm your reboots /only/ happens on my build?

@mach327 Using the current build from the official repo md380-tool dmesgtail is running fine with traffic on repeater, scanmode and several keyb inputs to swap between netmon 1/2/3 since > 1h on my MD390G UHF.

DL2MF commented 6 years ago

@mach327 I'll add your latest GPS code to my dev repo within the next 3-4 days again. Then looking again for the reboot issue.

ghost commented 6 years ago

I'll go through and test it all again as well, hopefully sometime this week.

zero48 commented 6 years ago

Hello. is there a way to get the Lat/long data to be sent out using the USB port on a Given RX radio ?

ghost commented 6 years ago

@zero48 If you just want the current position of your radio - essentially a low quality USB GPS - yes, that's part of this pull request. If you want received DMR position packets from other radios, no - or at least, not yet. Developer time and pull requests welcome, and I'm more than happy to help new folks get involved. :)

fiveangle commented 2 years ago

Given the age of this PR, I'm guessing APRS functionality anytime soon is pretty much out of the question ? (just researching DMR radios with APRS and so far only coming up with the Anytone 878/BTech 6X2 🤷

Thanks !

-=dave