Skip to content

Commit

Permalink
Merge branch 'master' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
juribeparada committed Dec 26, 2017
2 parents dc3392a + a17386e commit 4c67850
Show file tree
Hide file tree
Showing 13 changed files with 125 additions and 85 deletions.
2 changes: 1 addition & 1 deletion ADF7021.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ uint16_t CIO::devP25()

void CIO::printConf()
{
DEBUG1("ZUMspot configuration:");
DEBUG1("MMDVM_HS FW configuration:");
DEBUG2I("TX freq (Hz):", TXfreq());
DEBUG2I("RX freq (Hz):", RXfreq());
DEBUG2("D-Star dev (Hz):", devDSTAR());
Expand Down
14 changes: 7 additions & 7 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Edit Config.h

and enable:

#define PI_HAT_7021_REV_03
#define ZUMSPOT_ADF7021
#define ENABLE_ADF7021
#define ADF7021_14_7456
#define STM32_USART1_HOST
Expand Down Expand Up @@ -198,7 +198,7 @@ Under the menu "Tools" select "Board" and then select:

Edit Config.h:

#define ADF7021_CARRIER_BOARD
#define LIBRE_KIT_ADF7021
#define ENABLE_ADF7021
#define ADF7021_14_7456
#define STM32_USB_HOST
Expand Down Expand Up @@ -301,7 +301,7 @@ Edit Config.h:

and enable:

#define ADF7021_CARRIER_BOARD
#define LIBRE_KIT_ADF7021
#define ENABLE_ADF7021
#define ADF7021_14_7456
#define STM32_USB_HOST
Expand Down Expand Up @@ -395,7 +395,7 @@ Under the menu "Tools" select "Board" and then select:

Edit Config.h:

#define PI_HAT_7021_REV_03
#define ZUMSPOT_ADF7021
#define ENABLE_ADF7021
#define ADF7021_14_7456
#define STM32_USB_HOST
Expand Down Expand Up @@ -437,7 +437,7 @@ Edit Config.h

and enable:

#define PI_HAT_7021_REV_03
#define ZUMSPOT_ADF7021
#define ENABLE_ADF7021
#define ADF7021_14_7456
#define STM32_USB_HOST
Expand Down Expand Up @@ -534,10 +534,10 @@ ZUMspot RPi (no USB support needed):

# Config.h options

- #define PI_HAT_7021_REV_03: enable pinouts support for ZUMspot RPi or ZUMspot USB. You have
- #define ZUMSPOT_ADF7021: enable pinouts support for ZUMspot RPi or ZUMspot USB. You have
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
- #define LIBRE_KIT_ADF7021: 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.
Expand Down
10 changes: 5 additions & 5 deletions Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
#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
// 1) ZUMspot RPi or ZUMspot USB:
// #define ZUMSPOT_ADF7021
// 2) Libre Kit board or any homebrew hotspot with modified RF7021SE and Blue Pill STM32F103:
#define LIBRE_KIT_ADF7021
// 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:
// Enable full duplex support with dual ADF7021 (valid for homebrew hotspots only):
// #define DUPLEX

// TCXO of the ADF7021
Expand Down
8 changes: 4 additions & 4 deletions IOArduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

// STM32F1 pin definitions, using STM32duino

#if defined(PI_HAT_7021_REV_03)
#if defined(ZUMSPOT_ADF7021)

#define PIN_SCLK PB5
#define PIN_SREAD PB6
Expand All @@ -50,7 +50,7 @@
#define PIN_PTT_LED PB14
#define PIN_COS_LED PB15

#elif defined(ADF7021_CARRIER_BOARD) || defined(MMDVM_HS_HAT_REV12)
#elif defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12)

#define PIN_SCLK PB5
#define PIN_SREAD PB7
Expand All @@ -73,7 +73,7 @@
#define PIN_COS_LED PB15

#else
#error "Either PI_HAT_7021_REV_03 or ADF7021_CARRIER_BOARD or MMDVM_HS_HAT_REV12 need to be defined"
#error "Either ZUMSPOT_ADF7021 or LIBRE_KIT_ADF7021 or MMDVM_HS_HAT_REV12 need to be defined"
#endif

#elif defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)
Expand Down Expand Up @@ -144,7 +144,7 @@ void CIO::Init()
{
#if defined (__STM32F1__)

#if defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD) || defined(MMDVM_HS_HAT_REV12)
#if defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12)
afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY);
#endif

Expand Down
14 changes: 7 additions & 7 deletions IOSTM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
#define PIN_COS_LED GPIO_Pin_13
#define PORT_COS_LED GPIOB

#elif defined(PI_HAT_7021_REV_03)
#elif defined(ZUMSPOT_ADF7021)

#define PIN_SCLK GPIO_Pin_5
#define PORT_SCLK GPIOB
Expand Down Expand Up @@ -146,7 +146,7 @@
#define PIN_COS_LED GPIO_Pin_15
#define PORT_COS_LED GPIOB

#elif defined(ADF7021_CARRIER_BOARD) || defined(MMDVM_HS_HAT_REV12)
#elif defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12)

#define PIN_SCLK GPIO_Pin_5
#define PORT_SCLK GPIOB
Expand Down Expand Up @@ -216,7 +216,7 @@
#define PORT_COS_LED GPIOB

#else
#error "Either PI_HAT_7021_REV_02, PI_HAT_7021_REV_03,ADF7021_CARRIER_BOARD or MMDVM_HS_HAT_REV12 need to be defined"
#error "Either PI_HAT_7021_REV_02, ZUMSPOT_ADF7021, LIBRE_KIT_ADF7021 or MMDVM_HS_HAT_REV12 need to be defined"
#endif

extern "C" {
Expand All @@ -238,7 +238,7 @@ extern "C" {
}
#endif

#elif defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD) || defined(MMDVM_HS_HAT_REV12)
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12)

#if defined(BIDIR_DATA_PIN)
void EXTI3_IRQHandler(void) {
Expand Down Expand Up @@ -275,7 +275,7 @@ void CIO::Init()

#if defined(PI_HAT_7021_REV_02)
GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE);
#elif defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD) || defined(MMDVM_HS_HAT_REV12)
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12)
GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);
#endif

Expand Down Expand Up @@ -439,7 +439,7 @@ void CIO::Init()
EXTI_InitStructure.EXTI_Line = EXTI_Line14;
#endif

#elif defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD) || defined(MMDVM_HS_HAT_REV12)
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12)

#if defined(BIDIR_DATA_PIN)
// Connect EXTI3 Line
Expand Down Expand Up @@ -487,7 +487,7 @@ void CIO::startInt()

NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn;

#elif defined(PI_HAT_7021_REV_03) || defined(ADF7021_CARRIER_BOARD) || defined(MMDVM_HS_HAT_REV12)
#elif defined(ZUMSPOT_ADF7021) || defined(LIBRE_KIT_ADF7021) || defined(MMDVM_HS_HAT_REV12)

#if defined(BIDIR_DATA_PIN)
// Enable and set EXTI3 Interrupt
Expand Down
26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Introduction

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 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 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.

Expand All @@ -10,7 +10,7 @@ This software is licenced under the GPL v2 and is intended for amateur and educa

- Supported modes: D-Star, DMR, Yaesu Fusion and P25 Phase 1
- Automatic mode detection (scanning)
- G4KLX software suite: MMDVMHost, ircDDBGateway, YSFGateway, P25Gateway and DMRGateway
- 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) and [DMRGateway](https://github.com/g4klx/DMRGateway)
- Bands: 144, 220, 430 and 900 MHz (VHF requires external inductor)
- Status LEDs (PTT, COR and digital modes)
- Serial repeater port for Nextion displays
Expand All @@ -24,31 +24,27 @@ The ADF7021 (or RF7021SE module) must operate with a 14.7456 MHz TCXO and with a

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.

Be aware that some Blue Pill STM32F103 board are defectives. If you have trouble with USB, please check this: http://wiki.stm32duino.com/index.php?title=Blue_Pill
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).

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.

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 ADF7021_CARRIER_BOARD (Config.h) with STM32F103 platform is supported. Please see [BUILD.md](BUILD.md) for pinout details.
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.

If you can't decode any 4FSK modulation (DMR, YSF and P25) 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).

# Quick start

Please see [BUILD.md](BUILD.md) for more details, and also MMDVM Yahoo Groups. You also can check at MMDVM_HS/scripts folder for some automatic tasks.
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.

## Binary firmware installation

Please check the latest firmware:

https://github.com/juribeparada/MMDVM_HS/releases
Please check the latest firmware [here](https://github.com/juribeparada/MMDVM_HS/releases).

### Windows

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
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).

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.
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.

### Linux or macOS

Expand Down Expand Up @@ -81,9 +77,7 @@ You could check at MMDVM_HS/configs for common Config.h examples, using differen

### MMDVM_HS_Hat

Please check here for detailed instructions:

https://github.com/mathisschmieder/MMDVM_HS_Hat/blob/master/README.md
Please visit Mathis Schmieder GitHub [here](https://github.com/mathisschmieder/MMDVM_HS_Hat/blob/master/README.md) for detailed instructions.

### ZUMspot Libre Kit (under Linux Raspbian)

Expand Down Expand Up @@ -186,7 +180,7 @@ Edit Config.h

and enable:

#define PI_HAT_7021_REV_03
#define ZUMSPOT_ADF7021
#define ENABLE_ADF7021
#define ADF7021_14_7456
#define STM32_USART1_HOST
Expand Down
22 changes: 2 additions & 20 deletions SerialPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@

#include "Config.h"
#include "Globals.h"

#if defined(MADEBYMAKEFILE)
#include "GitVersion.h"
#endif

#include "version.h"
#include "SerialPort.h"

const uint8_t MMDVM_FRAME_START = 0xE0U;
Expand Down Expand Up @@ -70,20 +66,6 @@ const uint8_t MMDVM_DEBUG3 = 0xF3U;
const uint8_t MMDVM_DEBUG4 = 0xF4U;
const uint8_t MMDVM_DEBUG5 = 0xF5U;

#if defined(ADF7021_N_VER)
#define DESCRIPTION "ZUMspot ADF7021N v1.0.2 20171023 (DStar/DMR/YSF/P25)"
#else
#define DESCRIPTION "ZUMspot ADF7021 v1.0.2 20171023 (DStar/DMR/YSF/P25)"
#endif

#if defined(GITVERSION)
#define concat(a, b) a " GitID #" b ""
const char HARDWARE[] = concat(DESCRIPTION, GITVERSION);
#else
#define concat(a, b, c) a " (Build: " b " " c ")"
const char HARDWARE[] = concat(DESCRIPTION, __TIME__, __DATE__);
#endif

const uint8_t PROTOCOL_VERSION = 1U;

CSerialPort::CSerialPort() :
Expand Down Expand Up @@ -207,7 +189,7 @@ void CSerialPort::getVersion()

uint8_t CSerialPort::setConfig(const uint8_t* data, uint8_t length)
{
if (length < 13U)
if (length < 15U)
return 4U;

bool ysfLoDev = (data[0U] & 0x08U) == 0x08U;
Expand Down
10 changes: 5 additions & 5 deletions configs/MMDVM_HS_Hat.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
#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
// 1) ZUMspot RPi or ZUMspot USB:
// #define ZUMSPOT_ADF7021
// 2) Libre Kit board or any homebrew hotspot with modified RF7021SE and Blue Pill STM32F103:
// #define LIBRE_KIT_ADF7021
// 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:
// Enable full duplex support with dual ADF7021 (valid for homebrew hotspots only):
// #define DUPLEX

// TCXO of the ADF7021
Expand Down
10 changes: 5 additions & 5 deletions configs/ZUMspot_Libre.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
#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
// 1) ZUMspot RPi or ZUMspot USB:
// #define ZUMSPOT_ADF7021
// 2) Libre Kit board or any homebrew hotspot with modified RF7021SE and Blue Pill STM32F103:
#define LIBRE_KIT_ADF7021
// 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:
// Enable full duplex support with dual ADF7021 (valid for homebrew hotspots only):
// #define DUPLEX

// TCXO of the ADF7021
Expand Down
10 changes: 5 additions & 5 deletions configs/ZUMspot_RPi.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
#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
// 1) ZUMspot RPi or ZUMspot USB:
#define ZUMSPOT_ADF7021
// 2) Libre Kit board or any homebrew hotspot with modified RF7021SE and Blue Pill STM32F103:
// #define LIBRE_KIT_ADF7021
// 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:
// Enable full duplex support with dual ADF7021 (valid for homebrew hotspots only):
// #define DUPLEX

// TCXO of the ADF7021
Expand Down
10 changes: 5 additions & 5 deletions configs/ZUMspot_USB.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
#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
// 1) ZUMspot RPi or ZUMspot USB:
#define ZUMSPOT_ADF7021
// 2) Libre Kit board or any homebrew hotspot with modified RF7021SE and Blue Pill STM32F103:
// #define LIBRE_KIT_ADF7021
// 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:
// Enable full duplex support with dual ADF7021 (valid for homebrew hotspots only):
// #define DUPLEX

// TCXO of the ADF7021
Expand Down
Loading

0 comments on commit 4c67850

Please sign in to comment.