Wednesday, April 11, 2012

Free on-line college-level computer science classes.

What do you want to learn today?
Starting last fall, Standford University made three college level computer science classes available on-line for free covering Databases, Artificial Intelligence, and Machine learning. These are actual courses with a set schedule, video lectures, graded assignments and quizzes. Previously lectures and course materials had been made available freely on-line. However, this is one of the first attempts to offer a full, structured course.
I followed along with the database class since I never took a formal class in databases. I was extremely impressed with: the format, the experience, and the potential for change. I was also incredibly impressed with Prof Widom, who appears to have a true gift for being an educator. She makes the delivery of the class seem effortless, which belies the enormous number of hours that must have gone into producing the course materials.
A good overview is Professor Widom's blog post:
There is now a for-profit company, Coursera, that is commercializing this style of on-line learning. There is now for Spring 2012, a much wider range of classes available.
Armando Fox and David Patterson delivered a very ambitious class on Software-as-a-Service (SaaS), that provides a slice across agile software engineering, web development using Ruby-on-Rails, cloud based deployments and many software engineering tools. It aims to take students through a very fast paced, realistic slice of a complete development experience. This is opposed to the traditional method of teaching one technology, one silo, at a time. It's still early to tell, but I suspect students who learn this way will be much more productive developers, much sooner.
Professors Fox and Patterson are developing a book, Engineering Long-Lasting Software: An Agile Approach Using SaaS and Cloud Computing that covers this slice of topics. The book is in the alpha stages now. I recommend reading at least the free sample chapter and preface. They've reviewed over 60 books on agile, ruby, rails, etc. in order to come up with the material for the course and book. The first run of the class was in March 2012. They are going to do a second run in May 2012.
A Computer Science 101 class is to start April 23rd, 2012. The class is taught by Professor Nick Parlante. I've recommended it to a number of people with no previous computer science background. The class will be using a simplified version of javascript and browser tools. I'll be following the feed back from the people I've recommended it to.
Not to be left out, MIT is also offering a free course in electronics via MITX: MIT's new on-line learning initiative. While I'm interested in learning as much as I can about electronics, I decided not to try this course after reading the prerequisites. This appears to be a very formal class in the theory that's very heavy on math and physics. I unfortunately don't have a good math background.
When talking about free on-line learning, it is also worth mentioning the very impressive Khan Academy. Wikipedia's description:
The Khan Academy is a non-profit educational organization, created by American educator Salman Khan. With the stated mission of "providing a high quality education to anyone, anywhere", the website supplies a free online collection of more than 3,100 micro lectures via video tutorials stored on YouTube teaching mathematics, history, healthcare and medicine, finance, physics, chemistry, biology, astronomy, economics, cosmology, organic chemistry, American civics, art history, microeconomics and computer science."
While this is all very exciting now, it will be interesting to look back five to ten years from now to see what the effects of the wealth of free learning materials will be.

Monday, April 9, 2012

Interfacing Radios to computer sound cards.

A question that frequently comes up on some of the various radio mailing lists I'm on is how to interface the radio to a computer for doing digital modes via the sound card. The sound card provides the equivalent of a modem, doing digital to analog and analog to digital conversion.

Skip Tellar, KH6TY, has a design called DigiVOX that was in the March 2011 QST for sound card interfacing. It will do a VOX function for activating the Push-To-Talk for doing digital modes without using any additional signaling lines.


Mark Phillips, NI2O, sells a kit called USB Digivox that combines a USB sound
card and KH6TY's digiVOX interface at his Go Box Gizmos site. This simplifies the setup and gives a dedicated sound card for the radio analog to digital and vice-versa.


Argent Data systems is a good source for a microphone/speaker cable for connecting to Kenwood, Wouxun, Puxing, and other chinese radios that emulate the Kenwood.


The software that is the most popular for doing sound card digital modes is FLdigi by W1HKJ. It can do quite a few different modes and is cross platform. It's got a lot of functionality and though has a bit of a learning curve. Fortunately there are a lot of tutorials out there on how to use FLdigi.


Note: Laptops often have a MIC input connector and not a line level input. On the ring of the MIC connector is 2-5V for biasing the microphone element. You want to take care with this, I'd at least make sure to put a capacitor to block the DC or make no connection to that side. If I remember correctly it corresponds to the Right (Red) channel.

13 months since my last post!

Oh, now I'm a bit ashamed that I haven't posted anything to this blog since February 2011. I thought I would have at least posted semi-annually.

I'm going to try to post some of the more helpful answers that I send to various discussion groups in the hopes that more people will be able to find my answers and get more value out of them. Also it might help me find stuff I've posted before so I don't keep rewriting it.

Some of these "answers" might seem a bit out of context. Sorry about that. I don't really anticipate that anyone is really reading this blog sequentially. All I can hope for is that someone might find one of my entries through some googling.

On-line code of conduct for corporate citizens.

I stumbled across UpMan's Rules of Conduct which seemed like a great set of guidelines to follow, not just if you are working for corporate entity and posting on-line.

Thursday, February 3, 2011

Creating a FreeDOS USB boot stick for Samsung F4 Firmware updating.

As I wrote in my previous post, the Samsung F4 2 TB drive, Model HD204UI, Firmware Version: 1AQ10001 has a very nasty firmware bug that causes data corruption in the form of failed writes. Samsung only makes the firmware update available as a DOS exectuble (.exe).

Note: It should be possible to extract the .bin or .hex from that and use one of the fwupdate utilities that were popular for CD/DVD burners. I wasn't willing to risk bricking the drive, so I'll leave that to someone else. As I said, even with the firmware fix I'm considering returning the drive, because I find Samsung's handling of this matter difficult to put any faith in.

I was able to do the following. I followed the instructions on this page, written by Timo Heissenbttel to be a reminder for how to do this the next time it comes up. It uses syslinux and FreeDOS. Fortunately enough drivers are there that I was able to boot it on a Dell Poweredge without having to scramble to find lots of drivers. I was able to copy Samsung's F4EG.exe to the thumb drive, after formatting, partitioning, running syslinux and copying freedos to the drive.

Hope This Helps Somebody Else.

Samsung 2 TB HD204UI Firmware Bug,

The Samsung 2 TB SATA Drive, Model HD204UI, Firmware version 1AQ10001, has a nasty bug which causes data corruption if an Identity command issued while the drive is buzy writing with queued requests via NCQ. Smartctl, hdparm, and any number of utilities can issue an Identity request to the drive. I noticed it because I've got smartd (part of the smartmontools package) running in the background to periodically do smart health checks of the drives on my servers.

Samsung appears to be handling this incredibly badly, yet the drives still receives very high reviews.

1. This error is easy to reproduce, I'm really surprised it wasn't caught earlier.

2. New drives as of Dec 2010 are still shipping with the broken firmware.

3. The updated firmware doesn't have a new version number. Let me say that again, They didn't bother to update version number so you can tell if you need to do a firmware update. This also means you can't easily tell if you've successfully updated the drive's firmware. Seriously, as far as I can tell, there is no way to tell a good drive from a bad one.

4. Finding the firmware update on their site is difficult. It is listed in an FAQ entry as "Q. Patch tool for Identify fail during NCQ write command.(Model: F4EG". That's clear as mud isn't it? At least the answer to the question in the FAQ is a little bit clearer "If identify commmand is issued from host during NCQ write command in the condition of PC, write condition is unstable. So It can make the loss of written data."

5. The firmware update is only found on that FAQ page, yet, there is no version number, no date, or any way of knowing if you are downloading the most up-to-date or correct firmware update.

6. The update is in the form of a DOS .exe file. You need a system you can boot DOS to update the firmware.

By a fortunate accident, I was able to spot the problem during the extended drive burn test that I do, which has saved me several times. I wrote my own Perl script to do somewhat of the equivalent of a surface scan, repetitively writing patterns across the whole disk and reading it back. There is some belief that there isn't any value in running your own surface scans any longer since it's been done by the drive manufacturer. My experience is that infant mortality rates on dirt cheap drives seems to be climbing. Testing doesn't appear to be improving.

Given Samsung's mishandling of this. I'm still considering returning this drive. I can see having any faith in Samsung's storage products given the above. To me the worst part is that they couldn't bother to update the fixed firmware version number which shows, IMnsHO, a complete lack of rigor in engineering as well as a complete disregard for customer's time.

Thursday, January 6, 2011

Yaesu VX-8DR Serial Interface

Here is some of what I've learned about the Yaesu VX-8DR radio, it's serial interface and the programming software that is available for it.   One of these days, I'll get my notes off of my private wiki and move them into a public wiki.   I'm posting this to help others until I get around to it.

The VX-8DR has a serial interface available in the proprietary microphone connector that is used for backing up and restoring the radio's configuration and for talking to a GPS.   The backup/restore feature is referred to by Yaesu as cloning, since their purpose is it being used to program one radio and then clone it's configuration to other radios

Build your own cable

A custom cable is needed to use the radio's serial interface for two reasons.  First, the connector is a Yaesu proprietary design that is intended to be water proof.   Second, as is typical with embedded and battery systems the serial interface isn't at RS-232 voltage levels but is at 3.3V. It's possible to build your own cable if you obtain the Yaesu connector.  The Yaesu CT-M11 external speaker/microphone cable provides the proprietary connector on one end and bare leads on the other end.    The pin-out of the cable and the wire color coding is actually in the VX-8DR owner's manual.  Unfortunately the cost of the bare cable is close to what you'd expect to spend on a complete data cable.

If you want to connect the radio to a standard RS-232 port, a level converter is needed to convert the  0 - +3.3 volts used by the radio to the levels used by RS-232 which are supposed to be on the order of -12Vdc to +12Vdc.  I believe the RS-232 spec calls for something between 10-15 volts.  Note the polarity, negative voltage for the low, or zero equivalent, positive voltage for the high, or one equivalent signal.   Note: the peak to peak voltage swing could be 20 to 30 volts.   This isn't very convenient in modern, low voltage, battery powered devices.   The serial ports on laptops (when they still had serial ports) were often closer to -5 V to +5 V.   Level converters such as the max232 have been used for many years to turn RS-232 voltage levels into TTL (0-5V).   There are many level converter schematics that have been published.  They can be something as simple as some zener diodes, a switching transistor and some resistors, or can use modern versions of the max232 like the max3232, which has a significantly reduced parts count.  There is also 3.3V available on the microphone connector which is used for powering the GPS that could be used to power the max3232.

To connect to a computer via USB as a serial device, an FTDI USB to serial bridge can be used directly without a level converter.  FTDI makes a number of cables that can be connected directly.  If you want to limit the number of FTDI cables you need to buy, the FTDI TTL-232R-3V3 provides a 6 pin header connector. I have one of these for connecting to XBees, the Adafruit Boardurino, etc. The 6 pin header connector is found on many of the less expensive Arduino clones that don't have their own FTDI USB->serial chip on board.   This can also be useful to have for talking to the 3.3V serial console of many embedded sysstems like the Linksys WRT54g wireless router.   Note: while this 6 pin header connector has become a little bit of a defacto standard, it has it's drawbacks.  First, it's not a polarized connector so you need to be careful not to plug it in backwards.  Second, it doesn't contain a full set of control signals, just RTS & CTS.   If you need DTR you are out of luck with this cable.

VX-8 Connection Pinout


Pin No.CT-M11 Wire ColorVX-8 Description
1OrangeMicrophone and Push to talk
2Gray+3.3Vdc
3BrownSpeaker OUT
4GreenGPS TXD (CONTROL)
5BlueGPS RXD (NMEA)
6RedGround
7BlackInternal speaker disable


More Details:

Buy a USB data cable

RT Systems

To just buy a cable, RT Systems sells one with their VX-8DR programming software, ADSM-VX8. The cable has an FTDI chip in it. However, they have changed the USB Vendor and Product ID (VID & PID). Since the IDs are different the operating system won't recognize the FTDI chip and assign the common FTDI virtual serial port driver. In order words, under windows it won't show up as a COM port. To use that cable with your own software requires either using the FTDI direct I/O library or tricking the OS into mapping that VID/PID into the FTDI serial driver. I'll post the instructions for the later under Linux in a separate entry.   It should also be possible to use the FTDI utilities to change the settings on the chip and change the VID/PID back to the FTDI serial defaults.  However, the problem is the RT Systems software will only work with their cable.  This is one of my primary reasons for recommending G4HFQ's FTBVX8 software over RT Systems ADMS-VX8.   (Note: I'm sure not supporting home made cables makes RT Systems life a lot easier, but given the market, hams are all about DIY.)

Radio Arena

In the UK, Radio Arena makes an alternative cable that also has the audio connections for doing data modes with your computer via the sound card.  This uses your sound card as a modem and doesn't use the VX-8's built-in TNC.   It has the isolation transformers on the audio lines that should help keep noise from crossing over between the computer and the radio.

One reservation I have about this cable is the use of the Prolific USB serial bridge.   Early on there were some stability / reliability problems with the Prolific chips.  Many of the devices I came across recommended only using FTDI because they were very reliable and stable.  FTDI is a staple of embedded systems and microcontroller work. The bad reputation that the Prolific chip and/or it's drivers had may be in the past.  FTDI serial bridge chips are not inexpensive.  I've paid the premium for FTDI to give me the least amount of headaches.  Still given they sell this cable for 25 GBP, or currently $37.50 USD, it's attractively priced.  The Yaesu CT-M11 cable is approximately $25 USB by itself.

Ebay

There are various sellers of VX-8 data cables on Ebay. Most of which are selling cables made in China using the Prolific chip. The pricing to me doesn't seem to be that much of a bargain.  There still seem to be a lot of links to Prolific's site in Taiwan to get the latest drivers.

I hope this collected info helps someone else.  It sure would be nice if there were some good ham wiki resources.