2019 Leaf + Ham Radio Audio Routing

My Nissan Leaf Forum

Help Support My Nissan Leaf Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Leidanav

New member
Joined
Aug 22, 2021
Messages
2
I've been scouring the Internet for this topic for a long time, without any good answers. I hope someone can get me started in the right direction.

I have a 2019 Leaf S Plus. I'm a ham radio operator, and have a radio or 3 in the car at any given time. Since there's so little space in the driver area for mounting, I usually have to have the radios stashed away under the seat, etc. where I can barely hear them. I have a small external speaker hooked up to it, but even that takes up space.

Ideally, I would love to integrate the audio into the car's audio system. Line-in is the obvious answer, but BT/CarPlay features are mutually exclusive with the line-in (i.e., can't use radios at the same time, if I'm using Maps for direction). So I'm wondering if there's some kind of place where I can splice in the audio output from my radio mixer board, to some kind of auxiliary input for the car (preferably before the amp). Does such a thing exist?

Thanks in advance for any ideas.
 
Thanks for your response. I hadn't considered it, but it still brings me back to the problem: BT/CarPlay audio and FM radio can't run at the same time, much the same way Line-In/Aux won't. In addition, as a ham radio operator transmitting on VHF (e.g., 164.520MHz), the frequency is sufficiently close to broadcast FM radio, so it will likely cause a lot of front-end overload (lots of loud static) on the suggested FM receiver, making conversation hard. So while I appreciate the idea and additional option, I don't think that's what I'm looking for.
 
Right now I'm working on upgrading the stereo system in the LEAF. I thought that might be a good first step because there are lots of Youtube videos, and it will get me familiar with working on the car. But I have a grand plan to put radios in the car, also. I would ultimately like to install both my IC-7100 and a GMRS rig.

I think the best way to get the radio audio to a modern car stereo system is via Bluetooth. For starters I'm going to make a cheap interface out of a Chinese Bluetooth audio transmitter board which I will connect to pin 12 of the accessory connector on the IC-7100. This is a line-level output which is independent of the 7100's volume control.

Ultimately, I'd like to make a Bluetooth interface based on a Pi Zero W which will do not only audio, but also AVRCP to allow the IC-7100 to interact with the vehicle's music player controls and screens, so that the simple modes of operation might be controlled right from the stereo system head unit.

--de N3TS WRAT786
 
I've gotten back to this project, and I've made some progress, but it has been slow. For testing, I've been using a receiver only, a Uniden BCT15X scanner programmed with a bunch of ham and GMRS frequencies. This has 2 advantages to my incremental approach to solving this problem: (1) It's less hassle to initially just deal with a receiver than my eventual goal of an Icom IC-7100 transceiver, (2) The BCT15X has a simple, ASCII-based remote control protocol, which can be controlled from a terminal emulator on my laptop, making program development a lot easier, versus the Icom's binary C/IV format.

The first thing I have to report is that my 2022 LEAF SV+ seems somewhat picky about what Bluetooth devices it will work with. I tried a Sennheiser BT T100 Bluetooth audio transmitter. It paired OK. I went to the Connections screen, pressed Touch to Connect and it said Connected Ready for Use. But in the Bluetooth Audio screen, it said No Bluetooth Device Connected, and it would not receive the audio from the BT T100. So my interim, short-term solution was a bust.

Going back to Pi Zero W, I was able to get it to pair with the LEAF. When I installed linux on the Pi, I named it N3TS-mobile, so that's how it shows up on the LEAF's Connections screen. With "bluez" and "pulse audio" installed on the Pi, after getting it paired and pressing Touch to Connect, on the Bluetooth Audio screen it shows N3TS-mobile at the top of the screen. (Note that it only says N3TS-mobile at the top of the center screen; it still says Bluetooth Audio at the top of the left screen.) A quick check with the pulsemixer command to get everything set, and I could send audio from the espeak command to the LEAF!

Now I needed a way to interface the radio to the Pi, and I think I've found the perfect interface, made by Digirig. Its a little USB interface, very tiny, that has both the audio and the serial in one box, for $50, what a deal! I got one configured for RS232 serial for the Uniden scanner, but when the time comes, the Icom radio already has a USB interface. (Digirig can be configured for Icom C/IV if you've got an older rig without built-in USB.) Just one word of caution: powering the Pi from the 5V USB charging outlets in the LEAF puts a bunch of noise onto the audio when the Uniden is plugged in via the Digirig, so I'm now using a Meanwell SD-15A-05 power supply for the Pi. And the other thing is that I had to install the pulseaudio loopback module to route the audio from the Digirig to the MY LEAF and set the level appropriately in pulsemixer, but now I have audio from the Uniden record-out jack coming through the LEAF's speakers!

Now, on to the control part of the project, I've made a little progress. I found that the linux bluez Bluetooth stack converts AVRCP controls into linux keypress events. These do not show up in the normal console keyboard input stream, but they can be seen using the evtest program. So I grabbed the source code of evtest.c from the linux code repository, and used what I saw there to write a little C program which successfully reads the keypress events from the LEAF. The 2 steering wheel remote buttons can generate 4 different events, because it differentiates short and long press. I also grabbed the complete source to bluez, and much of what I'm interested in seems to be in avrcp.c and avctp.c. I have not started on the serial code for talking with the receiver yet.

Another part of the project will be to build the Pi into a metal box with the Meanwell power supply and a USB hub, and whatever other interface circuitry I find necessary.

But anyway, at least at this point, I have audio from my receiver flowing by Bluetooth to the LEAF and playing through the LEAF speakers!

--de N3TS WRAT786
 
Back
Top