BLE <> USB UART bridge for TH-D74 TNC in KISS mode

402 views
Skip to first unread message

Georges Auberger

unread,
May 22, 2020, 3:43:57 PM5/22/20
to aprs.fi
I've been crushed with the realization that my newly acquired Kenwood TH-D74 can't pair with an iPhone because it does not support the Serial Port Profile. Weak.

I've been thinking about creating a small dongle that would connect to the TH-D74, expose a BLE interface that the aprs.fi app can connect to and simply pass it thru USB. Put the radio in KISS mode and it should work out of the box right?

I have a simple proof of concept. aprs.fi app can see the BLE service. However, when it tries to connect it keep toggling between Searching/Connecting.

I've exposed the service and capabilities as follow:


const BleUuid serviceUuid("00000001-ba2a-46c9-ae49-01b0961f68bb");

const BleUuid rxUuid("00000003-ba2a-46c9-ae49-01b0961f68bb");
const BleUuid txUuid("00000002-ba2a-46c9-ae49-01b0961f68bb");

When I connect a serial terminal on the usb side, i don't see any data coming from aprs.fi. I'm thinking that something else is missing in the BLE profile I'm exposing.

What else is aprs.fi looking for to successfully connect?

Any pointers appreciated.

Georges, WH6GJL

Heikki Hannikainen

unread,
May 22, 2020, 3:51:11 PM5/22/20
to aprs.fi
On Thu, 21 May 2020, Georges Auberger wrote:

> I've been crushed with the realization that my newly acquired Kenwood TH-D74 can't pair with an iPhone because it does
> not support the Serial Port Profile. Weak.

Well, the iPhone does not support the Serial Port Profile either; it's a
classic bluetooth thing which the iPhone does not allow apps to use.

BLE, yes. Classic bluetooth things like the serial port profile, no.

> I've been thinking about creating a small dongle that would connect to the TH-D74, expose a BLE interface that the
> aprs.fi app can connect to and simply pass it thru USB. Put the radio in KISS mode and it should work out of the box
> right?

Incidentally I just wrote out the spec for the BLE interface a week back.
There will be some refinements based on feedback which I already received
from the reviewers, but it should mostly work for you:

https://github.com/hessu/aprs-specs/blob/master/AX25-KISS-BLE.md

If you make a KISS over BLE device according to these instructions, it
should just work out of the box with the aprs.fi app. And yes, a BLE
dongle to attach to a KISS TNC should be totally doable.

- Hessu

Georges Auberger

unread,
May 23, 2020, 5:27:54 AM5/23/20
to aprs.fi
Thanks Hessu. I came across that doc during my search, very useful indeed and I've been using the "magic" GUIDs.

I'm assuming that Notify for TX and WriteWithoutResponse on RX is sufficient? That was a bit ambiguous in your spec, so it would be nice to clarify.

I'm still experiencing constant BLE connect/disconnect from aprs.fi app.  Here's what my service look like in BLE Scanner and with that setup i can send/receive data fine.

Any clue what else I might be missing that prevents the aprs.fi app to connect and stay connected?


IMG_2800.png

IMG_2798.png



IMG_2799.png

Heikki Hannikainen

unread,
May 23, 2020, 6:12:51 AM5/23/20
to aprs.fi
On Fri, 22 May 2020, Georges Auberger wrote:

> Thanks Hessu. I came across that doc during my search, very useful indeed and I've been using the "magic" GUIDs.
> I'm assuming that Notify for TX and WriteWithoutResponse on RX is sufficient? That was a bit ambiguous in your spec, so
> it would be nice to clarify.

I'm not sure how your SDK / development environment names these - which
way is "TX" and which way is "RX", which way is read and which way is
write.

In the document, TX is from an application to the TNC and then out from
the radio. From the point of the BLE Central and the app, it is a Write.

RX is receive from the radio, via the BLE Peripheral & TNC towards the BLE
Central & app. From the point of the app & central, the TNC/BLE peripheral
notifies that there's something to read, and then a read is issued.

So maybe you've just got the reads and writes the other way around.

- Hessu

Dan Boggiano

unread,
May 25, 2020, 12:22:24 PM5/25/20
to aprs.fi
I have NO idea what you guys are talking about but I hope this would allow me to connect my kenwood HT to aprs.fi as well!?

Heikki Hannikainen

unread,
May 25, 2020, 12:52:03 PM5/25/20
to aprs.fi
On Sun, 24 May 2020, Dan Boggiano wrote:

> I have NO idea what you guys are talking about but I hope this would
> allow me to connect my kenwood HT to aprs.fi as well!?

Possibly, but it'd require a BLE bridge dongle that would be attached to
the side of the kenwood HT and powered separately.

I have connected the Kenwood D72 to the iOS app, but only with an audio
cable :) Works alright although it is a bit silly.

https://www.amazon.com/BTECH-APRS-K1-Interface-APRSDroid-Compatible/dp/B01LMIBAZW

- Hessu

Dan Boggiano

unread,
May 25, 2020, 1:38:36 PM5/25/20
to aprs.fi
It would require using vox I believe?

Georges Auberger

unread,
May 25, 2020, 4:15:26 PM5/25/20
to aprs.fi
Indeed that was the issue. I guess the sample code I started from assumed that it was the other way around looking at it form the perspective of the USB side of things.

I can now successfully connect aprs.fi via BLE to my board. I received the APRS packet properly when beaconing. If I forward that data to the TH-D74 it transmits properly. The next problem I have is that I can't put the USB side of my board in host mode, it can only act as a peripheral, so I can't attach the TH-D74 to it.

I'm going to try to go the wireless route instead. I've ordered a TinyPICO with ESP32 that claim to support both BLE and "classic" Bluetooth. Hopefully I can pair the radio on the classic Bluetooth side and use BLE to connect to iPhone. If that works, I can keep that small dongle in a pocket and not have any silly cable dangling off the Kenwood.

Will keep you posted.

Georges Auberger

unread,
Jun 4, 2020, 3:17:10 AM6/4/20
to aprs.fi
Success (I think). I switched to a TinyPICO board using the ESP32 that supports BLE and classic Bluetooth. I am able to pair to the TH-D74 via Bluetooth and on iPhone, APRS.fi detects the TNC profile via BLE.

Sent a message and the radio transmitted. Unfortunately, I can't verify that the transmitted data is correct tho because there aren't any APRS iGate nearby me that I'm aware of (I'm tempted to purchase a cheap Boating so I can test a full setup).

You can see it in action here. Still annoying to have a dongle but at least it's tiny and completely wireless.


I will share the code and more details once I get a chance.

Thanks for the help Hessu!

Dan Boggiano

unread,
Jun 4, 2020, 8:12:57 AM6/4/20
to aprs.fi
I watched the video and I’d like to say thanks for doing this and great job. Is the radio is KISS mode or APRS? I don’t have any idea what you did or how it works but I’d love to try it out. I look forward to it. Thank you.

Heikki Hannikainen

unread,
Jun 4, 2020, 9:42:47 AM6/4/20
to aprs.fi

Ah, very cool!

If you can publish the code, a bill-of-materials with links to places to
purchase, and some instructions to put it together, I'm sure quite a few
people will build these. I sure would make one. Some people may also
want to tack one BLE adapter on an actual hardware serial port of a TNC of
some sort, it wouldn't be a difficult modification to the firmware for
someone to do based on your code.

I suppose, if you sold these, a few people would buy them too, until
Kenwood makes a D76 or something with BLE support. Quite a few people
would have some difficulty getting the firmware installed and the kit set
up so there might be some "customer support" questions.
> --
> You received this message because you are subscribed to the Google Groups "aprs.fi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> aprsfi+un...@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/aprsfi/8c18f614-5b7b-4b1a-a14e-6a96a2526727%40googlegroups.
> com.
>
>

- Hessu

LA3QMA

unread,
Jun 5, 2020, 12:13:56 PM6/5/20
to aprs.fi


On Thursday, June 4, 2020 at 3:42:47 PM UTC+2, Heikki Hannikainen wrote:

Ah, very cool!

If you can publish the code, a bill-of-materials with links to places to
purchase, and some instructions to put it together, I'm sure quite a few
people will build these.  I sure would make one.  Some people may also
want to tack one BLE adapter on an actual hardware serial port of a TNC of
some sort, it wouldn't be a difficult modification to the firmware for
someone to do based on your code.

I suppose, if you sold these, a few people would buy them too, until
Kenwood makes a D76 or something with BLE support.  Quite a few people
would have some difficulty getting the firmware installed and the kit set
up so there might be some "customer support" questions.



 Georges Auberger: very cool. For the TH-D7 BlueTooth was not easily or cheap. When i got the TH-D72 and the TM-D710 we played with a BT unit from paypal and it worked but that was more to get the TNC and/or APRS data wireless and/or controlling the radio.

Now for the TH-D74 it's working out of the box using BT on my laptop. 
On my android phone i can use "aprsdroid" and BT.

I'm not up to date with BT ws BLE but can a newer chip be put in BT or BLE mode? I'm guessing early chips only have BT and ie sending audio it need more data etc. But are new BT modules either "BT" , "BLE" or could they be both?

If the chip in the TH-D74 is compatable a firmware fix or "mod" could probably enable BLE?

73 de LA3QMA
Kai Gunter

dbo...@gmail.com

unread,
Oct 13, 2020, 2:51:11 PM10/13/20
to aprs.fi
Any more information regarding this at all? I am still very interested in this bridge. Are they commercially available?
Thanks

geo...@ternarylabs.com

unread,
Dec 29, 2022, 5:46:13 PM12/29/22
to aprs.fi

Finally got some time to play some more with a proof-of-concept adapter for TH-D74. It's working reasonably well with RadioMail app for winlink email. Should work the same with APRS.fi.

https://www.youtube.com/watch?v=K-_nVApR7PU

Best part is that you can make your own!

https://bitbucket.org/islandmagic/ble-bt-tnc

dbo...@gmail.com

unread,
Dec 31, 2022, 2:59:03 AM12/31/22
to aprs.fi

I ordered the board from Amazon. I plan on giving it a go but I think your instructions assume some knowledge on how to do things. So I will struggle but look forward to getting it running! Thank you for making it available. 
Reply all
Reply to author
Forward
0 new messages