Thursday, August 8, 2013

Yaesu FT-857D Crashes (reboot loop) after programming a 4 character channel label with CHiRP

I found a small latent problem in the Yaesu FT-857D firmware which could cause the radio to crash and go into a reboot loop when a 4 character or less label was created using the free CHiRP radio programming software. I isolated the problem, the Yaesu FT-8[59]7 driver in CHiRP now works around the problem starting with daily builds around June 27th, 2013.

This blog post just archives the info in case someone else stumbles across the problem either by using an outdated version of CHiRP or writing their own software for manipulating the Yaesu FT-8[59]7 memory. This probably applies to the FT-897(d) as well.

The problem has to do with how the 8 character memory label is padded.  The older versions of CHiRP were padding unused characters with 0xFF.  An unused memory label defaults to eight bytes of 0xFF on the radio.   When a label is created for a memory (channel) on the radio, it is set to 'CH-NNN  '.  There is no way that I found, from the radio to create a memory label that wasn't space padded.  Padding with 0xFF for labels that are 5 characters or more doesn't seem to cause any issues. The corrected version of CHiRP now space pads the label out to 8 characters.  I believe G4HFQ's FTbasicMMO, only space pads as well.

Marco Filippi, IZ3GME the primary author of the FT-8[59]7 driver made the change within hours of me reporting the problem.  The very next CHiRP build had the fixed version of the driver.  The current release of CHiRP, 0.3.1 from April 2013, has the old driver.  Until a version later than 0.3.1 is released, you need to download a daily release.

I believe I'm justified in calling this a small bug in the Yaesu firmware, because when the radio accesses the memory with the 0xFF padded label, it goes into a continual reboot cycle with lots of clicking of relays and a beep each time it restarts.  From the radio itself, the only way to resolve this is to force a reset which will clear some of the settings and/or memory entries depending upon which reset is used.  My opinion is the radio's firmware should be a little more forgiving than this.

Note: if your Yaesu FT-857/897 ever does get stuck in a crash/reboot loop, you can still get into clone mode, and save a copy of the whole set of radio settings and memories before you reset it. 

Another thing I learned about the FT-857/FT-897 firmware during all of this is that it is nearly impossible to get a pristine memory image from the radio.  The radio has three different types of resets which will clear all memories, some settings, and a "full microprocessor reset" which is supposed to return the radio to all factory settings.  However, the way this is implemented, the eeprom isn't really reset to a known default, just select bits are cleared marking all of the memory entries unused.  Most of the previous memory channel settings, including the label are still there, which makes things confusing if you were looking for clear, reproduceable state.

(Note: There probably is a way to completely clean the EEPROM to a known, reproduceable state, but you don't want to use it.   For some reason, Yaesu's firmware writers included a CAT command which would completely reset the radio including the specific calibration settings that are written into EEPROM for each radio.   Unforatunely, it's not that improbable to accidentally trigger this when using the CAT interface a lot, possibly with a baud rate setting mismatch.  Every FT-8[59]7 owner should use the service menu to record all of the calibration settings in case they are ever lost.  This has been documented on the FT-857 and FT-897 Yahoo group's.   There is also a few pieces of software, including a PERL script from 0xdecafbad.com for reading out the calibration settings over the CAT interface using the undocumented CAT peek command.

Hopefully I'll get around to posting and documenting more of the things I've learned about the FT-857d.  All of the information is out there, but not necessarily organized to make it easy to find.

References

Understanding the Arduino platform (You don't need a separate Arduino board for everything you build)

From time to time, I've heard some objections about using the Arduino platform to build things because of the costs. Arduino prices have come down, but it's also worth understanding you don't need an Arduino board for every project.
The Arduino is essentially a board that has an Atmel AVR ATmega328p microcontroller chip on it with a USB interface, power supply, clock crystal, and a lot of sockets for the pins in a (now) well known form factor that allows stacking additional board/modules called shields for additional functionality.
The older units had an FTDI USB serial interface chip on it which added significantly to the cost, but had some interesting alternative uses. Newer Arduinos use another Atmel AVR chip that has USB support built in, which winds up being less expensive than the FTDI chip.
The form factor (size of the board with pin sockets) makes it easy to get started and prototype but also adds to the cost.
The Arduino software environment also makes it significantly easier to get started with microcontroller programming.  There is an small, development environment for Windows/Mac/Linux which completely wraps the C/C++ compiler and chip programmer making it a simple push button operation to compile your sketch and program the chip.
The AVR microcontroller is essentially a full system on a chip, with an 8 bit CPU, a small amount of RAM, 32K of flash memory, a small EEPROM, and a TTL level serial interface.  There is even an internal oscillator so you don't have to use a separate crystal, or resonator, if you have an application where you don't need the timing stability offered by an external crystal.
Bare ATmega328P chips cost $2-4 in single quantities.  They come without any programming, so you need hardware to program the chip.
The Arduino gets around the need for having hardware to program the microcontroller chip by preloading a bit of firmware, a boot loader, that allows the chip to receive code over the USB/Serial interface and write it to the 32K flash to program itself.
An Arduino can be used to program bare AVR chips, so you can use one Arduino to create more Arduinos.
So the moral of the story, once you've built something using an Arduino, you don't have to dedicate a whole Arduino board to each device.  You can easily build your project with a bare AVR chip and only the supporting components you need for your projects.  Typically this can be done for less than $5.

Note: This post is another reply that I had sent to a mailing list that I thought would be worth preserving and sharing as a blog post.

Wednesday, June 13, 2012

Using an Oscilloscope to Check Your (Transmitted) Signal

N2NOV had posted that Tektronix now has a Youtube channel with videos on how to properly use an Oscilloscope.  Many years ago, Tektronix published a good free PDF, The XYZ's of Oscilloscopes. It was
good but a little dry compared to a video presentation.

Well equipped radio operators have a special type of dedicated oscilloscope called a service monitor which allows viewing your transmitted signal, by tapping the radio frequency (RF) from the transmission line. Recently I came across a Youtube video that showed how to build a very simple RF sampling circuit that would allow using a common oscilloscope to monitor the RF output of your transmitter (transceiver).  While this won't do everything that a dedicated service monitor would do, it's a pretty cool way to check your signal if you only have an oscilloscope.  The RF sampler circuit described should be less than $10 in parts.

Personally I find this sort of thing to be very cool.  Even if I had an unlimited budget for buying equipment. I don't have the room to store it in NYC.

Note: This will only be useful for monitoring AM and SSB transmissions. I hope to come across something not too difficult to build that would be useful for looking at the output of an FM transmitter like the type most commonly used on VHF and UHF.

Good Tutorial on TCP/IP Diagnostics using Traceroute

MTK, just sent me this today.  It's a presentation and paper by Richard A. Steenbergen, from 2009 that covers the finer points of diagnosing TCP/IP networking problems with Traceroute.  It looks like it was originally presented as a tutorial at NANOG.  Why am I posting this?  If you tried to google "traceroute tutorial" you'd get tons of fairly lame overviews that show some traceroute output and attempt to explain it. 

To quote one of the intro slides:
Few people are actually skilled at interpreting traceroute.  Most ISP NOCs and even most mid-level engineering staff are not able to correctly interpret a complex traceroute.  This Leads to a significant number of misdiagnosed issues, false reports, etc, which flood the NOCs of networks world-wide.  The false report rate is so high that it is almost impossible to
report a real traceroute-based issue through all the noise.
There is a lot of nitty gritty practical details in here. Even if you rarely use traceroute, you'll learn a lot from this. This is one of those rare, good presentations and papers to file away so you can refer back to it and hopefully use to enlighten others.
Hope This Helps.

Sunday, June 10, 2012

Hams, Yahoo Groups and private message archives

Someone asked about learning the Yaesu VX-8 on one of the mailing lists I subscribe to. I sent the following response which has got general advice about Yahoo groups which seem to be popular with ham radio people. The most important bit:
If you are a member of any active Yahoo group that has useful information to share, consider lobbying the group's owner to make the message archive public.  It makes the information more accessible and should cut down on some of the redundant questions.
Please spread the word. The more information that is easily searchable the more we all benefit. 

Here's the original response:


I have a Yaesu VX-8DR and would be happy to answer questions about it.It has a lot of features and the manual isn't always as straightforward as it could be. I've learned a lot from reading the VX-8 Yahoo group for the last 2-3 years.

I suggest joining the Yahoo VX-8 Group, and then reading some of the old message traffic.  Many of the questions about the radio have been asked and answered since it came out.  Also check through the files and links section of the yahoo group.  There are some documents people have put together on working satellites, APRS and the ISS, etc.

Yahoo groups seem to be pretty popular for hams and there appears to be one for most popular radios.  If you have, or are considering purchasing a particular radio, check to see if an active yahoo group exists for it.
Then join it and look through the message and file archive.

Unfortunately one drawback of Yahoo groups is by default the message archive is only accessible by  members.  This means Google and the other search engines can't index the information stored in them.  The result is it's harder for you to search for answers to your questions.  You'll need to go to the Yahoo group and use its search function to look for answers.  (I still recommend using google to search for answers that might be available on the open internet in blog posts, open forums, etc.)

If you are a member of any active Yahoo group that has useful information to share, consider lobbying the group's owner to make the message archive public.  It makes the information more accessible and should cut down on some of the redundant questions.

Here are a few groups that I belong to that I'd like to get opened up:
There's a lot of knowledge locked up in those groups.

Hope This Helps,
--Rob

Tuesday, April 24, 2012

APRSDroid, freely available APRS app for Android phones

Here's another post that I've sent to a mailing list, that I thought might be worth sharing more widely. Many more people have Android phones with a built in GPS than have APRS capabilities via their radios.  This could be a useful tool in the toolbox for those who do public service events.

The APRSdroid application provides APRS functionality for Android Phones. An installable .apk as well as the source code are freely available from the developer's site.
  • http://aprsdroid.org/
The same application is also available in the Android Market for $4.50, which is an option for supporting the developer.

The app enables sending and receiving APRS beacons and messages via a data (internet) connection to the APRS-IS network.  Map data is also downloaded from the internet.  (This mode requires that you have cellular data coverage.)

The app can also generate AFSK tones for sending ARPS beacons and messages via a connection from your phone's earphone jack to your HT's microphone. Note VOX capability is needed.  The ability to decode AFSK tones isn't implemented yet, so it's not a complete software TNC replacement. However, it's on the requested feature list.

I was successful in making a straight-through connection from my Samsung Galaxy Nexus to my Wouxun KG-UV2D.  My Yaesu VX-8DR had no problems decoding the packets from APRSdroid via the Wouxun.   I need to go out to some open spaces to test how well it will be picked up by actual APRS digitpeaters.  It can be pretty hard to get APRS beacons out on NYC streets.   In general 2 meters can be pretty spotty on the streets in NYC. 70cm does a much better job of being reflected off of buildings, which is expected.

An alternate version of the application that uses pre-downloaded offline maps is available. This can be handy in places where there is no cellular coverage. I was able to get APRSdroid loaded and running on the Kindle Fire using the offline maps version (OSM).  The Kindle Fire is really too limited of a device to be useful for APRS since it doesn't have GPS or cellular data service.  However, it does have a 7" screen which would be useful for

iPhone users: I've seen similar apps listed in the app store, but I have no experience with them.

Tuesday, April 17, 2012

Amateur Radio License Free On-line Resources

During an on-air net, someone asked for on-line help in preparing for the Amateur Radio General Class license.  I sent this response to the group mailing list:

Free Study Guides

These are dense summaries of all of the material covered by the current question pools. For some topics the study guide treatment is enough.  For other topics, reading a full guide like the ARRL License Manuals is recommended. If you have enough time, I recommend reading the ARRL license manuals cover to cover, you'll learn quite a bit and they are a fairly light read.  The study guides still help because the license manuals can be quite verbose and even rambling at times.  Having a nice dense summary helps to crystallize what you need to know.

Note: There are quite a few study guides and slide presentations available on-line. The ones I listed above are the ones that I've seen and read. Many groups pull together similar material when then offer a Ham Cram class.  Some groups have a single day session where they attempt to cover all the material for you to take your test the same day.;

Check the Dates on Study Materials!

The question pools used for exams change every four years.  Additionally the rules governing amateur radio do periodically change which affects the answers to some of the questions. Make sure any study materials you are using are covering the test pool that will be used at the time you take your test!  While Amazon is a generally one of the easiest places to buy books, it's fairly difficult to tell if you are getting the correct current edition.

Practice tests and On-line Flash Cards

There are a number of web sites that will let you take a practice test.  Some sites offer all the questions in the test pool as "flash cards" so you can try every question.  There are many of these sites out there.  Many of them are very basic or feature poor.  The one that I found the best when I was studying was HamExam.org. It's well implemented and keeps track of what questions you've seen and answered correctly.  If you practice with it for long enough you will cover the entire question pool. The statistics will let you know which sections of the test you are struggling with.

ARRL License Manual Supplemental Material

There are some additional resources on the ARRL.org web site that aren't well publicized.  For example, in the back of the license manual books is a full copy of the question pool. However the book doesn't present the material in the same order as the question pool. When reading the book and trying to test yourself on the question pool, you have to skip around a lot.  A version of the question pool that is in the same order as the material as the book is available. I think this should have been the version printed in the book.
Supplemental Material:

Multiple Choice Test Strategies

It's worth reviewing tips for taking multiple-choice tests. Namely for most questions two of the choices can usually be quickly eliminated as wrong answers. Doing so leaves you with two possible answers, giving you at 50% chance of getting it right even if you have to make a guess between the remaining answers.

Hope This Helps,
--Rob