Category Archives: Amateur Radio

Setting up Tytera TYT-MD380 or MD390 GPS on Mac OS

In this article I share how you can upgrade the firmware and also upload a codeplug to the Tytera MD380/MD390 on Mac OS (or Linux) with VirtualBox.

This guide should work with the following radios with or without GPS:

  • Tytera/TYT MD380
  • Tytera/TYT MD390
  • Retevis RT3
  • Retevis RT8

Although the focus is on Mac OS, thanks to VirtualBox it should also work on Linux. Please note that this guide is based on my personal tests with the TYT MD390 GPS and comes with absolutely no warranty.

The challenge: Tytera data cable and USB driver problems

I recently received my Tytera MD390 in the mail straight from Shenzhen, China. I am using a Macbook with Mac OS and that makes it challenging to get Tyteras programming software CPS to run, which is a Windows application.

At first I thought I could simply install Windows 10 on a virtual machine on my Macbook and just upgrade the firmware and upload the codeplug from there. However, I never got it to work.

Therefore had to find a workaround solution:

  1. We will be using Tytera’s original CPS software to program the codeplug and setup the channels, contacts and all settings for the radio.
  2. Then we will upload this codeplug via a Linux virtual machine.
  3. In addition, we will upgrade the firmware of the MD380 or MD390 GPS.

Do you have the right USB cable?

When I first wrote in several web forums telling about my problems with the data cable and USB drivers, I got a reply that my Tytera MD 390 probably came with the wrong cable. Reportedly, a batch of the radios had been shipped with the wrong cable a month earlier.

To find out whether you got the right cable do the following:

  1. Unplug the cable from the radio (i.e. the radio is NOT connected to the cable) and plug the USB cable into your Macbook.
  2. Go to Applications -> Utilities -> System Information. Under “Hardware” find the “USB” menu. If you now see any USB device related to your radio, you have the wrong cable.

Why is that so? The right cable is a purely passive cable, the logic is in the radio. That means when the radio is not connected, it should not show up in the hardware list (or device manager on Windows). You have the right cable when a USB device shows up and the radio is switched on.

In my case, I had the right cable. When I turned the radio on, it showed up as “AnyRoad Technology Digital Radio in USB mode” in the hardware list.

I installed Windows 10 on a virtual machine, installed the driver from Tytera and the device showed up as “STM device in DFU mode” in the Windows device manager. I also installed Tyteras CPS application.

Still, I could not get it to work. The Tytera CPS application would not “read” or “write” from the radio. I tried many different things, uninstalled and reinstalled the driver, but could not get it to work. If you have any idea, please comment on this post.

Therefore I needed to find a workaround: I created my codeplug on the Windows virtual machine with the original Tytera software. Then I would upload the codeplug via Linux (also on a virtual machine) to my Tytera MD390 GPS.

Here’s the step-by-step guide:

Part 1: Upgrading the TYT MD380 / MD390 firmware

In this part, we will upgrade the firmware with a customized version specially made for amateur radio use. This firmware is called md380tools and has, compared to the original TYT firmware, some additional features that are handy for ham radio use.

The md380 tools run natively on Linux, which can be a bit tricky and time consuming to set up. That’s why Warren Merkel, KD4Z, created a ready-made VirtualBox image called md380tools-vm.

To upgrade the firmware, follow these steps:

  1. Follow the instructions for md380tools-vm that is given in the PDF up to and including “Step 5: Import the virtual appliance image file“. Do not start with step 6 just yet.
    The PDF with installation instructions can be found on the projects website. Scroll down to after the file list, the PDF is the second link: 
  2. Connect your radio to the Macbook and switch it on.
  3. After you installed Oracle VirtualBox and imported the appliance with the md380tools-vm, right click on the “tyt” image and select “Settings”. In the settings dialogue, go to “Ports” and the “USB”. In the lower part, click on the USB stick icon with the “+”-sign. Your radio should now show up as “Digital Radio in USB mode” (after you upgraded the firmware it will show up as “Patched MD380” like on the screenshot below).Select it, it will be added to the USB filter list. This filter list makes sure your USB device gets passed on to the virtual machine. Click “ok” to exit the dialogue.
  4. Now you have to put your radio into a special mode so that the firmware upgrade can be written. To do this, switch it off first. Wait 5 seconds. When you switch it on, hold the PTT-button and the upper button pressed. The radio will boot up, but you will only see the LED light flashing red and green. Your radio is now ready to get the new firmware.
  5. Start the “tyt” virtual machine.
  6. Follow now the instructions from “Step 6 – Start the VM” and “Step 7: Verify networking is working” from the PDF.
  7. Once all looks good, we can start the flashing of the firmware. Depending on your type of radio (it comes either with or without GPS) you have to use different commands.
    For the TYT MD390 GPS (with GPS) do the following (for other models see the PDF):
  8. Enter “glv” and press enter. That will download and compile the latest version of the firmware. Check whether everything runs smoothly.
  9. Once it is finished, run “flashgps“. This command will actually write the firmware onto your radio. Ensure that you don’t touch you radio during this process. After about a minute or two, it should be finished. Wait until it is completed, and the turn your radio off.
  10. Wait 5 seconds. Turn your radio on again. This time, it should boot with the new firmware and should start into normal mode. Now run “flashdb” which will write an updated user database onto your radio. This process takes about 3 minutes. After it is completed, switch off your radio and you can follow the instructions under “Fun Times” in the PDF if you like (not necessary though).

Now part 1 is finished, your data cable is working and you have upgraded the firmware on your Tytera radio! The tool should also be able to write the original firmware back if needed, however this I haven’t tried yet)

Part 2: Setting up a Windows image on VirtualBox

In the second part, we will set up a Windows installation in VirtualBox and install Tytera’s CPS software. With this software, we will be able configure the MD380 / MD390 and set up channels and contacts.

Prerequisite: You need a Windows installation image in ISO format that you can get from Microsoft and a valid product key.

I will only describe the most important steps, let me know if something is unclear.

  1. Start VirtualBox, click “New“. Enter a name, like “Windows 10“, select the right type and version of Windows and click “continue“.
  2. Adjust the RAM memory, 4 GB would be good if you have it. Click “continue“.
  3. Select “Create a virtual hard disk now“. Click “continue“.
  4. Select “VDI“, click “continue“. Then select “Dynamically allocated“. Select a file location. Then click “create“.
  5. Now, the new virtual machine shows up in the list. Right click on it, and select “Settings“. Go to “Storage” and click on the CD-ROM icon that says “empty” on the left side. Then, on the right side, click on the CD icon and select “Choose virtual optical disk file“. Now select a Windows installation ISO file that you can get from Microsoft. Then click “ok“.
  6. In the main window, select your Windows image and click “start“. Follow the regular Windows installation process. 
  7. Once Windows is installed, and running in the VirtualBox window, click in the top menu (on Mac OS) on “Devices” and select “Insert Guest Additions CD image“. Then install the guest additions on Windows. They will improve the graphics and overall functioning of your system. Windows should be working normally now.
  8. Download and install the Tytera CPS software from the download section of the Tytera website. Make sure you download the right version for your model (with or without GPS). There are also other websites that offer the Tytera software to download.

You should now have a working Windows image running on VirtualBox with the Tytera software installed.

Part 3: Creating and uploading a codeplug to your Tytera TYT MD380 / MD 390

Now you can open Tytera’s CPS software on the Windows image and create your own codeplug or use an existing one as a basis. Here is a good guide for this. Skip down to “Program in DMR ID” on the page.

Once your codeplug is ready, we can start to upload it to the radio. In my case, it did not work via Windows. (Though, you can try to connect your radio to the Windows virtual machine. If it works for you, please let me know.)

As a workaround, we can upload the codeplug via the Linux image used in Part 1. Here are the steps:

  1. Save the codeplug on a USB stick that is formatted with FAT32 and call it codeplug1.rdt Once done, remove the USB stick.
  2. Shutdown the Windows virtual machine.
  3. Start the tyt virtual machine with the md380 tools on it and wait until it booted up.
  4. Plug in the USB stick. You should now get an “error message” on Linux, which is actually good because it tells you the name of the USB stick in Linux.
    It says something like “[sdb] No caching mode page found.” (see screenshot below)
    sdb is the location of the USB stick, memorize it for a later step.
    (If your USB stick does not show up, click on the USB icon beneath the window and select the USB stick. Alternatively, set up a filter for the USB stick similar to the filter for the radio in part 1).
  5. Switch to root. Root is the administrator under Linux. Do this by entering “su“. Enter the password which is “tyt“.
  6. Now mount the USB stick, which will make it accessible on Linux. First create a directory for the USB stick. Run “mkdir /media/usb“. Then run the following command: “mount -t vfat /dev/sdb /media/usb“. Use the sdb from step 4. It could also be sdc or sdd and so on.
  7. Now the contents of the USB stick are located under /media/usb and you can copy the codeplug to the home folder. Do this by running “cp /media/usb/codeplug1.rdt /home/tyt“.
  8. Switch to the md380tools directory by running “cd /home/tyt/md380tools“.
  9. Run “umount /media/usb” to unmount the USB stick. Remove it afterwards.
  10. Now, connect the radio to the virtual machine and switch it on in normal mode. Check by clicking on the USB icon whether the radio has the “checkmark”. That means it can be seen by the virtual machine.
  11. Now we write the codeplug on to the radio. That is done by the command “./md380-dfu write /home/tyt/codeplug1.rdt“. After a few seconds, the codeplug is on your radio. Switch off the radio. Done!

Wrapping up

You should now have a working radio with the latest custom firmware and the codeplug of your choice. If you make changes to your codeplug, just rerun the steps from part 3.

If you need help, comment on the post below or check the following resources:

Good luck and 73!

Electromagnetic pollution: Lessons from the radio amateurs…

My antenna in Germany

Recently, a study came out [PDF] that looked at the short-term health effects of electromagnetic radiation on humans (more readable version here). Subjects were exposed in 50 minute-long sessions to transmissions from ordinary GSM-transmitting stations, 3G transmitters (i.e. UMTS) and sometimes they were only told that a transmission would take place although the transmitter was switched off.

The individuals who classified themselves as being “sensitive” towards electromagnetic radiation reported flu-like symptoms and feelings of uneasiness even if the transmitter was switched off.

This reminds me of two stories related to one of my hobbies, Amateur Radio. Once a friend told me that he installed a new wire-antenna at his house, highly visible to his neighbours. On purpose, he did not connect the antenna to his transceiver and let the cable hang out of his window. He did not use the antenna for about three weeks, when during that time the first reports of feelings of “uneasiness” by his neighbours came it. After he told them that the antenna was in fact not operating yet, the critiques went silent.

I myself had some minor feedback about my antenna, when somebody complained that she could “feel the antenna radiating” and asked whether it was not a dangerous thing to use. Here as well, I had not used the antenna for weeks.

Even more funny are some mail-order catalogues, where one can buy next to products shielding you from the “evil” mobile phone radiation, other radiating products that are said to be “good” and shall increase your wellness, remove headaches and so on. Maybe I should also start selling “wellness radiation sessions”…


QSL card of SK0TM

Yesterday, I visited the Technical Museum in Stockholm. Next to the exhibitions, the museum has also its own amateur radio station, callsign SK0TM.

So, of course, I visited the station, entered the room and said like “Hello, I’m DL4CB”. Immediately, Bengt (SM0YX) smiled and noted my callsign, stood up from his chair and said “Here, please sit down and use the station!”. So did I.

I used their ICOM 756 transceiver, which was connected to a 5-element Yagi antenna. I made two contacts, the first one with a German station in Spain, where the temperatures were 30 degrees higher than here in Sweden. The second OM I talked to was in Rome in Italy. The audio quality was excellent, I would like to have such a Yagi antenna (and the space to put it up), too.

After one and a half hour, I left the station with 2 QSL cards (see picture) as a souvenir. Actually, we wanted to make a radio contact when I left the museum (I had brought my 2m/70cm handheld), but unfortunately that didn’t work. We were not sure how to properly connect the 2m antenna to the transceiver. Bengt was only familiar with the shortwave station. At least the people at the busstop looked at me as if I was an alien when I tried to call him from outside :-) .

Emergeny Net Operations

The Salvation Army Team Emergency Radio Network (SATERN), that is currently coordinating emergency communications in the regions hit by hurricane Katrina, has put a guide online how to handle emergency operations on the radio. It is quite interesting because there are major differnces between ordinary (amateur) radio traffic and the emergency traffic. Especially when the load of health and welfare traffic increases a frequency can quickly become too crowded. In this case the guide proposes to open next to the main Command and Control net an additional “tactical” net that can handle some of the additional stations.

On Air Again

GAP Eagle DX

For the shortwave bands, I am using the GAP Eagle DX antenna. Its a vertical multibander for the 40, 20, 17, 15, 12 and 10 meter bands. Its about 6.5 meters long (21 ft) and for a shortwave antenna relatively small, although my neighbours may think differently about that.

Nevertheless, a few month ago, the cable clamp, which held the radials of the counterpoise together, burst and I had to find a new one. That was a bit tricky, since all parts of the antenna are from the US and therefore have the US measures. So most of the clamps I found in DIY stores were either too short in length or too thick. In the end I found a cable clamp, which was originally meant for a hosepipe. Today I mounted it together with the radials and the antenna is working again.

Next to that, I tried out my new tuner, the MFJ-941 E. I got it used for a reasonable price. To test for the limits of the box, I tried to match a 1 meter long aluminium pipe for 40 meters and it worked! Ok, I did not hear anything on the frequency, but at least the SWR was all right.

After that, I attached my “frying pan” antenna to it, which consists of a pan and a 1.75 meter long radiator. I built it using the instructions by DL7PE (sorry, this website is only in German so far). Beneath the pan is a pancake coil, specially designed for 14 MHz. Without matching, it had a SWR of 2:1, with the tuner, it moved to 1:1. I could hear a lot of stations, a bit weaker in comparison to the GAP Eagle, but when considering the small size of this pan antenna it performs pretty good actually. However, its really difficult to tune without a tuner, although DL7PE says that it should work without one.

“Prototypical Nerds”

Wired features an article about amateur radio (also called ham radio), which is also my hobby.

Hams are characterized as being “the planet’s prototypical nerds”. Next to that, the article mentions the Hamvention in Dayton. In Europe, a similar fair is the “Ham Radio” in Friedrichshafen, Germany. I’ve been there two or three times already and its really nice to catch up with the latest developments and experience the so-called ham spirit.

Antennas go undercover

Deutsche Welle today reports (The Register has it also) that a number of companies have developed undercover antennas, mainly for the mobile phone sector. Those range from antennas looking like trees to an antenna mast disguised as a crucifix.

This story reminds me of an article in one of the last CQ DLs (the German amateur radio club magazine), where a HAM reported that since he attached a small (Danish) flag on top of his antenna, there were suddenly no more complaints about “strange” TV and radio interferences. Everybody is now seeing his antenna as an ordinary flagstaff and all the problems are gone.

UMTS monitoring vehicle

Today, I spotted an interesting looking car at a McDonald’s restaurant near Neuwied. It was an ordinary looking VW Sharan, but what caught my attention were the 7 antennas on its roof. I first thought that these were normal GSM antennas and I was wondering why you would need 7 of them, but lying on the front passenger’s seat were maps of the Neuwied/Koblenz area that showed measurements of the UMTS coverage. So these antennas were UMTS antennas (6 of them), the last one was an additional GPS antenna. Also on the front passenger’s seat was a flatscreen monitor, unfortunately, turned off. In the back of the car were all kinds of technical things like telephone equipment in 19″ racks. I would have liked to talk to the driver, however, I could not see him. Maybe he was enjoying his (or her?) meal.

“@”-sign finally in morse code alphabet

The International Telecommuication Union finally introduced the “@”-sign in the morse code alphabet. The “@” will be then .–.-. from May on. The morse code itself celebrates its 160 year anniversary these days.

But is telegraphy still used today? Yes, in some countries you still need to take a morse code exam to get an amateur radio licence. However, many countries have abolished this requirement. I also had to take this exam when I did my amateur radio licence exam, but only with a reduced speed of only 25 letters per minute. The speed in real life is much higher than this and starts with 60-80 letters per minute.

If you want to have a QSO (for the non-HAMS, this is a conversation via the radio) in such a high speed there are also several computer programmes available that you can connect to your transceiver. This website links to several of these programmes.