iPhone, PocketPacket, Baofeng UV5R and APRS

robgendreau

Explorer
I've always wanted to get into APRS. I won't detail what it is, but basically it's a digital mode that allows you to send small bits of info over your radio, in this case a Baofeng UV5R. It transmits/receives over FM on frequency 144.390. The info is passed from digipeater to digipeater, and more commonly now, over the internet as well.

It's commonly used for transmitting location (GPS), weather info, short messages, check-ins during SAR type operations, etc. The info makes it's way onto the internet, and you can track people; sort of a ham SPOT service. See http://aprs.fi or http://www.openaprs.net. A radio needs some way to get digital packets in, usually a TNC, but there are some radios with it built in. And also out, so that if a radio receives info it can send it to say your computer. But this often involves cables, the TNC (TinyTrak, etc), computer, etc.

Turns out that now there are apps for that. Like Echolink, you can use APRS with a smartphone or tablet via a couple of iOS apps (I assume there are Android ones as well). OpenAPRS lets you see stuff like on the website, and you can use the app to send your location or messages. Same with PocketPacket. Usually you have to register with a developer of the app or website admin to get an passcode to the servers; it's generated from your call sign. And bingo, anywhere you have internet you can connect and be tracked by APRS (in case NSA is ignoring you for some reason).

But what about where there's no cell, no wifi?

Unlike OpenAPRS, PocketPacket has a built in software-based TNC (sorta modem) that can send and receive data to/from your radio. So if you can hit a digipeater, you're in business.

I used it with an iPhone 5 and my UV5R. I have only got it successfully to work on the TX end (having trouble getting the right cabling in place to get data INTO the phone via its mic connection, but OUT from the phone is more important to me now; more later). Since you can use a regular 3.5mm stereo headphone plug (TRS male) into the iPhone to get music, you an also use the same to get the data (as sound, like a modem or fax squawk) OUT of the phone. The other end (same male 3.5) goes in the MIC port of the UV5R. Turn on VOX on the UV5R. On the iPhone set the path (APRS requires some setup; you can find this online but basically you tell it how to repeat your signal) and your call sign and you're pretty much in business.

A connection that will also do APRS INTO the iPhone requires more messing about since the iPhone uses a four-ring TRRS plug. Haven't got that to work yet.

Even if you aren't into tracking yourself all over, the maps I cited above are very helpful. You can click on your call sign and discover all the hops and bounces your data took, and see what stations received it. Helps in choosing repeaters if you want to switch to voice (I saw for example I would hit south of SF more reliably than stations nearer me, and that influenced which repeater I chose for voice). It also gives you access to instant weather and other stuff.

So if you've already got a iOS device, I think it's worth the $5 for the app and a couple bucks for the cable to check this out. Might come in handy.

Rob
 

robgendreau

Explorer
Any 3.5 mm stereo cable will work for output from the iPhone and input into the radio. Haven't found an input into the iPhone solution yet.
 

nckwltn

Explorer
Any 3.5 mm stereo cable will work for output from the iPhone and input into the radio. Haven't found an input into the iPhone solution yet.


Ok, I get what you're saying now.... you might be able to hack together a cable that has the baofeng standard plug on one end, and then convert it into the 4 pin iphone mic+stereo out iphone cable.

It looks like the baofeng cables I have support 2 channels on both speaker and mic. Stereo output for mic, and possibly power out for the mic?

I'm wondering if you could find a pinout for the speaker and mic connection on the uv5r.

I just picked one up last week.... studying for my tech license now... but this kind of thing is exactly what I picked up the uv5r for!
 

robgendreau

Explorer
link for the pin out http://www.miklor.com/uv5r/UV5R-Technical.html

in another posting -> http://www.qsl.net/w6dps/APRSDroid.html, he added a couple of 500 Ohm resistors. I think this basically helps step down the volume from the smart phone, so that the you don't send too strong of a signal from the smart phone into the uv5r.

the pinout also indicates where data out from the uv5r is.... this should help with getting data out of the uv5r and into the phone.

I've seen that. Note that connecting the grounds (sleeve) activates PTT. This is what occurred with the first iPhone adapter I tried; the iPhone TRRS plug has a ground on the 2nd ring that connects to the sleeve of BOTH female plugs on most all adapters. http://www.ediy.co.nz/use-ipod-touch-iphone-with-skype-xidc55676.html

I haven't found a way to get around that. But it works with the standard TRS cable from iPhone TO radio without any mods. The data, BTW, is coming as sound from the iPhone, and the iPhone app expects sound coming in return. I assume the data referred to in the diagram is serial data used for programming. Different things. Think of the iPhone as a modem; you can even use the speaker of the radio with the external mic of the iPhone if you wish, although it obviously has limitations.

Rob
 

DaveInDenver

Middle Income Semi-Redneck
I've seen that. Note that connecting the grounds (sleeve) activates PTT.
Must be a shared PTT and audio line. That's pretty common with HTs. You have to build a little pull down circuit, nothing more than a 2K resistor and an open collector or maybe you can just get away with decoupling the audio with a cap and applying the PTT voltage with a relay.
 

robgendreau

Explorer
Must be a shared PTT and audio line. That's pretty common with HTs. You have to build a little pull down circuit, nothing more than a 2K resistor and an open collector or maybe you can just get away with decoupling the audio with a cap and applying the PTT voltage with a relay.

Yeah, don't need the PTT since VOX is what the iPhone relies upon to send. That works fine. Just can't use the line-in from the phone and line-out to the phone at the same time.
 

DaveInDenver

Middle Income Semi-Redneck
Yeah, don't need the PTT since VOX is what the iPhone relies upon to send. That works fine. Just can't use the line-in from the phone and line-out to the phone at the same time.
QSL on VOX

Still confused why the line in and line out can't be used simultaneously. Just cross the pin outs and leave one of the speakers, either tip or ring 1, unused. You could mix the left and right into a mono if the iPhone doesn't have the same signal on both channels. There's only one ground connection, ring 2, on the iPhone and if you don't need PTT just decouple and add a resistor pull up to the mic line.

You might have to put a small resistor between the mic and ground to trick the device into believing that there's a mic actually present. Not sure how the controls work on top of ground and mic but I suspect they are similar to the PTT/mic sharing where one signal is AC and the other DC.

It's also important to note that Androids don't do the proprietary TRRS configuration of Apple. They put ground on the shield with ring 2 as mic. So adapters are not universal.
 
Last edited:

johnboiles

New member
Working TRRS iPhone cable for BaoFeng UV-5R+

I got TX and RX both working with PocketPacket, but it took a little experimentation. Here's my schematic

BaoFeng to iPhone TRRS Cable 2.png
Also at
http://johnboiles.s3.amazonaws.com/Screenshots/BaoFeng to iPhone TRRS Cable 2.png

I used a small cap and 3 resistors to trick the iPhone into thinking a microphone was connected. I snagged that part of the schematic from http://www.creativedistraction.com/...one-through-the-headphone-jack-using-arduino/

I used a small decoupling cap on the speaker out of the radio. Not sure why this was necessary, but in my testing it made receipt of packets much more reliable.

I used a diode to trick the radio into not activating PTT while still (sorta) connecting the grounds. This is certainly a hack, and I'm very open to better ideas.

On my radio, volume is maxed, vox is set to 2, squelch is set to 1. On my iPhone volume is also maxed.

Feedback is much appreciated, I'll probably do a board design that plugs straight into the BaoFeng once I get the design hammered out.

- KK6GIP (John)
 

Attachments

  • BaoFeng to iPhone TRRS Cable.png
    BaoFeng to iPhone TRRS Cable.png
    13.7 KB · Views: 231
Last edited:

Cz10

New member
Did you try simply not connecting the ground at the mic jack of the radio? If that doesn't work, how about a cap?

Thanks - i am just about to embark on the same project as soon as the radio shows up.

Don
W6CZ
 

nckwltn

Explorer
I was abel to get pocketpacket to work as well. Took a bit of configuration, but I suppose if it just worked to transmit over the radio right out of the box, that could really cause some problems.

I ended up just plugging in a headphone into my iphone, holding the ear bud up to the mic of the UV5R, holding the PTT while I flipped the "Transmit" flag on the iphone app. Worked like a charm. The speaker on the iphone itself wasn't enough to transmit a clean packet, but seems that the headphone volume was loud enough.

The nearest digipeater is only a mile away, so I do have that going for me as well.... with further distances, there might not be enough clean signal to transmit a valid packet.
 

Cz10

New member
Did you try simply not connecting the ground at the mic jack of the radio? If that doesn't work, how about a cap?

Thanks - i am just about to embark on the same project as soon as the radio shows up.

Don
W6CZ

Yep - just let the ground float on the mic side - audio out iPhone to tip - of works just fine. No hum - headphone level full on phone and vox at 3, RX audio from radio 4 clicks above zero. Turn off power saver. I am sending and receiving on 144.39
 

robtwright

New member
I followed John's design and wired the three resistors and two capacitors. I tested it by transmitting to the Baofeng and having the inline audio recorded by Voice Memo. It seems to work though PocketPacket has yet to decode any packets for me.

On the Baofeng mic line, what kind of diode should I use? I put in a small switching diode but I'm still having problems when I transmit.

I'm having problems with the vox. It's activated by the iPhone but after the transmission, it hangs for several seconds.

Another oddity I'm experiencing is that the Baofeng will respond to an incoming radio signal by transmitting silent audio.

This is proving to be an interesting mystery.

So, does anybody have an idea what kind of diode I should use?

Any theories on what's causing the vox to hang? (When not connected to the iPhone, the vox functions as it should.)

Any help would be appreciated.

Robert
N6AIR
 

Forum statistics

Threads
185,527
Messages
2,875,539
Members
224,922
Latest member
Randy Towles
Top