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!

How to install WordPress on a CentOS 7 / RHEL 7 server

This how-to explains the necessary steps to install WordPress, the popular blogging platform, on your own CentOS 7 server. Hosting WordPress yourself can have several advantages: It gives you full control over your setup, your learn something and in my case it also led to significant improvements in speed and responsiveness of my page.

When I tried to install WordPress on a CentOS 7 server myself, I discovered that many of the how-tos available on the Internet were either outdated or led to configuration issues. Some tutorials were also outright insecure. Therefore I decided to write a blog entry that sums it all up and leads to a reasonably secure and also performant web server for WordPress.

Overview: Install and configure Nginx, PHP, MySQL/MariaDB and SELinux on CentOS 7 to run WordPress

This guide will cover the following topics, which is basically setting up a LEMP-stack (=Linux, Nginx, MySQL, PHP) plus WordPress. In the end some thoughts on performance tuning and security will be given.

Overview and links to the different parts of this blog entry:
How to install Nginx, the webserver
How to install MariaDB, a MySQL database
How to create a database in MySQL/MariaDB for WordPress
How to install PHP
How to configure Nginx for WordPress
How to install WordPress
How to configure SELinux to make it work with WordPress
How to install phpMyAdmin and secure it to manage the database
Performance and security tweaks for your setup

This guide is for CentOS 7, but it should also work wit Redhat Enterprise Linux RHEL 7. In addition, Fedora Linux should be similar as well.

In the future I will also include how to set up SSL for your server. That being said, this guide comes with no warranty. Feel free to comment below if you have feedback.


The prerequisites are that you have a server with CentOS 7 installed. The initial server setup is explained very well in this guide.

Installation of NGINX

To install Nginx, you have to activate the Centos 7 EPEL repository:
sudo yum install epel-release

Continue reading

Ubuntu 12.10 on the Asus F201E / X201E

Since I am currently over-saturated with Apple products (MacBook, iPad, iPhone, iPod – I have them all) or Windows products (at work), I was looking for a portable notebook to escape the Apple/Windows universe every now and then to play a bit with Linux.

Requirements were that the notebook had to be light and very cheap – the latter characteristic is also good for traveling because you don’t need to worry too much that the notebook gets stolen. The choice fell on the Asus F201E that is called X201E ( in the US.

Choppy YouTube videos with shipped Ubuntu
It came preinstalled with Ubuntu 12.04 64-Bit, however the performance of fullscreen HD Flash videos was very poor. Videos on websites like YouTube were displayed very choppy and sometimes also with a lag in the audio track. Therefore, I tried to install newer graphics drivers, tried several other tweaks and a few other Linux distributions – with no real improvement.

The Asus F201E running Ubuntu 12.10.

The Asus F201E running Ubuntu 12.10.

Fresh install of Ubuntu 12.10
Finally, I found out that my favorite distribution for better performance (less choppy Flash video) and usability for desktop use (installed fonts, installed Flash plugin, drivers, clearness of the user interface) was Ubuntu 12.10. The main trick here was to take the 32-Bit version and NOT the 64-Bit version although the processor supports it.

I used Linux Live USB creator on Windows to put the downloaded iso file from Ubuntu (link) onto a USB stick and make it bootable. I booted from the stick using the legacy BIOS option by pressing ESC during startup and then selecting the USB stick in the menu and not the UEFI boot option.

The UEFI install caused a lot of trouble and did not work, also with the other Linux distributions. To save time, I therefore opted for the good old BIOS option that seemed to work. I let Ubuntu partition the entire 500 GB harddrive. The installation went fine, only a few things had to be changed to make it work as before:

Minor tweaks necessary
For a few issues, some tweaks were necessary to fix them.

Brightness keys
After the installation, the keys for the brightness were not working. This could be fixed by editing the /etc/default/grub file and changing the line “GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” to “GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi_osi=”. After running “sudo update-grub” in the terminal and rebooting, the keys were working again.

Network card not working
Besides, the ethernet controller was not recognized and did not work, while Wifi was functioning just fine. This could be fixed my installing the package linux-backports-modules-cw-3.6-quantal-generic. This package will install several other packages (depending on the current kernel used) and after running “modprobe alx” in the terminal as super user, the ethernet card was working also.

Asus software sources
The original Ubuntu that came with the Asus was using two special software sources, those I added again in 12.10. They were “ precise-annan public” and “ precise-annan public (Source Code)”. I don’t really know whether Ubuntu 12.10 is using any of these Asus packages, but for future reference, I just included them in this blog post.

System up and running
After fixing these few issues, Ubuntu 12.10 is running fine. Flash videos play more smoothly and everything seems to work just as intended. Speed-wise, the notebook naturally cannot compete with devices that have faster processors and are more expensive, but with this build quality it is a nice travel companion at the fraction of the price of a MacBook air.

Make Internet calls with a real ISDN phone

Last update: March, 3rd, 2006

What is the advantage?
I didn’t really like that I had to use a headset when I wanted to call someone via the internet. The volumes of the soundcard had to be adjusted to avoid over- or undermodulation. With the way described here, it is possible to use an ordinary ISDN telephone (at Germany’s Ebay you easily get one for 30 EUR) to make phone or internet calls with the help of a computer and a SIP provider. The audio quality is excellent with a DSL connection, there is no noticeable difference compared to a normal phone. The line should be clear however.

Additionally, you save the money for buying a SIP phone which costs about 100 EUR at this moment. Over the internet, you can call each other for free with a “real” phone. Calls to the Germany phone network cost 1.79 euro cent per minute with Sipgate.

This how-to is written especially for Sipgate accounts. However, you can easily adopt it for other SIP providers. You find links to other providers at the end of this document.

Continue reading