Hi all,
I can not report success, but I will detail what I have done so far. After reading, perhaps you can tell me what I am doing wrong.
I have modified an FTDI FT232R based USB serial interface dongle by removing the RS232 level shifter, connecting the VCCIO line to 3.3V (instead of 5V) and connecting to the FTDI chip's Tx and Rx lines directly. These are wired to a 3-pin (stereo) 3.5mm socket. Tip is data in to the PC, ring is data out from PC, sleeve is ground.
I also made an adapter for the 4-pin 3.5mm plug on the VX2r. Tip is N/C, 1st ring (data/clone) is connected to Tx *and* Rx above, 2nd ring (mic+ptt) is N/C, sleeve is ground.
The dongle still works, and when I plug it in it is assigned to /dev/ttyUSB0
When I plug the adaptor in (but not the radio) then I have basically made a loopback device, and I can use gtkterm to view echoes of every character I type.
I have modified chirp and copied the VX7 module to make a VX2r module. I can run chirp (in Linux) and select VX2r and the /dev/ttyUSB0 port.
When I plug the radio in I press FW whilst turning it on. The display says 'CLONE'. Next, I press BAND, because I want to Tx from the radio to the PC. The radio display says 'TX'.
Nothing happens in chirp (I guess I am supposed to see an animated progress bar) and the radio eventually times out and shows 'ERROR' on its display.
Please point out my obvious mistakes and I will try again. :)
73,
Andrew ZL3AME
On Sat, 11 Feb 2012 22:30:18 Andrew Errington wrote:
Hi all,
I can not report success, but I will detail what I have done so far. After reading, perhaps you can tell me what I am doing wrong.
I just tried VX2 commander in Wine. The loopback test passes, but the software doesn't get anything from the radio.
Hmmmm...
73,
Andrew ZL3AME
On Sat, 11 Feb 2012 22:38:07 Andrew Errington wrote:
On Sat, 11 Feb 2012 22:30:18 Andrew Errington wrote:
Hi all,
I can not report success, but I will detail what I have done so far. After reading, perhaps you can tell me what I am doing wrong.
I just tried VX2 commander in Wine. The loopback test passes, but the software doesn't get anything from the radio.
I wonder if I need a diode between the Tx and Rx lines.
73,
Andrew ZL3AME
I wonder if I need a diode between the Tx and Rx lines.
Nope, you don't. Just tie the TX and RX lines together and feed them to the radio's data pin. Make sure your data and ground lines aren't switched.
Open a serial terminal (like minicom) and start the clone from the radio. See if you see any data, especially like AH0XX. If not, there's no communication. If you do, but it's garbled, then search for a suitable baud rate. If you see AH0XX, then you're off to mess with CHIRP code.
On Sun, 12 Feb 2012 00:06:59 Dan Smith wrote:
I wonder if I need a diode between the Tx and Rx lines.
Nope, you don't. Just tie the TX and RX lines together and feed them to the radio's data pin. Make sure your data and ground lines aren't switched.
Open a serial terminal (like minicom) and start the clone from the radio. See if you see any data, especially like AH0XX. If not, there's no communication. If you do, but it's garbled, then search for a suitable baud rate. If you see AH0XX, then you're off to mess with CHIRP code.
Ok, I tried gtkterm with all available baud rates, from 300 baud to 115k, all with 8 bits and no parity. Nothing. I would have thought the baud rate to be well-known, but I can't find any information about it on the web.
The loopback still works.
I will try another 4-pin cable. And I will try a diode between Tx and Rx. It seems to me that the radio is trying to pull down the data line, but the PC Tx line is pulling up (idle).
I also wonder about using 3.3V. I measured the idle state of the radio's data pin and got about 3V. This made me nervous about using a 5V TTL interface, so I modified the FTDI board to use 3.3V. Many of the interface circuits on the web use 5V (or some hacked power supply from the serial port control lines). Perhaps I should go back to 5V. I will be making a 5V interface anyway, for the FT817ND. I will use the same 3.5mm stereo socket for Tx/Rx/Gnd and make up a cable to the '817 data connector.
73,
Andrew ZL3AME
I will try another 4-pin cable. And I will try a diode between Tx and Rx. It seems to me that the radio is trying to pull down the data line, but the PC Tx line is pulling up (idle).
None of the radios I've built cables for (which is many) have ever had a diode in the mix. The radio expects to see its own echo, so if you try to prevent that with the diode, then it will stop transferring immediately. If you put the diode the other way, then you haven't changed the circuit any.
The PC will float either high or low, but will be pulled either direction. I know it seems strange, but there are lots of devices that do two-way communications on a single wire like this.
I also wonder about using 3.3V. I measured the idle state of the radio's data pin and got about 3V. This made me nervous about using a 5V TTL interface, so I modified the FTDI board to use 3.3V. Many of the interface circuits on the web use 5V (or some hacked power supply from the serial port control lines). Perhaps I should go back to 5V.
Yes, you want 5V. 3.3v at idle could just be where that one floats. Most of these radios are using a very simple and robust driver circuit off of the speaker lines that could probably take the full +/-12V swing without much trouble, so even if you did have a 3.3v unit (seriously doubt it), I bet you'd still not have trouble with 0-5V.
On Sun, 12 Feb 2012 11:28:00 Dan Smith wrote:
I will try another 4-pin cable. And I will try a diode between Tx and Rx. It seems to me that the radio is trying to pull down the data line, but the PC Tx line is pulling up (idle).
None of the radios I've built cables for (which is many) have ever had a diode in the mix. The radio expects to see its own echo, so if you try to prevent that with the diode, then it will stop transferring immediately. If you put the diode the other way, then you haven't changed the circuit any.
I'm still not sure. The radio will always see its own data, as Tx and Rx are connected internally. If I use a diode then it stops the idle state of PC Tx fighting (pulling up) if the radio wants to pull it down.
I have added a diode and I have made some progress. VX2 Commander 'sees' the radio, but only gets one block of data. It seems the protocol is block oriented- radio sends some data and waits for something before proceeding.
Here's the dump from VX2 Commander: Data Received. Length: 11 Data: 41 48 30 31 35 24 E8 01 00 24 00 First Block: [41 48 30 31 35 24 E8 01 00 24] ------------------------------------- CPU: 01 00 USA Mod Setting: E8 (Freeband) ------------------------------------- Sent: 06 Acknowledge...
Then the radio times out and displays "ERROR".
Next, I can see data using gtkterm running at 19.2k 8 data bits, no parity. I get "AH015" !
So, with Chirp I get this trace: CHIRP 0.1.12 on Linux - MEPIS Linux 8.0 Clone thread started 000: 41 48 30 31 35 24 e8 01 AH015$.. 008: 00 24 00 00 00 00 00 00 .$......
Then the radio times out and I have to hit Cancel.
I have some chores to get on with, but I'll keep trying different things when I have time.
73,
Andrew ZL3AME
On 02/12/12 00:34, Andrew Errington wrote:
On Sun, 12 Feb 2012 11:28:00 Dan Smith wrote:
I will try another 4-pin cable. And I will try a diode between Tx and Rx. It seems to me that the radio is trying to pull down the data line, but the PC Tx line is pulling up (idle).
None of the radios I've built cables for (which is many) have ever had a diode in the mix. The radio expects to see its own echo, so if you try to prevent that with the diode, then it will stop transferring immediately. If you put the diode the other way, then you haven't changed the circuit any.
I'm still not sure. The radio will always see its own data, as Tx and Rx are connected internally. If I use a diode then it stops the idle state of PC Tx fighting (pulling up) if the radio wants to pull it down.
I have added a diode and I have made some progress. VX2 Commander 'sees' the radio, but only gets one block of data. It seems the protocol is block oriented- radio sends some data and waits for something before proceeding.
Here's the dump from VX2 Commander: Data Received. Length: 11 Data: 41 48 30 31 35 24 E8 01 00 24 00 First Block: [41 48 30 31 35 24 E8 01 00 24]
CPU: 01 00 USA Mod Setting: E8 (Freeband)
Sent: 06 Acknowledge...
Then the radio times out and displays "ERROR".
If data is only flowing from the radio now maybe that diode wasn't such a great idea? Pretty sure Dan might have mentioned that....
-Rick WZ3RO
Next, I can see data using gtkterm running at 19.2k 8 data bits, no parity. I get "AH015" !
So, with Chirp I get this trace: CHIRP 0.1.12 on Linux - MEPIS Linux 8.0 Clone thread started 000: 41 48 30 31 35 24 e8 01 AH015$.. 008: 00 24 00 00 00 00 00 00 .$......
Then the radio times out and I have to hit Cancel.
I have some chores to get on with, but I'll keep trying different things when I have time.
73,
Andrew ZL3AME _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
On Sun, 12 Feb 2012 15:41:17 Richard Farina wrote:
On 02/12/12 00:34, Andrew Errington wrote:
On Sun, 12 Feb 2012 11:28:00 Dan Smith wrote:
I will try another 4-pin cable. And I will try a diode between Tx and Rx. It seems to me that the radio is trying to pull down the data line, but the PC Tx line is pulling up (idle).
None of the radios I've built cables for (which is many) have ever had a diode in the mix. The radio expects to see its own echo, so if you try to prevent that with the diode, then it will stop transferring immediately. If you put the diode the other way, then you haven't changed the circuit any.
I'm still not sure. The radio will always see its own data, as Tx and Rx are connected internally. If I use a diode then it stops the idle state of PC Tx fighting (pulling up) if the radio wants to pull it down.
I have added a diode and I have made some progress. VX2 Commander 'sees' the radio, but only gets one block of data. It seems the protocol is block oriented- radio sends some data and waits for something before proceeding.
Here's the dump from VX2 Commander: Data Received. Length: 11 Data: 41 48 30 31 35 24 E8 01 00 24 00 First Block: [41 48 30 31 35 24 E8 01 00 24]
CPU: 01 00 USA Mod Setting: E8 (Freeband)
Sent: 06 Acknowledge...
Then the radio times out and displays "ERROR".
If data is only flowing from the radio now maybe that diode wasn't such a great idea? Pretty sure Dan might have mentioned that....
-Rick WZ3RO
Without the diode I was getting nothing, and there is a good reason to fit one.
Has anyone else here used an FTDI FT232R chip to drive a VX2r (or any radio with a single I/O for Tx and Rx data)? Documentation on the web is sparse, and mostly concerns circuits which interface directly to RS232-level signals. I am also aware of Alexander Meier's design which uses this chip and two inverting transistor buffers on Tx and Rx.
I could *buy* a USB interface cable, but that won't teach me anything (the corollary being that building my own will teach me to buy one...).
I guess the next step is to try a 5V level output, but as I have said before, the internals of the VX2r all run at 3V so it worries me a little.
So, in summary, FTDI FT232R chip running with VCCIO at 3V3:
With TxD tied to RxD and to the radio DATA pin. With the radio unplugged the VX2 commander loopback test works. With the radio plugged in, no clone data is received from the radio.
With TxD connected to RxD through a diode and to the radio DATA pin. With the radio unplugged the VX2 commander loopback test works. With the radio plugged in, the first block of clone data is received from the radio with chirp or VX2 Commander, but no data can be sent to the radio.
73,
Andrew ZL3AME
Ok, some partial success.
I have modified another FTDI serial USB adaptor. This time I left the I/O pins at 5V. I could have simply reverted my mods to the original adaptor, but I want two devices for later anyway.
I plugged in my VX2r cable, still with diode, and the VX2 Commander loopback worked (of course).
Next, I plugged in the radio and set VX2 Commander to read from the radio. This time I got to 86% complete! But then VX2 Commander crashed, or became otherwise sad. It could be because I am running it under Wine on Linux.
I will try again without the diode, but I am happy that progress is still being made.
73,
Andrew ZL3AME
On Sun, 12 Feb 2012 21:56:01 Andrew Errington wrote:
Ok, some partial success.
I know it's bad form to reply to one's own emails, but I ran VX2 Commander 3 more times. First time 95%, second time 99%, and last time 100%. Here's the short log from VX2 Commander:
Data Received. Length: 10 Data: 41 48 30 31 35 24 E8 01 00 24 First Block: [41 48 30 31 35 24 E8 01 00 24] ------------------------------------- CPU: 01 00 USA Mod Setting: E8 (Freeband) ------------------------------------- Sent: 06 Acknowledge... Data Received. Length: 9 Data: 06 E8 01 02 01 FF FF FF FF Second Block: [E8 01 02 01 FF FF FF FF] Sent: 06 Acknowledge... Data Received. Length: 32578 Data: 06 02 01 00 00 02 ... FF FF FF FF C9 FF 99 Third Block: [02 01 00 00 02 03 ... FF FF FF FF C9 FF 99] Time: 46.58594 seconds. Calculated Checksum: 99 Checksum OK. VX-2 data downloaded successfully! Port closed.
The progress bar was a little jerky. Should it be smooth? Also, it took almost a minute. Should it be faster?
My radio is still sitting showing 'TX' on the display. After cloning is it supposed to go to normal operation, or show 'DONE' or 'FINISH' or 'OK' or something? Or should I just turn it off?
I tried the cable *without* the diode, but it didn't work, so I'll keep it there for now.
Now that I have established communication I need to hack on chirp. Remember, so far, all I have done is copied the VX7 code to VX2r, and verified the baud rate. If I run it I get a progress bar (hooray!) then 31 seconds later an error: Checksum Failed [0592-0610 (@0611)]
Progress.
73,
Andrew ZL3AME
On 02/12/12 08:18, Andrew Errington wrote:
On Sun, 12 Feb 2012 21:56:01 Andrew Errington wrote:
Ok, some partial success.
I know it's bad form to reply to one's own emails, but I ran VX2 Commander 3 more times. First time 95%, second time 99%, and last time 100%. Here's the short log from VX2 Commander:
Data Received. Length: 10 Data: 41 48 30 31 35 24 E8 01 00 24 First Block: [41 48 30 31 35 24 E8 01 00 24]
CPU: 01 00 USA Mod Setting: E8 (Freeband)
Sent: 06 Acknowledge... Data Received. Length: 9 Data: 06 E8 01 02 01 FF FF FF FF Second Block: [E8 01 02 01 FF FF FF FF] Sent: 06 Acknowledge... Data Received. Length: 32578 Data: 06 02 01 00 00 02 ... FF FF FF FF C9 FF 99 Third Block: [02 01 00 00 02 03 ... FF FF FF FF C9 FF 99] Time: 46.58594 seconds. Calculated Checksum: 99 Checksum OK. VX-2 data downloaded successfully! Port closed.
The progress bar was a little jerky. Should it be smooth? Also, it took almost a minute. Should it be faster?
Not nessesarily, but I've had about the same experiences running VX Commander in wine, it doesn't work well if at all. I actually gave up and made a windows XP VM to run it when I was using it.
My radio is still sitting showing 'TX' on the display. After cloning is it supposed to go to normal operation, or show 'DONE' or 'FINISH' or 'OK' or something? Or should I just turn it off?
I tried the cable *without* the diode, but it didn't work, so I'll keep it there for now.
Now that I have established communication I need to hack on chirp. Remember, so far, all I have done is copied the VX7 code to VX2r, and verified the baud rate. If I run it I get a progress bar (hooray!) then 31 seconds later an error: Checksum Failed [0592-0610 (@0611)]
All in all your work from here shouldn't be too hard. Set something in memory 1, and figure out how many blocks of data the radio actually sends (which can be done with VX2 Commander). Then dig into the file VX2 Commander makes with a hex editor and find the offset of the start of the memory locations. Then tell vx2.py how large the radio image is and the offset of the memory locations and give it a try. After that it's all bug fixing but the vx2 should be really close to the vx7 iirc.
-Rick WZ3RO
Progress.
73,
Andrew ZL3AME
chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
participants (3)
-
Andrew Errington
-
Dan Smith
-
Richard Farina