ge0rg / aprsdroid

APRSdroid - Geo-Location for Radio Amateurs
https://aprsdroid.org/
GNU General Public License v2.0
514 stars 100 forks source link

Yaesu FTM-400XDR packet data is a non-standard format #141

Closed aceat64 closed 7 years ago

aceat64 commented 8 years ago

I was able to connect my phone to the FTM-400XDR, but the packet data it is sending is split across two lines and includes some extraneous information. Due to this, APRSdroid is unable to properly parse the packets and display information about the objects/beacons/messages.

Here's a screenshot of how the packets appear in the app: http://i.imgur.com/MKLOQ6v.png

Could a configuration option be created to allow processing of these non-standard packets? It appears that the W2APRS app has had to add code specifically for handling these radios, though since it is closed source I'm not sure on the specifics. I've opened a support request to Yaesu to see if they will release a firmware update to correct the issue.

Below is a capture of the output from the radio's serial port. Note that sometimes a packet is followed by one newline, other times two.

W5NGU-3>APRX28 [08/13/16 00:26:22] <UI>:
;W5NGU-VHF*111111z3313.66N/09707.60WrW5NGU 146.920 pl 110.9 -0.6
W5NGU-3>APRX28 [08/13/16 00:26:23] <UI>:
;W5FKN-VHF*111111z3307.84N/09706.00WrW5NGU 145.17 pl 110.9 +5MHz
W5NGU-3>APRX28 [08/13/16 00:26:25] <UI>:
;WA5LIE/F *111111z3313.75N/09707.64WrWA5LIE/F Fusion 443.525 pl 118.8 +5MHz
N0FIB-7>SRTX6T,K5FTW-5*,WIDE2 [08/13/16 00:26:35] <UI R>:
`}5Wlp [/`"60}_$

K5VLK-8>SSQU1R,W5NGU-3,WIDE1*,WIDE2-1 [08/13/16 00:26:54] <UI R>:
`}_Xl -/`146.920MHz C110 -060 !SN! !DCARES_%

N3HA-9>APOTW1,W5NGU-3,WIDE1* [08/13/16 00:27:11] <UI>:
!3258.78N/09700.56W_087/000g002t080P082h91b10036OTW1
WD5RP-2>APTW01,K5FTW-5*,WIDE2 [08/13/16 00:27:37] <UI>:
!3241.74N/09711.24W_patten@flash.net
NT5HS-12>APT314,WIDE1*,WIDE2 [08/13/16 00:27:54] <UI>:
/130527z3305.15N/09639.97WP216/016/A=000679
N5WYN-1>APWW10,W5EEY-3,WIDE1,KK5PP-3*,WIDE2 [08/13/16 00:28:36] <UI C>:
>EM12vh/- APRSISCE/32
WD5RP-2>APTW01,K5FTW-5*,WIDE2 [08/13/16 00:28:41] <UI>:
!3241.74N/09711.24W_patten@flash.net
KC5TIL-3>APTW01,K5FTW-5*,WIDE2 [08/13/16 00:28:58] <UI>:
_08130027c299s000g004t077r000p016P004h88b10120tRSW
K5NRD-9>S3PQ5P,W5NGU-3,WIDE1*,WIDE2-1 [08/13/16 00:28:59] <UI R>:
`|RRl"3j/`"5w}146.640MHz T118 -060_%

WD5RP-2>APTW01,K5FTW-5*,WIDE2 [08/13/16 00:29:43] <UI>:
_08132328c293s000g008t078r000p000P043h68b10124tRSW
WD5RP-2>APTW01,K5FTW-5*,WIDE2 [08/13/16 00:29:47] <UI>:
!3241.74N/09711.24W_patten@flash.net

If more info or testing is needed, please let me know!

aceat64 commented 8 years ago

I have opened a support request with Yaesu to see if the firmware can be updated to output valid APRS packets.

aceat64 commented 8 years ago

Yaesu support is sending the issue over to the engineering team, with any luck they'll put out a new firmware to resolve this issue!

aceat64 commented 8 years ago

Update from Yaesu:

I have confirmed this issue with Tokyo engineering:

In FTM-400DR, the packet data such as APRS has the input and output, but the TNC function is not built in. Therefore, the transmission of the APRS in conformity with the communication method of AX25 is possible, but the 1200/9600bps common packet communication is not possible with APRS, such as an IGATE station operation.

dranch commented 8 years ago

I'm a little confused by this thread. It looks like you enabled APRS packet monitoring on your FTM400 which is a monitor-only function. The FTM400 does not support accessing the TNC directly in either a command mode or KISS mode to do say classic AX.25 packet or run your own APRS software (the Kenwood APRS radios do support this btw). I assume your issue here is that the FTM400's aprs monitor function, sending the decoded packets over the serial port is injecting these CR/LF in the data stream which is incorrect? If they have confirmed there is a bug in adding the incorrect CR/LF characters, hopefully they will correct it but you shouldn't expect them to add support for command or KISS TNC access. I've asked for years ever since the VX8 and FTM350 but they've never done it.

aceat64 commented 8 years ago

I've asked them only to correct the serial output to valid TNC-2 format, not to implement KISS or accept input/commands.

They seem to be confused (possible language barrier problem), I'm trying to clarify.

ge0rg commented 8 years ago

Got any more luck with Yaesu? Their output format looks rather kludgy, maybe you can force the modem into KISS mode instead? E.g. with Kenwood radios, there are TNC commands you can use for that...

dranch commented 8 years ago

Just an FYI but no Yaesu radios with APRS support (FTM350, VX8*, FT1/FT2/FTM100/FTM400) offer any KISS or classic COMMAND-style TNC interfacing.

aceat64 commented 8 years ago

Yaesu has stopped responding to my e-mails. It does not appear that they will ever offer output in a standard format.

aceat64 commented 7 years ago

This regex should work for identifying the bogus data and removing it, what would be the best way to implement this?

s/ \[[0-9][0-9]\/[0-9][0-9]\/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\] <UI ?[A-Z]?>:\n/:/
ge0rg commented 7 years ago

Thanks very much for the regex and for following up to yaesu on this. While I don't like their policy very much, it's all the same with the big manufacturers.

I've added another quirk to the APRSdroid monitor mode (which is currently still called "Kenwood (NMEA waypoint)") to parse the above format.

Please test this APK: https://aprsdroid.org/download/builds/APRSdroid-gl-2017-05-11_osm.apk

Configure it to Kenwood mode, connect to the radio and see if it will show the packets re-structured :)

aceat64 commented 7 years ago

Sorry for the delay, I've tested the APK and packets are being read correctly now. Thank you!

TomHenderson4 commented 7 years ago

I can also confirm the APK works, but that created a new problem for me. Now I can't display the map. Searching around a bit, it appears this is a version of APRSDroid that uses offline maps. Neat feature, but not something I need at the moment. Can I switch back to the native map while still using this APK?

Edit: Never mind, I found the newest APK APRSdroid-gl-2017-05-23.apk and am back in action.

Great app, by the way!

ge0rg commented 7 years ago

This code is also part of the latest 1.4 release candidate. Just use the latest non osm apk and you should be fine.

lknebusch commented 6 years ago

Has there been any movement on this topic in the past year? I still use the W2APRS and would love to be able to see the correct icons on the map. I know its a little trivial but one can wish.

ge0rg commented 6 years ago

This is part of APRSdroid 1.4, released in July of last year. You still need to configure the "Kenwood (NMEA waypoint)" mode, but you can use any of the supported connection types (Bluetooth SPP, USB serial) to connect.

lknebusch commented 6 years ago

Sorry for sounding ignorant, but I need to configure the "Kenwood (NMEA waypoint) mode" on my FTM-400? I am assuming you mean set the mode to "Waypoint" in my config? Does it catch all of the APRS reporting now? I "think" I have tried this and much of it was being ignored.

ge0rg commented 6 years ago

I don't know how the FTM-400 needs to be configured. I suppose it has some kind of "monitor mode" output setting.

The "Kenwood (NMEA waypoint)" mode is what you need to enable in APRSdroid under "Connection Preferences". As I don't have an FTM-400 device, I need user reports to see whether all monitoring data is correctly decoded or not.

APRSdroid will attempt to detect the monitor mode output of the FTM-400 and reassemble the two-line format like shown in https://github.com/ge0rg/aprsdroid/issues/141#issue-170995051 into single-line TNC2 statements. If that fails, it will display the lines normally in the log, without adding the respective station info to the map / hub.

lknebusch commented 6 years ago

Awesome! That was clear! I will be more than happy to help you test this or at the very least report to you want I experience. I LOVE this technology and will do what I can. I have been a programmer for 25 years now so it is not foreign to me at all. I also just stumbled onto this site while attempting to find applications for the FTM-400, so bear with me if I am not familiar with other threads that are in concert with this one.

TomHenderson4 commented 6 years ago

I can confirm it works with an FTM-400 in "Kenwood (NMEA waypoint)" mode. The problem is that Yeasu isn't adhering to the standard format in their output.

Tom Henderson

On 03/23/2018 10:42 AM, Georg Lukas wrote:

I don't know how the FTM-400 needs to be configured. I suppose it has some kind of "monitor mode" output setting.

The "Kenwood (NMEA waypoint)" mode is what you need to enable in APRSdroid under "Connection Preferences". As I don't have an FTM-400 device, I need user reports to see whether all monitoring data is correctly decoded or not.

APRSdroid will attempt to detect the monitor mode output of the FTM-400 and reassemble the two-line format like shown in #141 (comment) https://github.com/ge0rg/aprsdroid/issues/141#issue-170995051 into single-line TNC2 statements. If that fails, it will display the lines normally in the log, without adding the respective station info to the map / hub.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ge0rg/aprsdroid/issues/141#issuecomment-375708070, or mute the thread https://github.com/notifications/unsubscribe-auth/AcFr8uXL1VqGxpRMjnyT_Ha5a-x9YRuiks5thRfcgaJpZM4JjnYb.

lknebusch commented 6 years ago

Looking at some of the statements above, it seems as though there was an attempt to force the output into a more "readable" form or to try and get it in a more standard format.

lknebusch commented 6 years ago

TomHenderson4, Is there anything special I need to do to the radio to get it to work with APRSDroid? Buad rate, mode?

TomHenderson4 commented 6 years ago

Under the DATA section of the config I have

Tom Henderson

On 03/23/2018 12:57 PM, lknebusch wrote:

TomHenderson4, Is there anything special I need to do to the radio to get it to work with APRSDroid? Buad rate, mode?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ge0rg/aprsdroid/issues/141#issuecomment-375750877, or mute the thread https://github.com/notifications/unsubscribe-auth/AcFr8mUMtywPsSUg5yoP83pTcOacfkDiks5thTd6gaJpZM4JjnYb.

lknebusch commented 6 years ago

I can now see myself, but no reporting is coming through for other locations.

ge0rg commented 6 years ago

@lknebusch do you see anything from other stations in APRSdroid's log?

lknebusch commented 6 years ago

@ge0rg I can see the stations fine, they just do not translate the icons properly. Every one of them show a blue ARPS logo. When I switch to packet, they don’t all show at all. A few of them do, but nowhere near the majority.

ge0rg commented 6 years ago

Could you provide screenshots of APRSdroid Log and Hub views please?

lknebusch commented 6 years ago

Sorry, error on my part. On W2APRS I see the blue icon, on APRSDroid, I get nothing but myself.

lknebusch commented 6 years ago

I don’t see any stations at all other than me.

ge0rg commented 6 years ago

Do you see any received lines in the Log?

lknebusch commented 6 years ago

Let me go look...

lknebusch commented 6 years ago

No

lknebusch commented 6 years ago

It keeps saying APRS Service stopped

lknebusch commented 6 years ago

Okay, in the APRS log, it keeps entering stuff about every .5 second.

lknebusch commented 6 years ago

Stops when I hit “stop tracking”. No other information is in the log other than mine. Radio is picking up reports from other stations however.

ge0rg commented 6 years ago

What kind of stuff does it show every .5s? Could you provide a screenshot please?

lknebusch commented 6 years ago

How do you add a picture in this thing?

lknebusch commented 6 years ago

It’s all my waypoint information.

lknebusch commented 6 years ago

5d554f71-4a7b-4085-82aa-b70d84c1b1b6

lknebusch commented 6 years ago

Had to switch to desktop view. It’s like the program isn’t reading ANYTHINK from my radio.

ge0rg commented 6 years ago

The green lines are the GPS data that APRSdroid is sending. Please disable "Use Android GPS" in APRSdroid's Preferences / Connection Preferences. Maybe it is confusing the radio, so I would suggest powercycling that as well.

lknebusch commented 6 years ago

Done

lknebusch commented 6 years ago

I power cycled it as well and cleared the logs. image

ge0rg commented 6 years ago

So now you should "Start tracking" and see what happens there. I hope to see some (blue) log lines from other stations.

lknebusch commented 6 years ago

Waiting in a station to report. Here is what I see now. 5d3f3862-91dc-4eb9-b18d-b4ee2c62e5f2

lknebusch commented 6 years ago

Heard a station report, but nothing changed!

lknebusch commented 6 years ago

Do you think the comm speed, data speed and aprs speed should all be set to 9600 baud?

lknebusch commented 6 years ago

And currently my format is set to NMEA 8

lknebusch commented 6 years ago

Got it!!!! Here is how the FTM-400 has to be set up!!! c30ba539-f90f-44cf-8a93-97756ba8ffe8 ![Uploading 1D4A7DFC-5815-43E9-ABDD-870C7D409E3D.jpeg…]()

lknebusch commented 6 years ago

image

lknebusch commented 6 years ago

image