modem configuration

pull/32/head
Piotr Wilkon 2023-08-30 16:52:27 +02:00
rodzic 46334fd16d
commit 4341ba3cec
6 zmienionych plików z 69 dodań i 20 usunięć

Wyświetl plik

@ -1,4 +1,25 @@
# 1.2.6 (2023-08-29)
# 1.3.0 (2023-08-30)
## New features
* Callsign is now set together with SSID using ```call <call-SSID>```
* ```time``` command to show uptime
## Removed features
* ```ssid``` command is removed
* Auto-reset functionality and ```autoreset``` command is removed
## Bug fixes
* When beacon *n* delay hadn't passed yet, beacon *n+1*, *n+2*, ... were not sent regardless of their delay
* Bugs with line ending parsing
## Other
* Major code refactoring and rewrite
* Got rid of *uart_transmitStart()* routine
* USB sending is handled the same way as UART
* New way of TX and RX frame handling to improve non-APRS compatibility
* Much bigger frame buffer
* Minimized number of temporary buffers
* All *malloc()*s removed
* Added copyright notice as required by GNU GPL
## Known bugs
* none
# 1.2.6 (2023-07-29)
## New features
* Added ```nonaprs [on/off]``` command that enables reception of non-APRS frames, e.g. for full Packet Radio use
## Bug fixes
@ -43,15 +64,6 @@
* none
## Known bugs
* USB in KISS mode has problem with TX frames
# 1.2.2 (2022-06-11)
## New features
* none
## Bug fixes
* Default de-dupe time was 0, backspace was sometimes stored in config, frame length was not checked in viscous delay mode
## Other
* none
## Known bugs
* USB in KISS mode has problem with TX frames
# 1.2.1 (2021-10-13)
## New features
* none
@ -73,4 +85,4 @@ This is the very first open-source VP-Digi release.
## Other
* Code was partially rewritten (especially digipeater, modem and AX.25 layer)
## Known bugs
* none
* none

Wyświetl plik

@ -32,7 +32,7 @@ struct _GeneralConfig GeneralConfig =
const char versionString[] = "VP-Digi v. 2.0.0\r\nThe open-source standalone APRS digipeater controller and KISS TNC\r\n"
#ifdef ENABLE_FX25
"with FX.25 support compiled-in\r\n"
"With FX.25 support compiled-in\r\n"
#endif
;

Wyświetl plik

@ -95,7 +95,8 @@ along with VP-DigiConfig. If not, see <http://www.gnu.org/licenses/>.
#define CONFIG_DEST 1208
#define CONFIG_ALLOWNONAPRS 1214
#define CONFIG_FX25 1216
#define CONFIG_XXX 1218 //next address (not used)
#define CONFIG_MODEM 1218
#define CONFIG_XXX 1220 //next address (not used)
/**
@ -264,6 +265,7 @@ void ConfigWrite(void)
write(CONFIG_KISSMONITOR, GeneralConfig.kissMonitor);
write(CONFIG_ALLOWNONAPRS, Ax25Config.allowNonAprs);
write(CONFIG_FX25, Ax25Config.fx25 | (Ax25Config.fx25Tx << 1));
write(CONFIG_MODEM, ModemConfig.modem);
write(CONFIG_FLAG, CONFIG_FLAG_WRITTEN);
@ -355,6 +357,7 @@ uint8_t ConfigRead(void)
t = (uint8_t)read(CONFIG_FX25);
Ax25Config.fx25 = t & 1;
Ax25Config.fx25Tx = (t & 2) > 0;
ModemConfig.modem = read(CONFIG_MODEM);
return 1;
}

Wyświetl plik

@ -775,6 +775,9 @@ void ModemInit(void)
TIM3->PSC = 71; //72/72=1 MHz
TIM3->DIER |= TIM_DIER_UIE;
if(ModemConfig.modem > MODEM_9600)
ModemConfig.modem = MODEM_1200;
if((ModemConfig.modem == MODEM_1200) || (ModemConfig.modem == MODEM_1200_V23)
#ifdef ENABLE_PSK
|| (ModemConfig.modem == MODEM_BPSK_1200) || (ModemConfig.modem == MODEM_QPSK_1200)

Wyświetl plik

@ -234,6 +234,7 @@ int main(void)
ConfigRead();
ModemInit();
Ax25Init();
#ifdef ENABLE_FX25
Fx25Init();
@ -247,7 +248,6 @@ int main(void)
UartConfig(&Uart2, 1);
UartConfig(&UartUsb, 1);
ModemInit();
BeaconInit();
/* USER CODE END 2 */

Wyświetl plik

@ -104,8 +104,6 @@ void TermSendNumberToAll(enum UartMode mode, int32_t n)
}
static const char monitorHelp[] = "\r\nCommans available in monitor mode:\r\n"
"help - shows this help page\r\n"
"cal {low|high|alt|stop} - transmits/stops transmitter calibration pattern\r\n"
@ -126,6 +124,7 @@ static const char configHelp[] = "\r\nCommands available in config mode:\r\n"
"reboot - reboots the device\r\n"
"time - show time since boot\r\n"
"version - shows full firmware version info\r\n\r\n"
"modem <type> - sets modem type: 1200, 1200_V23, 300 or 9600\r\n"
"call <callsign-SSID> - sets callsign with optional SSID\r\n"
"dest <address> - sets destination address\r\n"
"txdelay <50-2550> - sets TXDelay time (ms)\r\n"
@ -158,7 +157,23 @@ static const char configHelp[] = "\r\nCommands available in config mode:\r\n"
static void printConfig(Uart *src)
{
UartSendString(src, "Callsign: ", 0);
UartSendString(src, "Modem: ", 0);
switch(ModemConfig.modem)
{
case MODEM_1200:
UartSendString(src, "AFSK Bell 202 1200 Bd 1200/2200 Hz", 0);
break;
case MODEM_1200_V23:
UartSendString(src, "AFSK V.23 1200 Bd 1300/2100 Hz", 0);
break;
case MODEM_300:
UartSendString(src, "AFSK Bell 103 300 Bd 1600/1800 Hz", 0);
break;
case MODEM_9600:
UartSendString(src, "GFSK G3RUH 9600 Bd", 0);
break;
}
UartSendString(src, "\r\nCallsign: ", 0);
for(uint8_t i = 0; i < 6; i++)
{
if(GeneralConfig.call[i] != (' ' << 1))
@ -376,8 +391,9 @@ void TermParse(Uart *src)
else if(!strncmp(cmd, "config", 6))
{
UartSendString(src, (uint8_t*)"Switched to configuration mode\r\n"
"Most settings will take effect immediately, but\r\n"
"remember to save the configuration using \"save\"\r\n", 0);
"Some settings require the device to be rebooted\r\n"
"in order to behave correctly"
"Always use \"save\" to save and reboot", 0);
src->mode = MODE_TERM;
return;
}
@ -584,9 +600,24 @@ void TermParse(Uart *src)
/*
* Settings insertion handling
*/
else if(!strncmp(cmd, "modem", 5))
{
if(!strncmp(&cmd[6], "1200", 4))
ModemConfig.modem = MODEM_1200;
else if(!strncmp(&cmd[6], "1200_V23", 8))
ModemConfig.modem = MODEM_1200_V23;
else if(!strncmp(&cmd[6], "300", 3))
ModemConfig.modem = MODEM_300;
else if(!strncmp(&cmd[6], "9600", 4))
ModemConfig.modem = MODEM_9600;
else
{
UartSendString(src, "Incorrect modem type!\r\n", 0);
return;
}
}
else if(!strncmp(cmd, "call", 4))
{
if(!ParseCallsignWithSsid(&cmd[5], len - 5, GeneralConfig.call, &GeneralConfig.callSsid))
{
UartSendString(src, "Incorrect callsign!\r\n", 0);