All Projects → OK2MOP → MD1702-tools

OK2MOP / MD1702-tools

Licence: other
Tools to work with firmware and SPI flash data of DM-1702 and DM-X radios

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to MD1702-tools

DfuBootloader
STM32 USB device bootloader using DFU class interface
Stars: ✭ 79 (+393.75%)
Mutual labels:  firmware-updater, dfu
PIC16F1-USB-DFU-Bootloader
DFU protocol variant of Matt Sarnoff's PIC16F1-USB-Bootloader
Stars: ✭ 39 (+143.75%)
Mutual labels:  dfu
codeplug
codeplug decoder and builder for Motorola radios
Stars: ✭ 35 (+118.75%)
Mutual labels:  dmr
go-dmr
Digital Mobile Radio
Stars: ✭ 53 (+231.25%)
Mutual labels:  dmr
IOS-DFU-Library
OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
Stars: ✭ 400 (+2400%)
Mutual labels:  dfu
OtterPill
stm32f072 dev board with arduino nano alike pinout
Stars: ✭ 127 (+693.75%)
Mutual labels:  dfu
android-stm32-dfu-programmer
Android application programmer for STM32 microcontrollers using the DFU protocol
Stars: ✭ 77 (+381.25%)
Mutual labels:  dfu
usb stack
Tiny and portable USB device/host stack for embedded system with USB IP
Stars: ✭ 175 (+993.75%)
Mutual labels:  dfu
qdmr
A GUI application for configuring and programming cheap DMR radios under Linux and MacOS X.
Stars: ✭ 72 (+350%)
Mutual labels:  dmr

MD1702 USB Tools

by Pavel Moravec, OK2MOP

Introduction

This repository contains tools for working with the MD-1702 based radios over USB. It is based on the reverse-engineered communication protocol and can be used with Baofeng DM-1702 (V02 and L02 firmware branch) and DM-X radios (theoretically also with DM-1703 and other radios sharing this codebase).

Please do NOT use it to write data to a device with L05 firmware and MD1706-V2 version of the bootloader, as it is not tested and it was reported to brick the device in the issues. (The tool is working with L05.000.05 firmware itself on older MD1702-V1/V2 devices).

Please do not remove safety checks in the code concerning the device/bootloader version, they are there as a protection against bricking the radio.

I have tried to make the tool similar to popular md380-dfu tool by Travis Goodspeed, KK4VCZ. The stm32-dfu from his repository could be used if somebody wants to switch the CPU to internal STM32 bootloader mode, but it is not necessary.

As the radio is detected by Linux incorrectly as an USB lp port, the driver must be removed for the device.

Client Tools:

  • md1702-dfu reads and writes MD1702 codeplugs, firmware and time. Run it without an argument to show help.
  • md1702-codeplug allows you to import contacts to CPS and split CPS into several CSV files which can be merged together with the CPS later to allow easier batch editing
  • md1702-gfx allows you to convert the boot logo graphics into an image editable in external tool and back, and to show the boot logo image extracted from the radio.
  • md1702-rec allows you to extract RAW DMR audio files, which can be decoded using a modified dsd code found in my repository
  • linux_remove_usblp.sh calls script udev/scripts/unbind_bao1702.sh with sudo.

Using md1702-rec

Clone and build patched dsd from https://github.com/OK2MOP/dsd/ to be used with the recordings

md1702-rec readrec prefix # you may also add start date, e.g. "2019-01-02 22:00:11"
for i in prefix*.dmr ; do path_to_built_dsd/dsd -w $i.wav -r $i ; done

Requirements:

Optionally, if you want to specify date on command line in other formats

If you wish to manipulate the Boot logo graphics, you will also need

This project should work across Linux, and should work on Mac OS, and Windows, but has not been tested on them platforms. A separate client,

Additional steps for Linux-based installations with udev rules

# Clone the repository to MD1702-tools
cd MD1702-tools
sudo cp -r udev/* /etc/udev/

(The 59-baofeng-1702.rules and unbind_bao1702.sh files are copied to /etc/udev/ in order to allow users to access the radio over USB without having to use sudo or root permissions and remove the driver. User should be a member of dialout group. If it is not, you may use sudo usermod -a -G dialout $USER to add your user, then log in and out).

If you do not wish to modify the udev, and you do not use any other usblp device, you can prefix the md1702-dfu each time with sudo modprobe -r usblp;

Flash updated firmware for Linux-based installations

To update firmware, an unencrypted firmware image is required.

Turn on radio in DFU mode to begin firmware update with USB cable:

  • insert cable into USB.
  • connect cable to DM-X/DM-1702.
  • power-on the device by turning volume knob, while holding '#' button. The device screen will remain black and it will stay in firmware update mode.
  • run the md1702_dfu.py in upgrade mode supplying the firmware.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].