One problem I have noticed with the PIC TNC I recently built is that it is less tolerant of different packet signals than any of my radios. It decodes my two Kenwood transceivers just fine but it will only decode the VX-8G at a specific audio level that is impossible to set when using the fixed output of many radios. And it won't decode my WX-1 weather station at all.
My Kenwood TH-D72 won't decode the weather station either. However it is the VX-8GR I am more concerned about. With the volume of the packet channel turned up, it's braaps sound a bit thin and weedy compared to those of the Kenwoods and other radios I hear over the air. I thought that I would try to analyze the signals to see if this would give me an idea of what was causing the problem.
I used Spectran, the only free software I know that will do audio spectrum analysis. The receiver was the old Kenwood TH-205E, which being over 25 years old had IF filtering wide enough not to cause any deviation limiting. Each capture was made at the same volume level so the signal levels shown should represent the relative signal deviation.
Because packet bursts are fleeting it took a few attempts to capture the screen at just the right moment. But eventually I obtained plots for each of four radios, including the weather station. Incidentally I am puzzled that the spectrograms show a comb of frequencies. I thought 1200 baud packet was FSK using two frequencies, 1200Hz and 2200Hz. I have seen this before when using sound card decoder software for packet but I have always been puzzled by it.
The top two plots are for the two Kenwood radios. They look pretty near identical. In the absence of any test equipment to actually measure the deviation levels I have to assume that these two radios were correctly set up at the factory and represent the ideal signal to aim for. It is interesting that the highest frequency which I would have assumed to be 2200Hz actually peaks at about 2235Hz. The peak closest to the lower frequency of 1200Hz is actually 1185Hz. But there are six peaks at intervals of about 150Hz between the two and some spaced the same distance going below the lower frequency. I'm sure there's a reason for it.
If you look at the plot for the VX-8G the top peak is at about 2230Hz and 5dB weaker than the corresponding peak of the Kenwood traces. The other peaks are lower still with the one at about 1180Hz around 8dB lower than that from the Kenwood. Some VX-8 users have complained about low packet deviation of the radio but have been told by Yaesu that it is within specification. As far as I know there is no adjustment to increase it. You would have thought from this that I would need to increase the audio level to get reliable decoding of the VX-8 compared to the Kenwoods. In fact, I have usually had to reduce it a little. As previously stated, the volume setting at which the PIC TNC will decode the VX-8G is quite critical, whereas the Kenwood signals would decode over quite a wide range of audio input levels.
When you look at the signal from my WX-1 weather station, which is modulating a Radiometrix VHF transmitter module, the peak signal levels are close to that of the Kenwoods. The lower frequency components are in fact a couple of dB stronger. However, it's clear that the frequencies are too high. The top peak, which should be 2200Hz, is about 2290Hz. And the one closest to 1200Hz is about 1230Hz. When setting up my FoxTrak APRS tracker I had to set the frequencies using the PIC calibration routine as low as they would go before my TH-D710 would decide it, so clearly it is the frequency offset that is responsible for the packets not being decoded. The WX-1 firmware unfortunately does not have a calibration procedure. Either the PIC clock crystal needs to be slowed down a bit or I need to make a change in the source code to shift the frequencies and recompile the firmware.
But it's the VX-8G that most bothers me most. I wish there was a way to boost the level of its packet modulation and make it more like the Kenwoods.
Thursday, February 10, 2011
Wednesday, February 09, 2011
Screaming for help
I wonder if readers could help me locate a couple of software utilities I need for current projects?
Screamer 1.7 PIC boot loader (or successor.) This was developed by or for Sparkfun, who have version 1.6 on their website. Unfortunately it only allows serial ports COM1 - COM6, which is not convenient for me due to all the COM ports dedicated to radios and TNCs on my shack computer. Forum posts mention a version 1.7 that lets you enter larger COM port numbers but the links to it are now dead. The version 1.6 download includes VB6 source code so I could fix the problem myself except that I only have VB.NET which is totally incompatible with it (don't you just love Microsoft?) So does anyone know where I can find a copy of Screamer 1.7 or later?
Programming software for Friendcom FC-201SA UHF Transceiver Module. I purchased one of these a few months ago but have only just got round to using it. However it is operating on its default frequency of 430.000MHz. There is a serial interface that can be used to set the frequency in each of the 16 channels and also set the channel. The manual describes the module's command set but I don't really want to spend days writing a program for it. The manual also mentions programming software but it was not supplied when I purchased the module from Elcom Research and their website is now defunct. I can't find the utility on the download page of the Friendcom website and the email I sent to Friendcom did not receive an answer. Does anyone know where I can find a copy of this software?
In case anyone has what I'm looking for and is thinking of emailing software to me, please contact me first. Google doesn't just block executable attachments, it blocks the entire email so I'd never even know you'd written. The trick is to put it into a zip file and then change the file extension to something other than zip.
Screamer 1.7 PIC boot loader (or successor.) This was developed by or for Sparkfun, who have version 1.6 on their website. Unfortunately it only allows serial ports COM1 - COM6, which is not convenient for me due to all the COM ports dedicated to radios and TNCs on my shack computer. Forum posts mention a version 1.7 that lets you enter larger COM port numbers but the links to it are now dead. The version 1.6 download includes VB6 source code so I could fix the problem myself except that I only have VB.NET which is totally incompatible with it (don't you just love Microsoft?) So does anyone know where I can find a copy of Screamer 1.7 or later?
Programming software for Friendcom FC-201SA UHF Transceiver Module. I purchased one of these a few months ago but have only just got round to using it. However it is operating on its default frequency of 430.000MHz. There is a serial interface that can be used to set the frequency in each of the 16 channels and also set the channel. The manual describes the module's command set but I don't really want to spend days writing a program for it. The manual also mentions programming software but it was not supplied when I purchased the module from Elcom Research and their website is now defunct. I can't find the utility on the download page of the Friendcom website and the email I sent to Friendcom did not receive an answer. Does anyone know where I can find a copy of this software?
In case anyone has what I'm looking for and is thinking of emailing software to me, please contact me first. Google doesn't just block executable attachments, it blocks the entire email so I'd never even know you'd written. The trick is to put it into a zip file and then change the file extension to something other than zip.
Monday, February 07, 2011
USB technology du jour
Getting a radio to communicate reliably with a computer proves to be a difficult task for some people. The trouble seems to be caused by USB to serial adapters that corrupt the data when used with certain software or at certain speeds. Whenever these problems are discussed in amateur forums inevitably the question of why radio manufacturers don't build USB interfaces into their radios (as Icom and Kenwood have started to do) is raised. I think this is a very short sighted view that really does nothing to solve the problem.
To begin, let's deal with the argument that goes "why force users to buy a serial to USB adapter when serial ports have been obsolete for years." Users have to use something to connect the radio to the computer and the only physical difference between a serial to USB adapter and a serial cable is that one end of the former is a bit fatter to accommodate the USB electronics. There is little difference in cost between the two cables. Furthermore, just because PCs don't come with serial ports doesn't mean that they are obsolete. My shack PC has four - soon hopefully to be increased to six if I can get it to accept the two port board I removed when I upgraded to four as an addition - and installing them is easily within the capabilities of any radio amateur. If you use a laptop you don't have that choice, true enough, but why force a change on everybody because some people choose shack PCs that have limited expandability?
But the main reason why I think building USB into the radio isn't the solution is that it doesn't address the problem. It's USB - either the hardware or its drivers - that is causing the connectivity problems in the first place. If an external adapter cable is used, users can try a different type if the one they have is not working correctly. If the USB hardware is built into the radio then they are stuck with it and reliant on finding a software solution. That might be a matter of getting the manufacturer to fix its drivers, which is not so easy.
Another reason why building USB into the radio is a bad idea is that it limits choices for users. If you want to connect your radio anything other than a PC, something like a MicroHam controller or a remote control over internet device for example, then you're stuffed if you've got a USB port. Some owners of Kenwood's new TH-D72 APRS handheld have already found that Kenwood's decision to provide a USB rather than a serial interface to the radio's internal TNC means they can't use Bluetooth to link it to APRS software on another mobile device.
Whenever I argue that switching to USB is a bad thing someone always counters the argument by saying USB can provide a wide bandwidth connection that can handle other things such as audio. As somebody who has sometimes had three USB sound devices attached to my PC I can certainly see how a one cable interface between rig and computer might seem attractive, especially to those who believe that sound card modes need something like a RigBlaster. And I would agree that a fast interface would be a nice thing to have if it was one that was a true universal standard like, say, Ethernet.
But if we are talking about USB, most of my arguments still apply. Built-in USB limits choices. An analogue audio input and output lets you interface audio with other things such as digital voice recorders, TNCs and VOIP devices for remote control over the internet. We're hams, we're supposed to be able to handle technical stuff, do we really need plug and play interfaces for our radios?
USB is a technology du jour. It keeps changing, whereas RS-232 and analogue audio are permanent standards. USB 1.0 devices seem still to work with USB 2.0 but now USB 3.0 is starting to appear and it remains to be seen how backwards compatible that will be with older USB devices. Who knows what the computers of 10 or 15 years time will be equipped with? It may not be USB anything but something completely different.
Finally there is the fact that USB depends on software to work: drivers that are operating system dependent. Most serial to USB hardware is at least supported by operating systems other than Windows "out of the box." I don't have the experience to know whether that is true for USB interfaces that carry audio or other information. Is anyone using their IC-7600 or TS-590 under Mac OS or Linux?
Even if the manufacturer-supplied drivers work for Windows today, will they work on the latest version of Windows in 10 or 15 years time? If not, will the manufacturer of the radio provide new drivers once the radio is an obsolete model? I'll bet a perfect but unusable as no longer supported scanner that they won't. I'm equally sure that I'll still be able to interface my K3's RS-232 serial port and analogue line input/output to whatever computing hardware and operating system I'm using then.
To begin, let's deal with the argument that goes "why force users to buy a serial to USB adapter when serial ports have been obsolete for years." Users have to use something to connect the radio to the computer and the only physical difference between a serial to USB adapter and a serial cable is that one end of the former is a bit fatter to accommodate the USB electronics. There is little difference in cost between the two cables. Furthermore, just because PCs don't come with serial ports doesn't mean that they are obsolete. My shack PC has four - soon hopefully to be increased to six if I can get it to accept the two port board I removed when I upgraded to four as an addition - and installing them is easily within the capabilities of any radio amateur. If you use a laptop you don't have that choice, true enough, but why force a change on everybody because some people choose shack PCs that have limited expandability?
But the main reason why I think building USB into the radio isn't the solution is that it doesn't address the problem. It's USB - either the hardware or its drivers - that is causing the connectivity problems in the first place. If an external adapter cable is used, users can try a different type if the one they have is not working correctly. If the USB hardware is built into the radio then they are stuck with it and reliant on finding a software solution. That might be a matter of getting the manufacturer to fix its drivers, which is not so easy.
Another reason why building USB into the radio is a bad idea is that it limits choices for users. If you want to connect your radio anything other than a PC, something like a MicroHam controller or a remote control over internet device for example, then you're stuffed if you've got a USB port. Some owners of Kenwood's new TH-D72 APRS handheld have already found that Kenwood's decision to provide a USB rather than a serial interface to the radio's internal TNC means they can't use Bluetooth to link it to APRS software on another mobile device.
Whenever I argue that switching to USB is a bad thing someone always counters the argument by saying USB can provide a wide bandwidth connection that can handle other things such as audio. As somebody who has sometimes had three USB sound devices attached to my PC I can certainly see how a one cable interface between rig and computer might seem attractive, especially to those who believe that sound card modes need something like a RigBlaster. And I would agree that a fast interface would be a nice thing to have if it was one that was a true universal standard like, say, Ethernet.
But if we are talking about USB, most of my arguments still apply. Built-in USB limits choices. An analogue audio input and output lets you interface audio with other things such as digital voice recorders, TNCs and VOIP devices for remote control over the internet. We're hams, we're supposed to be able to handle technical stuff, do we really need plug and play interfaces for our radios?
USB is a technology du jour. It keeps changing, whereas RS-232 and analogue audio are permanent standards. USB 1.0 devices seem still to work with USB 2.0 but now USB 3.0 is starting to appear and it remains to be seen how backwards compatible that will be with older USB devices. Who knows what the computers of 10 or 15 years time will be equipped with? It may not be USB anything but something completely different.
Finally there is the fact that USB depends on software to work: drivers that are operating system dependent. Most serial to USB hardware is at least supported by operating systems other than Windows "out of the box." I don't have the experience to know whether that is true for USB interfaces that carry audio or other information. Is anyone using their IC-7600 or TS-590 under Mac OS or Linux?
Even if the manufacturer-supplied drivers work for Windows today, will they work on the latest version of Windows in 10 or 15 years time? If not, will the manufacturer of the radio provide new drivers once the radio is an obsolete model? I'll bet a perfect but unusable as no longer supported scanner that they won't. I'm equally sure that I'll still be able to interface my K3's RS-232 serial port and analogue line input/output to whatever computing hardware and operating system I'm using then.
Thursday, February 03, 2011
PIC TNC problem
I have been playing around some more with the WB8WGA PIC TNC that I built. While it was quite fun to see what it managed to decode and have it working as a digipeater, I eventually wanted to get it talking to some real software. UI-View is supposed to be able to work with TNCs in Converse mode, so that was going to be the easiest thing to try. But in order to do that I needed to solve the problem of the firmware expecting a linefeed to terminate a command.
That problem turned out to be fairly easy to solve, though I ran into some problems by trying to make some other changes. The trouble with working with microcontrollers, at least when using assembler, is not just that they don't have much memory but it isn't an a seamless block and you have to take care of memory management. Consequently I found that adding one line of code could make the difference between the program compiling and getting an error on the lines of "you are writing to a location that has already been written to." I'm a high level language kind of guy who expects the compiler to take care of all this for me. I suspect that major modifications to the code like adding KISS support is going to be beyond me.
Anyway, I managed to get it so that UI-View could make its various settings and put the TNC into Converse mode. I had to get rid of the message that comes up on entering Converse mode because it often clashed with UI-View sending a beacon. I then set some IS to RF gating options to generate a lot of traffic and found that the TNC kept going back into command mode. This appeared to be due to the timeout timer that throws you back into command mode if you start to type something and don't hit Enter. This was a pretty annoying feature, quite apart from interfering with reliable operation, so I had to take that out, too.
It seemed like the TNC was ready to go. But although it would transmit beacons from UI-View perfectly well, the program would not display any received stations. I could see the decoded packets in UI-View's Terminal window, but they never appeared on the map anywhere. I did some searching and found one complaint about this in the Fox Delta Yahoo! group (the Fox Delta Mini TNC is apparently based on the same firmware) but no solution.
There did not seem to be anything wrong with the packets and I spent a couple of hours trying various things to see if I could establish what the problem was. Eventually I hooked UI-View up to my Kenwood TM-D710 in packet mode and watched what happened. Packets were received and displayed as expected. So then I connected a terminal program to try to see what the received packets looked like. (This is Windows HyperTerminal with a special Terminal-Hex font that shows the hex value of non-printable characters.)
This is what the output from the Kenwood TNC looked like:
and this is the output from the PIC TNC:
As you can see, the only difference (apart from the fact that the PIC TNC is displaying the packets as it digipeated them while the Kenwood heard both the original and the digipeated versions) is the text UI or UI R in angle brackets before the colon that marks the start of the payload part of the packet. It doesn't look like something significant enough to make UI-View ignore the packet. It isn't something that appears in the raw packets listings at aprs.fi. I don't know what it means or how to generate it in the output from my TNC. So I'm stumped at the moment and am hoping that someone who knows the answer will read this and point me in the direction of a solution.
That problem turned out to be fairly easy to solve, though I ran into some problems by trying to make some other changes. The trouble with working with microcontrollers, at least when using assembler, is not just that they don't have much memory but it isn't an a seamless block and you have to take care of memory management. Consequently I found that adding one line of code could make the difference between the program compiling and getting an error on the lines of "you are writing to a location that has already been written to." I'm a high level language kind of guy who expects the compiler to take care of all this for me. I suspect that major modifications to the code like adding KISS support is going to be beyond me.
Anyway, I managed to get it so that UI-View could make its various settings and put the TNC into Converse mode. I had to get rid of the message that comes up on entering Converse mode because it often clashed with UI-View sending a beacon. I then set some IS to RF gating options to generate a lot of traffic and found that the TNC kept going back into command mode. This appeared to be due to the timeout timer that throws you back into command mode if you start to type something and don't hit Enter. This was a pretty annoying feature, quite apart from interfering with reliable operation, so I had to take that out, too.
It seemed like the TNC was ready to go. But although it would transmit beacons from UI-View perfectly well, the program would not display any received stations. I could see the decoded packets in UI-View's Terminal window, but they never appeared on the map anywhere. I did some searching and found one complaint about this in the Fox Delta Yahoo! group (the Fox Delta Mini TNC is apparently based on the same firmware) but no solution.
There did not seem to be anything wrong with the packets and I spent a couple of hours trying various things to see if I could establish what the problem was. Eventually I hooked UI-View up to my Kenwood TM-D710 in packet mode and watched what happened. Packets were received and displayed as expected. So then I connected a terminal program to try to see what the received packets looked like. (This is Windows HyperTerminal with a special Terminal-Hex font that shows the hex value of non-printable characters.)
This is what the output from the Kenwood TNC looked like:
and this is the output from the PIC TNC:
As you can see, the only difference (apart from the fact that the PIC TNC is displaying the packets as it digipeated them while the Kenwood heard both the original and the digipeated versions) is the text UI or UI R in angle brackets before the colon that marks the start of the payload part of the packet. It doesn't look like something significant enough to make UI-View ignore the packet. It isn't something that appears in the raw packets listings at aprs.fi. I don't know what it means or how to generate it in the output from my TNC. So I'm stumped at the moment and am hoping that someone who knows the answer will read this and point me in the direction of a solution.
Wednesday, February 02, 2011
PIC16F88 TNC
I have mentioned before that when I'm not in the shack I like to run a little program called aprsg to gate all the local APRS activity to a UHF frequency so I can see what is going on in the local APRS world using an APRS-capable HT. I have set up a system using sound card software, a USB sound device and my FT-817ND to do this. But I would like to make a standalone box for this. The first step in this project is to find a simple, cheap TNC.
There are products that would fit the bill from Byonics and Argent Data. Unfortunately they are not available in the UK and the cost of importing these kits from the US makes them less than cheap. I looked at the Fox Delta Mini TNC. But that is not a KISS TNC, as was confirmed by an email to Dinesh, the proprietor of Fox Delta.
Whilst searching around for possible solutions I came across a design for a TNC using a PIC16F88 microcontroller by WB8WGA that was originally published several years ago as an article in the ARRL experimenter magazine QEX. It has been modified by DJ7OO and ZL3AME, who had developed a stripboard layout for it. I had all the bits apart from the microcontroller and the clock crystal, which were quickly sourced on eBay. So I thought it would be an interesting project to build and experiment with.
ZL3AME's stripboard layout results in some quite lengthy signal paths. Despite this, the TNC worked first time, with just a minor glitch caused by my mis-wiring the PTT connection on the transceiver connector. (I have a standardized interface that I use on all my projects, with an 8-pin mini-DIN connector for audio and PTT to the transceiver, and a 6-pin mini-DIN connector for serial and GPS connections. I can then have a standard set of cables to hook the projects up to any radio, connect to the computer or a GPS, etc.)
With all the bits of APRS kit I have it was easy to generate some test signals and I soon had packets being decoded on the terminal screen. I wondered how sensitive the TNC would be as it uses the PIC16F88 to do the decoding instead of a modem chip like the MX614. I have not seen any DX packets decoded yet, but it does seem that decoding success is dependent on the audio level into the TNC. All of my APRS generators were decoded with the exception of my weather station, which has rather low deviation. When using the old Kenwood TH-205E as a receiver I could increase the volume so the weather station was decoded, at the expense of reliable decoding of the other radios. That was not even an option when using the DATA output of a radio, which has a fixed level. I suspect that performance could be improved if you could add an audio ALC on the input.
The TNC can also send APRS beacons and work as a fill-in digipeater. To send a fixed position you can simply encode the position co-ordinates into the beacon text. There are also a couple of jumpers that allow you to connect a GPS to the serial port, which would allow the TNC to work as a standalone tracker. I haven't tried that, since I already have a standalone tracker. There are no Connect or Disconnect commands so it cannot be used as it stands for packet radio.
This is not a KISS TNC, so it can't be used with APRSIS32 or aprsg or any of the software I use. I installed UI-View which apparently has the ability to use a TNC for APRS in Converse mode, but it doesn't work with that either. I think that is due to the fact that the TNC expects CR/LF at the end of each command instead of just CR, so fixing that will be the task of my first attempt at modifying the firmware. Other things I would like to try are making it work at 300baud (for HF packet) instead of 1200baud, and implementing KISS mode. In KISS mode the PC software provides the complete packet and the TNC just has to add a CRC and send it. So in theory it should be simpler to implement than the existing code which has to construct an AX.25 packet from the information entered plus parameters previously set in the configuration. We shall see. The TNC source code is written in assembler, and trying to understand assembler code is to me like not being able to see the wood for the trees. But it will be a good incentive for me to look "under the hood" at how APRS, packet and AX.25 really work.
Many of the links to original information about this project seem now to be dead and I had to do quite a lot of searching to collect the information I have. For the benefit of anyone else who would like to try building one of these TNCs I have assembled all the files and information I found into a zip file which you can download here.
There are products that would fit the bill from Byonics and Argent Data. Unfortunately they are not available in the UK and the cost of importing these kits from the US makes them less than cheap. I looked at the Fox Delta Mini TNC. But that is not a KISS TNC, as was confirmed by an email to Dinesh, the proprietor of Fox Delta.
Whilst searching around for possible solutions I came across a design for a TNC using a PIC16F88 microcontroller by WB8WGA that was originally published several years ago as an article in the ARRL experimenter magazine QEX. It has been modified by DJ7OO and ZL3AME, who had developed a stripboard layout for it. I had all the bits apart from the microcontroller and the clock crystal, which were quickly sourced on eBay. So I thought it would be an interesting project to build and experiment with.
ZL3AME's stripboard layout results in some quite lengthy signal paths. Despite this, the TNC worked first time, with just a minor glitch caused by my mis-wiring the PTT connection on the transceiver connector. (I have a standardized interface that I use on all my projects, with an 8-pin mini-DIN connector for audio and PTT to the transceiver, and a 6-pin mini-DIN connector for serial and GPS connections. I can then have a standard set of cables to hook the projects up to any radio, connect to the computer or a GPS, etc.)
With all the bits of APRS kit I have it was easy to generate some test signals and I soon had packets being decoded on the terminal screen. I wondered how sensitive the TNC would be as it uses the PIC16F88 to do the decoding instead of a modem chip like the MX614. I have not seen any DX packets decoded yet, but it does seem that decoding success is dependent on the audio level into the TNC. All of my APRS generators were decoded with the exception of my weather station, which has rather low deviation. When using the old Kenwood TH-205E as a receiver I could increase the volume so the weather station was decoded, at the expense of reliable decoding of the other radios. That was not even an option when using the DATA output of a radio, which has a fixed level. I suspect that performance could be improved if you could add an audio ALC on the input.
The TNC can also send APRS beacons and work as a fill-in digipeater. To send a fixed position you can simply encode the position co-ordinates into the beacon text. There are also a couple of jumpers that allow you to connect a GPS to the serial port, which would allow the TNC to work as a standalone tracker. I haven't tried that, since I already have a standalone tracker. There are no Connect or Disconnect commands so it cannot be used as it stands for packet radio.
This is not a KISS TNC, so it can't be used with APRSIS32 or aprsg or any of the software I use. I installed UI-View which apparently has the ability to use a TNC for APRS in Converse mode, but it doesn't work with that either. I think that is due to the fact that the TNC expects CR/LF at the end of each command instead of just CR, so fixing that will be the task of my first attempt at modifying the firmware. Other things I would like to try are making it work at 300baud (for HF packet) instead of 1200baud, and implementing KISS mode. In KISS mode the PC software provides the complete packet and the TNC just has to add a CRC and send it. So in theory it should be simpler to implement than the existing code which has to construct an AX.25 packet from the information entered plus parameters previously set in the configuration. We shall see. The TNC source code is written in assembler, and trying to understand assembler code is to me like not being able to see the wood for the trees. But it will be a good incentive for me to look "under the hood" at how APRS, packet and AX.25 really work.
Many of the links to original information about this project seem now to be dead and I had to do quite a lot of searching to collect the information I have. For the benefit of anyone else who would like to try building one of these TNCs I have assembled all the files and information I found into a zip file which you can download here.
Subscribe to:
Posts (Atom)






