MMDVM_HS/README.md

207 lines
8 KiB
Markdown
Raw Normal View History

2017-07-15 20:16:32 +02:00
# Introduction
2018-02-14 02:23:27 +01:00
This is the source code of ZUMspot/MMDVM_HS, personal hotspot (ADF7021 version of the MMDVM firmware), based on Jonathan G4KLX's [MMDVM](https://github.com/g4klx/MMDVM) software. This firmware supports D-Star, DMR, System Fusion, P25 and NXDN digital modes.
2017-02-02 22:37:59 +01:00
2018-01-21 15:52:35 +01:00
This software is intended to be run on STM32F103 microcontroller. Also, Arduino with 3.3 V I/O (Arduino Due and Zero) and Teensy (3.1, 3.2, 3.5 or 3.6) are supported. You can build this code using Arduino IDE with Roger Clark's [STM32duino](https://github.com/rogerclarkmelbourne/Arduino_STM32/tree/ZUMspot) package, or using command line tools with ARM GCC tools. The preferred method under Windows is using STM32duino, and under Linux or macOS (command line) is using [STM32F10X_Lib](https://github.com/juribeparada/STM32F10X_Lib).
2017-02-02 22:37:59 +01:00
This software is licenced under the GPL v2 and is intended for amateur and educational use only. Use of this software for commercial purposes is strictly forbidden.
2017-07-15 20:16:32 +02:00
2017-07-20 05:41:14 +02:00
# Features
2018-02-14 02:23:27 +01:00
- Supported modes: D-Star, DMR, Yaesu Fusion, P25 Phase 1 and NXDN
2017-07-20 05:41:14 +02:00
- Automatic mode detection (scanning)
2018-02-17 04:11:53 +01:00
- G4KLX software suite: [MMDVMHost](https://github.com/g4klx/MMDVMHost), [ircDDBGateway](https://github.com/dl5di/OpenDV), [YSFGateway](https://github.com/g4klx/YSFClients), [P25Gateway](https://github.com/g4klx/P25Clients), [DMRGateway](https://github.com/g4klx/DMRGateway) and [MMDVMCal](https://github.com/g4klx/MMDVMCal),
2017-07-20 05:41:14 +02:00
- Bands: 144, 220, 430 and 900 MHz (VHF requires external inductor)
- Status LEDs (PTT, COR and digital modes)
- Serial repeater port for Nextion displays
- Support for native USB port in STM32F103 CPU
2017-07-23 03:10:23 +02:00
- RSSI support
2017-12-27 19:00:33 +01:00
- CW ID support
2017-10-29 04:11:58 +01:00
- Full duplex support with two ADF7021
2017-07-20 05:41:14 +02:00
2017-07-19 07:04:37 +02:00
# Important notes
The ADF7021 (or RF7021SE module) must operate with a 14.7456 MHz TCXO and with at least 2 ppm of frequency stability. You could use also 12.2880 MHz TCXO, but this frequency configuration has less testing. Any other TCXO frequency is not supported.
2018-02-17 04:11:53 +01:00
Please set TXLevel=50 in MMDVM.ini to configure default deviation levels for all modes. You could change this value and other TXLevel paramenters to change deviation levels. Use [MMDVMCal](https://github.com/g4klx/MMDVMCal) to check DMR deviation level and TX frequency offset with calibrated test equipment.
2017-07-20 05:41:14 +02:00
The jumper wire to CLKOUT in RF7021SE module is not longer required for lastest MMDVM_HS firmware. But CE pin connection of ADF7021 is required for proper operation of ZUMspot.
2017-11-13 02:22:59 +01:00
Be aware that some Blue Pill STM32F103 board are defectives. If you have trouble with USB, please check this [link](http://wiki.stm32duino.com/index.php?title=Blue_Pill).
2017-07-20 05:41:14 +02:00
2017-08-20 19:54:46 +02:00
VHF (144-148 MHz) support for ZUMSpot is added by an external 18 nH inductor between L1 and L2 pins of ADF7021. This will enable dual band (VHF/UHF) operation.
2017-07-20 05:41:14 +02:00
2017-12-26 21:49:58 +01:00
Dual ADF7021 for full duplex operation (#define DUPLEX in Config.h) will work only with a big RX/TX frequency separation (5 MHz or more in UHF band for example) and proper antenna filtering. At the moment #define LIBRE_KIT_ADF7021 (Config.h) with STM32F103 platform is supported. Please see [BUILD.md](BUILD.md) for pinout details.
2017-07-23 03:10:23 +02:00
2018-02-14 02:23:27 +01:00
If you can't decode any 4FSK modulation (DMR, YSF, P25 or NXDN) with your ZUMspot, the common solution is to adjust RX frequency offset (RXOffset) in your MMDVM.ini file. Please try with steps of +-100 Hz until you get low BER. If you don't have test equipment, the only procedure is trial and error. In some cases TXOffset adjustment is also required for proper radio decoding. If you have test equipment, enable TEST_TX feature (see "Hidden functions" in [BUILD.md](BUILD.md) document).
2017-07-19 07:04:37 +02:00
2017-07-15 20:16:32 +02:00
# Quick start
2017-11-13 02:15:02 +01:00
Please see [BUILD.md](BUILD.md) for more details, and also [MMDVM](https://groups.yahoo.com/neo/groups/mmdvm/info) Yahoo Groups. You also can check at MMDVM_HS/scripts folder for some automatic tasks.
2017-07-15 20:16:32 +02:00
2017-07-29 18:24:58 +02:00
## Binary firmware installation
2017-11-13 02:22:59 +01:00
Please check the latest firmware [here](https://github.com/juribeparada/MMDVM_HS/releases).
2017-07-29 18:24:58 +02:00
### Windows
2017-11-13 02:22:59 +01:00
Download the ZUMspotFW firmware upgrade utility (ZUMspotFW_setup.exe) from the [releases section](https://github.com/juribeparada/MMDVM_HS/releases/download/v1.0.2/ZUMSpotFW_setup.exe).
2017-11-13 02:26:01 +01:00
This utility includes firmwares binaries and USB drivers for Windows 7/8/10. If you have problems with the installer, you can download [ZUMspotFW.zip](https://github.com/juribeparada/MMDVM_HS/releases/download/v1.0.2/ZUMspotFW.zip) for a manual installation.
2017-07-29 18:24:58 +02:00
### Linux or macOS
2017-10-29 04:11:58 +01:00
Download the script (*.sh) that matches with your ZUMspot/MMDVM_HS board:
2017-07-29 18:24:58 +02:00
- install_fw_rpi.sh: only for ZUMspot RPi board
- install_fw_hshat.sh: only for MMDVM_HS_Hat board
2018-01-28 00:18:00 +01:00
- install_fw_nanohs.sh: only for Nano hotSPOT board
2017-10-29 04:11:58 +01:00
- install_fw_librekit.sh: only for ZUMspot Libre Kit board or generic MMDVM_HS board
2017-07-29 18:24:58 +02:00
- install_fw_usb.sh: only for ZUMspot USB dongle
2017-10-29 04:11:58 +01:00
- install_fw_duplex.sh: only for MMDVM_HS with dual ADF7021
2017-07-29 18:24:58 +02:00
2017-10-30 01:28:57 +01:00
For example, download the ZUMspot RPi upgrade script:
cd ~
curl -OL https://raw.github.com/juribeparada/MMDVM_HS/master/scripts/install_fw_rpi.sh
make the script executable:
2017-07-29 18:24:58 +02:00
chmod +x install_fw_rpi.sh
stop your MMDVMHost process and run (you will need the root password):
./install_fw_rpi.sh
and wait to complete the upgrading process.
## Build from the sources
You could check at MMDVM_HS/configs for common Config.h examples, using different ZUMspot boards.
### MMDVM_HS_Hat
2017-11-13 02:22:59 +01:00
Please visit Mathis Schmieder GitHub [here](https://github.com/mathisschmieder/MMDVM_HS_Hat/blob/master/README.md) for detailed instructions.
2017-07-29 18:24:58 +02:00
### ZUMspot Libre Kit (under Linux Raspbian)
2017-07-15 20:16:32 +02:00
2017-11-04 21:30:40 +01:00
If you are using Pi-Star, expand filesystem (if you haven't done before):
sudo pistar-expand
sudo reboot
Enable RW filesystem if you are using Pi-Star:
rpi-rw
2017-07-15 20:16:32 +02:00
Install the necessary software tools:
sudo apt-get update
sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi libstdc++-arm-none-eabi-newlib libnewlib-arm-none-eabi
Download the sources:
cd ~
git clone https://github.com/juribeparada/MMDVM_HS
cd MMDVM_HS/
git clone https://github.com/juribeparada/STM32F10X_Lib
Build the firmware with USB bootloader support (the default Config.h is OK for Libre Kit):
make bl
2017-11-04 21:30:40 +01:00
If you are using Pi-Star, stop services:
sudo pistar-watchdog.service stop
sudo systemctl stop mmdvmhost.timer
sudo systemctl stop mmdvmhost.service
2017-07-15 21:20:45 +02:00
Upload the firmware to ZUMspot Libre Kit using the USB port (your Libre Kit has the bootloader already installed):
2017-07-15 20:16:32 +02:00
sudo make dfu devser=/dev/ttyACM0
2017-07-29 18:24:58 +02:00
### ZUMspot RPi
2017-07-15 20:16:32 +02:00
2017-07-29 18:24:58 +02:00
#### Enable serial port in Raspberry Pi 3 or Pi Zero W
2017-07-15 20:16:32 +02:00
This this necessary only if you are installing a fresh copy of Raspbian OS.
Edit /boot/cmdline.txt:
sudo nano /boot/cmdline.txt
(remove the text: console=serial0,115200)
Disable services:
sudo systemctl disable serial-getty@ttyAMA0.service
sudo systemctl disable bluetooth.service
Edit /boot/config.txt
sudo nano /boot/config.txt
and add the following lines at the end of /boot/config.txt:
enable_uart=1
dtoverlay=pi3-disable-bt
Reboot your RPi:
sudo reboot
2017-12-28 13:25:15 +01:00
#### Build the firmware and upload to ZUMspot RPi
2017-07-15 20:16:32 +02:00
2017-11-04 21:30:40 +01:00
If you are using Pi-Star, expand filesystem (if you haven't done before):
sudo pistar-expand
sudo reboot
Enable RW filesystem if you are using Pi-Star:
rpi-rw
2017-07-15 20:16:32 +02:00
Install the necessary software tools:
sudo apt-get update
sudo apt-get install gcc-arm-none-eabi gdb-arm-none-eabi libstdc++-arm-none-eabi-newlib libnewlib-arm-none-eabi
cd ~
git clone https://git.code.sf.net/p/stm32flash/code stm32flash
cd stm32flash
make
sudo make install
Download the firmware sources:
cd ~
git clone https://github.com/juribeparada/MMDVM_HS
cd MMDVM_HS/
git clone https://github.com/juribeparada/STM32F10X_Lib
Edit Config.h
nano Config.h
and enable:
2017-12-26 21:49:58 +01:00
#define ZUMSPOT_ADF7021
2017-07-15 20:16:32 +02:00
#define ENABLE_ADF7021
#define ADF7021_14_7456
#define STM32_USART1_HOST
#define ENABLE_SCAN_MODE
Build the firmware:
make
2017-11-04 21:30:40 +01:00
If you are using Pi-Star, stop services:
sudo pistar-watchdog.service stop
sudo systemctl stop mmdvmhost.timer
sudo systemctl stop mmdvmhost.service
2017-07-15 21:20:45 +02:00
Upload the firmware to ZUMspot RPi board:
2017-07-15 20:16:32 +02:00
sudo make zumspot-pi