From bb0ead1c15434dd4e5b717bdad55f062240e678e Mon Sep 17 00:00:00 2001 From: Andy Date: Fri, 27 Oct 2017 11:41:36 -0300 Subject: [PATCH 1/8] Fix README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 021e714..bda8dfc 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Please check the latest firmware: Download the ZUMspotFW firmware upgrade utility (ZUMspotFW_setup.exe) from the releases section: - https://github.com/juribeparada/MMDVM_HS/releases/download/v1.0.0/ZUMSpotFW_setup.exe + https://github.com/juribeparada/MMDVM_HS/releases/download/v1.0.2/ZUMSpotFW_setup.exe 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 for a manual installation. From f399978733dd003457472d6d638914da992bf04b Mon Sep 17 00:00:00 2001 From: Andy Date: Sat, 28 Oct 2017 12:24:22 -0300 Subject: [PATCH 2/8] Adding link to MMDVM_HS_Hat project in README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index bda8dfc..4bf217d 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,12 @@ and wait to complete the upgrading process. You could check at MMDVM_HS/configs for common Config.h examples, using different ZUMspot boards. +### MMDVM_HS_Hat + +Please check here for detailed instructions: + + https://github.com/mathisschmieder/MMDVM_HS_Hat/blob/master/README.md + ### ZUMspot Libre Kit (under Linux Raspbian) Install the necessary software tools: From 48410990473df0efe757205b4d14357f3196f10d Mon Sep 17 00:00:00 2001 From: Andy Date: Sat, 28 Oct 2017 12:31:23 -0300 Subject: [PATCH 3/8] Adding information for MMDVM_HS_Hat --- BUILD.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/BUILD.md b/BUILD.md index 656038f..b19df73 100644 --- a/BUILD.md +++ b/BUILD.md @@ -7,6 +7,7 @@ This is a detailed guide for building the firmware of MMDVM_HS from the source c - ZUMspot RPi - ZUMspot Libre Kit - ZUMspot USB +- MMDVM_HS_Hat - Makefile options - Config.h options - Pinout definitions @@ -426,6 +427,13 @@ Edit MMDVM.ini according your preferences Execute MMDVMHost: ./MMDVMHost MMDVM.ini + +# MMDVM_HS_Hat + +Please check here for detailed instructions: + + https://github.com/mathisschmieder/MMDVM_HS_Hat/blob/master/README.md + # Makefile options @@ -437,6 +445,8 @@ Execute MMDVMHost: - make zumspot-pi: upload the firmware to a ZUMspot RPi version (using internal RPi serial port) +- make mmdvm_hs_hat: upload the firmware to MMDVM_HS_Hat board (using internal RPi serial port) + - make dfu [devser=/dev/ttyXXX]: upload firmware using USB bootloader. "devser" is optional, and it corresponds to the USB serial port device name. This option permits to perform a reset to enter to booloader mode (DFU). If you don't use "devser", you have to press the reset button @@ -486,6 +496,8 @@ to enable this option if you have one of these products. - #define ADF7021_CARRIER_BOARD: enable this option if you have a ZUMspot Libre Kit (Board with modified RF7021SE and Blue Pill STM32F103). +- #define MMDVM_HS_HAT_REV12: enable this option if you have a MMDVM_HS_Hat board for RPi. + - #define ENABLE_ADF7021: add support for ADF7021 (all boards, enabled by default). - #define DUPLEX: enable duplex mode with dual ADF7021. It is still under development. From c70e7e2fbe5612522ae6d75dc0eb8371fe1c9cb1 Mon Sep 17 00:00:00 2001 From: Andy Date: Sat, 28 Oct 2017 12:37:19 -0300 Subject: [PATCH 4/8] Adding Config.h for MMDVM_HS_Hat --- configs/MMDVM_HS_Hat.h | 64 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 configs/MMDVM_HS_Hat.h diff --git a/configs/MMDVM_HS_Hat.h b/configs/MMDVM_HS_Hat.h new file mode 100644 index 0000000..4f8c6f7 --- /dev/null +++ b/configs/MMDVM_HS_Hat.h @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2017 by Andy Uribe CA6JAU + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#if !defined(CONFIG_H) +#define CONFIG_H + +// Select one board (STM32F103 based boards) +// 1) ZUMspot USB and ZUMspot RPi: +// #define PI_HAT_7021_REV_03 +// 2) ZUMspot Libre Kit or board with modified RF7021SE and Blue Pill STM32F103: +// #define ADF7021_CARRIER_BOARD +// 3) MMDVM_HS_Hat revisions 1.1 and 1.2 (DB9MAT & DF2ET) +#define MMDVM_HS_HAT_REV12 + +// Enable ADF7021 support: +#define ENABLE_ADF7021 + +// Enable full duplex support with dual ADF7021: +// #define DUPLEX + +// TCXO of the ADF7021 +// For 14.7456 MHz: +#define ADF7021_14_7456 +// For 12.2880 MHz: +// #define ADF7021_12_2880 + +// Host communication selection: +#define STM32_USART1_HOST +// #define STM32_USB_HOST + +// Enable mode detection: +#define ENABLE_SCAN_MODE + +// Send RSSI value: +// #define SEND_RSSI_DATA + +// Enable Nextion LCD serial port repeater on USART2 (ZUMspot Libre Kit and ZUMspot RPi): +#define SERIAL_REPEATER + +// Enable Nextion LCD serial port repeater on USART1 (Do not use with STM32_USART1_HOST enabled): +// #define SERIAL_REPEATER_USART1 + +// Enable P25 Wide modulation: +// #define ENABLE_P25_WIDE + +// Disable mode LEDs blink during scan mode: +// #define QUIET_MODE_LEDS + +#endif From 93f6951af3a45792e404c6aaa77cf61f80ee341c Mon Sep 17 00:00:00 2001 From: Andy Date: Sun, 29 Oct 2017 00:06:34 -0300 Subject: [PATCH 5/8] Adding binary fw installation for MMDVM_HS_Hat --- README.md | 1 + scripts/build_fw.sh | 6 +++ scripts/install_fw_hshat.sh | 77 +++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100755 scripts/install_fw_hshat.sh diff --git a/README.md b/README.md index 4bf217d..6e31e10 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ This utility includes firmwares binaries and USB drivers for Windows 7/8/10. If Download the script (*.sh) that matches with your ZUMspot board: - install_fw_rpi.sh: only for ZUMspot RPi board +- install_fw_hshat.sh: only for MMDVM_HS_Hat board - install_fw_librekit.sh: only for ZUMspot Libre Kit board or generic ZUMspot board - install_fw_usb.sh: only for ZUMspot USB dongle - install_fw_duplex.sh: only for ZUMspot with dual ADF7021 diff --git a/scripts/build_fw.sh b/scripts/build_fw.sh index 83e2e49..452c448 100755 --- a/scripts/build_fw.sh +++ b/scripts/build_fw.sh @@ -44,4 +44,10 @@ make bl mv ~/MMDVM_HS/bin/outp.bin ~/MMDVM_HS/bin/zumspot_duplex_fw.bin make clean +# Building MMDVM_HS_Hat +cp ~/MMDVM_HS/configs/MMDVM_HS_Hat.h ~/MMDVM_HS/Config.h +make +mv ~/MMDVM_HS/bin/outp.bin ~/MMDVM_HS/bin/mmdvm_hs_hat_fw.bin +make clean + cp ~/MMDVM_HS/configs/ZUMspot_Libre.h ~/MMDVM_HS/Config.h diff --git a/scripts/install_fw_hshat.sh b/scripts/install_fw_hshat.sh new file mode 100755 index 0000000..4aa8773 --- /dev/null +++ b/scripts/install_fw_hshat.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +# Copyright (C) 2017 by Andy Uribe CA6JAU + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +# Configure latest version +FW_VERSION="v1.0.2" + +# Change USB-serial port name ONLY in macOS +MAC_DEV_USB_SER="/dev/cu.usbmodem1441" + +# Download latest firmware for MMDVM_HS_Hat +curl -OL https://github.com/juribeparada/MMDVM_HS/releases/download/$FW_VERSION/mmdvm_hs_hat_fw.bin + +# Download STM32F10X_Lib (only for binary tools) +if [ ! -d "./STM32F10X_Lib/utils" ]; then + git clone https://github.com/juribeparada/STM32F10X_Lib +fi + +# Configure vars depending on OS +if [ $(uname -s) == "Linux" ]; then + DEV_USB_SER="/dev/ttyACM0" + if [ $(uname -m) == "x86_64" ]; then + echo "Linux 64-bit detected" + DFU_RST="./STM32F10X_Lib/utils/linux64/upload-reset" + DFU_UTIL="./STM32F10X_Lib/utils/linux64/dfu-util" + ST_FLASH="./STM32F10X_Lib/utils/linux64/st-flash" + STM32FLASH="./STM32F10X_Lib/utils/linux64/stm32flash" + elif [ $(uname -m) == "armv7l" ]; then + echo "Raspberry Pi 3 detected" + DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset" + DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util" + ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash" + STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash" + elif [ $(uname -m) == "armv6l" ]; then + echo "Raspberry Pi 2 or Pi Zero W detected" + DFU_RST="./STM32F10X_Lib/utils/rpi32/upload-reset" + DFU_UTIL="./STM32F10X_Lib/utils/rpi32/dfu-util" + ST_FLASH="./STM32F10X_Lib/utils/rpi32/st-flash" + STM32FLASH="./STM32F10X_Lib/utils/rpi32/stm32flash" + else + echo "Linux 32-bit detected" + DFU_RST="./STM32F10X_Lib/utils/linux/upload-reset" + DFU_UTIL="./STM32F10X_Lib/utils/linux/dfu-util" + ST_FLASH="./STM32F10X_Lib/utils/linux/st-flash" + STM32FLASH="./STM32F10X_Lib/utils/linux/stm32flash" + fi +fi + +if [ $(uname -s) == "Darwin" ]; then + echo "macOS detected" + DEV_USB_SER=$MAC_DEV_USB_SER + DFU_RST="./STM32F10X_Lib/utils/macosx/upload-reset" + DFU_UTIL="./STM32F10X_Lib/utils/macosx/dfu-util" + ST_FLASH="./STM32F10X_Lib/utils/macosx/st-flash" + STM32FLASH="./STM32F10X_Lib/utils/macosx/stm32flash" +fi + +# Stop MMDVMHost process to free serial port +sudo killall MMDVMHost >/dev/null 2>&1 + +# Upload the firmware +eval sudo $STM32FLASH -v -w mmdvm_hs_hat_fw.bin -g 0x0 -R -i 20,-21,21:-20,21 /dev/ttyAMA0 + From f523fdd36952837704dfe9cf659b9a803a009039 Mon Sep 17 00:00:00 2001 From: Andy Date: Sun, 29 Oct 2017 00:11:58 -0300 Subject: [PATCH 6/8] Small changes to README --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6e31e10..c2ca012 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Introduction -This is the source code of ZUMspot, personal hotspot (ADF7021 version of the MMDVM firmware), based on Jonathan G4KLX's MMDVM software. This firmware supports D-Star, DMR, System Fusion and P25 digital modes. +This is the source code of ZUMspot/MMDVM_HS, personal hotspot (ADF7021 version of the MMDVM firmware), based on Jonathan G4KLX's MMDVM software. This firmware supports D-Star, DMR, System Fusion and P25 digital modes. This software is intended to be run on STM32F103 microcontroller. You can build this code using Arduino IDE with STM32duino package, or using "make" with ARM GCC tools. 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. @@ -16,7 +16,7 @@ This software is licenced under the GPL v2 and is intended for amateur and educa - Serial repeater port for Nextion displays - Support for native USB port in STM32F103 CPU - RSSI support -- Full duplex support with two ADF7021 (experimental) +- Full duplex support with two ADF7021 # Important notes @@ -52,13 +52,13 @@ This utility includes firmwares binaries and USB drivers for Windows 7/8/10. If ### Linux or macOS -Download the script (*.sh) that matches with your ZUMspot board: +Download the script (*.sh) that matches with your ZUMspot/MMDVM_HS board: - install_fw_rpi.sh: only for ZUMspot RPi board - install_fw_hshat.sh: only for MMDVM_HS_Hat board -- install_fw_librekit.sh: only for ZUMspot Libre Kit board or generic ZUMspot board +- install_fw_librekit.sh: only for ZUMspot Libre Kit board or generic MMDVM_HS board - install_fw_usb.sh: only for ZUMspot USB dongle -- install_fw_duplex.sh: only for ZUMspot with dual ADF7021 +- install_fw_duplex.sh: only for MMDVM_HS with dual ADF7021 make the script executable (for example for ZUMspot RPi): From d64de29b0d9b35e84b29a0b23a0e90e77783776b Mon Sep 17 00:00:00 2001 From: Andy CA6JAU Date: Sun, 29 Oct 2017 21:28:57 -0300 Subject: [PATCH 7/8] Updating README --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c2ca012..8e1eed4 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,12 @@ Download the script (*.sh) that matches with your ZUMspot/MMDVM_HS board: - install_fw_usb.sh: only for ZUMspot USB dongle - install_fw_duplex.sh: only for MMDVM_HS with dual ADF7021 -make the script executable (for example for ZUMspot RPi): +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: chmod +x install_fw_rpi.sh From b1295a53909b6a5c2f0017765e5e890cdde5d693 Mon Sep 17 00:00:00 2001 From: Andy CA6JAU Date: Sat, 4 Nov 2017 17:30:40 -0300 Subject: [PATCH 8/8] Updating docs --- BUILD.md | 46 +++++++++++++++++++++++++++++++++++++++++++++- README.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index b19df73..2f51ba9 100644 --- a/BUILD.md +++ b/BUILD.md @@ -73,6 +73,15 @@ Reboot your RPi: ### Build de firmware and upload to ZUMspot RPi +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 + Install the necessary software tools: sudo apt-get update @@ -109,6 +118,12 @@ Build the firmware: make +If you are using Pi-Star, stop services: + + sudo pistar-watchdog.service stop + sudo systemctl stop mmdvmhost.timer + sudo systemctl stop mmdvmhost.service + Upload the firmware to ZUMspot RPi board: sudo make zumspot-pi @@ -257,6 +272,15 @@ Press the reset button of ZUMspot and upload the firmware: ## Linux Raspbian +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 + Install the necessary software tools: sudo apt-get update @@ -287,6 +311,12 @@ Build the firmware with bootloader support: make bl +If you are using Pi-Star, stop services: + + sudo pistar-watchdog.service stop + sudo systemctl stop mmdvmhost.timer + sudo systemctl stop mmdvmhost.service + Upload bootloader and firmware to ZUMspot Libre Kit, using serial port first (you are using an USB-serial converter with device name /dev/ttyUSB0). Move BOOT0 jumper to 1, next press and release RESET and execute: @@ -378,6 +408,15 @@ connect the USB cable. ## Linux Raspbian +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 + Install the necessary software tools: sudo apt-get update @@ -408,6 +447,12 @@ Build the firmware with bootloader support: make bl +If you are using Pi-Star, stop services: + + sudo pistar-watchdog.service stop + sudo systemctl stop mmdvmhost.timer + sudo systemctl stop mmdvmhost.service + Upload the firmware to ZUMspot USB: sudo make dfu devser=/dev/ttyACM0 @@ -434,7 +479,6 @@ Please check here for detailed instructions: https://github.com/mathisschmieder/MMDVM_HS_Hat/blob/master/README.md - # Makefile options - make clean: delete all objects files *.o, for starting a new firmware building. diff --git a/README.md b/README.md index 8e1eed4..0295ef5 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,15 @@ Please check here for detailed instructions: ### ZUMspot Libre Kit (under Linux Raspbian) +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 + Install the necessary software tools: sudo apt-get update @@ -103,6 +112,12 @@ Build the firmware with USB bootloader support (the default Config.h is OK for L make bl +If you are using Pi-Star, stop services: + + sudo pistar-watchdog.service stop + sudo systemctl stop mmdvmhost.timer + sudo systemctl stop mmdvmhost.service + Upload the firmware to ZUMspot Libre Kit using the USB port (your Libre Kit has the bootloader already installed): sudo make dfu devser=/dev/ttyACM0 @@ -138,6 +153,15 @@ Reboot your RPi: #### Build de firmware and upload to ZUMspot RPi +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 + Install the necessary software tools: sudo apt-get update @@ -172,6 +196,12 @@ Build the firmware: make +If you are using Pi-Star, stop services: + + sudo pistar-watchdog.service stop + sudo systemctl stop mmdvmhost.timer + sudo systemctl stop mmdvmhost.service + Upload the firmware to ZUMspot RPi board: sudo make zumspot-pi