ok. having some problems communicating with the radio using c#.
If i use the supplied hardware controller LCD thing, i get audio out of the device.
When I attach Mitch's usb cable, i hear the radio click. Also when I open the com port to talk to the radio, i hear a click.
However it doesn't seem to respond to any commands. no audio comes out out of the radio when I try to control it programatically.
I used a terminal program (PuTTY) to connect to the device, and again it clicks when the connection is established, and the PuTTY terminal prints out some data, so i know the communication with the radio is okay. It seems I am missing some sort of initialization sequence to get the radio to work. Is there better documentation somewhere for the radio? Do i need to power it on, unmute it or do something else to get audio out of the radio?
If I remember correctly, I had to send a "power", "set", "up" sequence to initially power it up:
H L Pwr Set Up CS
(A4) (08) (00 01) (00 00) (01 00 00 00) (CS)
A4 is the message header, 08 is the length (not including header and CS), and CS is an additive checksum of the message including header
It appears I needed to set the DtrEnable property to true when setting up my serial port device in C#.
I've written a few applications in c# that use the serial port, but I have never needed to do that before. <shrug/>
Ah yeah, I had forgotten about that. Mitch's cable uses DTR to trigger I think the power relay line? I don't really recall, but I do recall that it is required to get anything from the radio.
Originally Posted by hellthorne
so now i am getting responses from the device on the serial port, but there is still no audio out. As soon as i open the port, the radio outputs
00 00 00 30 30 30 30 30 30 34 35
A4 08 01 00 02 00 01 00 00 00 B0
which tells me that the radio confirms power-on. (i guess the cable auto-powers the radio when the port is opened)
but there is still no audio. i am not sure if the device is muted or the volume is set to zero. when i tune the radio to a frequency i know it can pick up (verified with the lcd controller) there is still no audio.
i know i will eventually get this figured out eventually, but this is frustrating to guess. is there a complete breakdown of the radio interface protocol.
Mitch, are you willing to share the source for your control app? I am working on a one-off, non-commercial application.
Yes, I think it starts muted so you have to send the unmute command.
Protocol bits and other information available here: http://andy.dynamicbits.com/hdradio/
It seems like a lot of the commands are missing.
this one has more commands:
but it only has one usage example so i am not sure how to mute/unmute, set the volume to a specific level, etc.
i have most of my software working now, but there are a few quirks i ca't figure out. I wonder if someone else has seen these issues.
1. i keep getting a command response (0x02, 0x03) from my radio that nobody seems to have documented:
A4 18 02 03 02 00 71 00 00 00 1F 00 00 00 0C 00 00 00 15 00 00 00 17 00 00 00 57
I can't seem to figure out what any of the bytes in the data payload signify.
2. when i receieve the HD subchannel count response, the values are strange:
for a station with only 1 HD channel, the subchannel count returned is 0 (which is reasonable)
for a station with 2 channels (1 primary, 1 subchannel), the subchannel count returned is 3.
for a station with 3 channels (1 primary, 2 subchannels) the subchannel count returned is 7.
Also, one of the stations with 3 channels in my area returns HD artist and title data for each channel, however, the channel ids returned are 1, 2 and 4, not 1 , 2, and 3. i am not sure why this is. It's the only radio station in the area with 3 hd channels, so i can't tell if the station is sending bad data or if the radio does this for all stations with 3 channels.
I found another station with 3 channels, and it exhibits the same pattern - hd artist/title data comes in with subchannel ids 1, 2 and 4.
Originally Posted by hellthorne
the subchannel ids add up to 7, which is the value i get from the hdsubchannel count response. still don't understand why.
if you're developing on windows, why not just the already coded .dll
its on the CD that is supplied with the cable
also available for download... https://dl.dropboxusercontent.com/u/...%20Gadgets.zip
im mean if you want the fun of reversing the protocol by all means keep going...
on another note, I haven't looked at it in years now