Skip to content

Commit

Permalink
[NRC7292 HM] v1.3.4 rev13
Browse files Browse the repository at this point in the history
- enhancement: offload CQM(Connection Quality Monitor) onto host driver
- enhancement: suppress overrun log for the host platform with a lower clock speed CPU (max 10 logs per 5 seconds)
- enhancement: "cli_app set self_config" command works only when the country code is matched to the regulatory domain
- enhancement: half-duplex SPI support (configurable with CONFIG_SPI_HALF_DUPLEX in nrc-build-config.h)
- enhancement: improve power calibration and compensation accuracy affecting the revised JP and KR-MIC channelization
- enhancement: JP channel spur suppression
- enhancement: add the logging file permission check to 'show signal' cli_app command
- enhancement: initialize frame sequence number after reconnection
- bugfix: wrong self_config results on 2/4MHz of KR MIC SW package
- bugfix: beacon loss on relay STA
- bugfix: converged CS time after 'set tx_time' cli_app command
- bugfix: initialized duty cycle setting after target recovery
  • Loading branch information
Aaron J. Lee committed Nov 30, 2022
1 parent 1cf0c3e commit c59ce40
Show file tree
Hide file tree
Showing 83 changed files with 1,092 additions and 955 deletions.
64 changes: 45 additions & 19 deletions README.md
Expand Up @@ -2,6 +2,7 @@

## Notice
### Release roadmap
- v1.3.4_rev13 (2022.11.30)
- v1.3.4_rev12 (2022.10.28)
- v1.3.4_rev11 (2022.10.14)
- v1.3.4_rev10 (2022.10.05)
Expand All @@ -21,7 +22,7 @@
- v1.3.0 (2020.05.30)

### Latest release
- [NRC7292_SW_PKG_v1.3.4_rev12](https://github.com/newracom/nrc7292_sw_pkg/releases/tag/v1.3.4_rev12)
- [NRC7292_SW_PKG_v1.3.4_rev13](https://github.com/newracom/nrc7292_sw_pkg/releases/tag/v1.3.4_rev13)

### Release package contents
- host: NRC7292 software package for global regulatory domains
Expand Down Expand Up @@ -117,7 +118,7 @@ There are a couple of configurable parameters as below.
max_cpuclock = 1 # Set Max CPU Clock : 0(off) or 1(on)
##################################################################################
# Firmware Conf.
model = 7292 # 7292 or 7192
model = 7292 # 7292
fw_download = 1 # 0(FW Download off) or 1(FW Download on)
fw_name = 'uni_s1g.bin'
##################################################################################
Expand All @@ -132,34 +133,50 @@ supplicant_debug = 0 # WPA Supplicant debug option : 0(off) or 1(on)
hostapd_debug = 0 # Hostapd debug option : 0(off) or 1(on)
#################################################################################
# CSPI Conf. (Default)
spi_clock = 20000000 # SPI Master Clock Frequency
spi_bus_num = 0 # SPI Master Bus Number
spi_cs_num = 0 # SPI Master Chipselect Number
spi_gpio_irq = 5 # CSPI_EIRQ GPIO Number, BBB is 60 recommanded.
spi_gpio_poll = -1 # CSPI_EIRQ GPIO Polling Interval (if negative, irq mode)
spi_clock = 20000000 # SPI Master Clock Frequency
spi_bus_num = 0 # SPI Master Bus Number
spi_cs_num = 0 # SPI Master Chipselect Number
spi_gpio_irq = 5 # NRC-CSPI EIRQ GPIO Number
# BBB is 60 recommanded.
spi_polling_interval = 0 # NRC-CSPI Polling Interval (msec)
#
# NOTE:
# - NRC-CSPI EIRQ Input Interrupt: spi_gpio_irq >= 0 and spi_polling_interval <= 0
# - NRC-CSPI EIRQ Input Polling : spi_gpio_irq >= 0 and spi_polling_interval > 0
# - NRC-CSPI Registers Polling : spi_gpio_irq < 0 and spi_polling_interval > 0
#
#--------------------------------------------------------------------------------#
# FT232H USB-SPI Conf. (FT232H CSPI Conf)
ft232h_usb_spi = 0 # FTDI FT232H USB-SPI bridge : 0(off) or 1(on)
ft232h_usb_spi = 0 # FTDI FT232H USB-SPI bridge
# 0 : Unused
# 1 : NRC-CSPI_EIRQ Input Polling
# 2 : NRC-CSPI Registers Polling
#################################################################################
# RF Conf.
# Board Data includes TX Power per MCS and CH
txpwr_val = 17 # TX Power
# Max TX PWR
txpwr_max_default = 24 # Board Data Max TX Power
bd_download = 0 # 0(Board Data Download off) or 1(Board Data Download on)
bd_name = 'nrc7292_bd.dat'
#--------------------------------------------------------------------------------#
# Calibration usage option
# If this value is changed, the device should be restarted for applying the value
cal_use = 1 # 0(disable) or 1(enable)
##################################################################################
# PHY Conf.
guard_int = 'long' # Guard Interval ('long'(LGI) or 'short'(SGI))
##################################################################################
# MAC Conf.
# S1G Short Beacon (AP & MESH Only)
# If disabled, AP sends only S1G long beacon every BI
# Recommend using S1G short beacon for network efficiency (Default: enabled)
short_bcn_enable = 1 # 0 (disable) or 1 (enable)
#--------------------------------------------------------------------------------#
# AMPDU (Aggregated MPDU)
# Enable AMPDU for full channel utilization and throughput enhancement
ampdu_enable = 1 # 0 (disable) or 1 (enable)
#--------------------------------------------------------------------------------#
# Legacy ACK enable (AP & STA)
# If disabled, AP/STA sends only NDP ack frame
# Recommend using NDP ack mode (Default: disable)
legacy_ack_enable = 0 # 0 (NDP ack mode) or 1 (legacy ack mode)
#--------------------------------------------------------------------------------#
# 1M NDP (Block) ACK (AP Only)
# Enable 1M NDP ACK on 2/4MHz BW for robustness (default: 2M NDP ACK on 2/4MH BW)
# STA should follow, if enabled on AP
Expand All @@ -168,7 +185,7 @@ ndp_ack_1m = 0 # 0 (disable) or 1 (enable)
#--------------------------------------------------------------------------------#
# NDP Probe Request
# For STA, "scan_ssid=1" in wpa_supplicant's conf should be set to use
ndp_preq = 1 # 0 (Legacy Probe Req) 1 (NDP Probe Req)
ndp_preq = 0 # 0 (Legacy Probe Req) 1 (NDP Probe Req)
#--------------------------------------------------------------------------------#
# CQM (Channel Quality Manager) (STA Only)
# STA can disconnect according to Channel Quality (Beacon Loss or Poor Signal)
Expand All @@ -194,7 +211,7 @@ listen_interval = 1000 # STA (listen interval in BI unit) (max:65535)
# Period is in unit of 1000TU(1024ms, 1TU=1024us)
# Note: if disabled, AP removes STAs' info only with explicit disconnection like deauth
bss_max_idle_enable = 1 # 0 (disable) or 1 (enable)
bss_max_idle = 180 # time interval (e.g. 60: 614400ms) (1 ~ 65535)
bss_max_idle = 180 # time interval (e.g. 60: 61440ms) (1 ~ 65535)
#--------------------------------------------------------------------------------#
# Mesh Options (Mesh Only)
# SW encryption by MAC80211 for Mesh Point
Expand All @@ -206,11 +223,20 @@ static_ip = 0 # 0 (disable) or Static IP Address
# Self configuration (AP Only)
# AP scans the clearest CH and then starts with it
self_config = 0 # 0 (disable) or 1 (enable)
prefer_bw = 4 # 0: no preferred bandwidth, 1: 1M, 2: 2M, 4: 4M
prefer_bw = 0 # 0: no preferred bandwidth, 1: 1M, 2: 2M, 4: 4M
dwell_time = 100 # max dwell is 1000 (ms), min: 10ms, default: 100ms
#--------------------------------------------------------------------------------#
# Credit num of AC_BE for flow control between host and target (Internal use only)
# Credit num of AC_BE for flow control between host and target (Test only)
credit_ac_be = 40 # number of buffer (min: 40, max: 120)
#--------------------------------------------------------------------------------#
# Use bitmap encoding for block ack operation (NRC7292 only)
bitmap_encoding = 1 # 0 (disable) or 1 (enable)
#--------------------------------------------------------------------------------#
# User scrambler reversely (NRC7292 only)
reverse_scrambler = 1 # 0 (disable) or 1 (enable)
#--------------------------------------------------------------------------------#
# Use bridge setup with br0, wlan0, eth(n) (AP & STA)
use_bridge_setup = 0 # 0 (not use bridge setup) or n (use bridge setup with eth(n-1))
##################################################################################
```
You can apply your parameters by updating start.py script file.
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion package/host/VERSION-SDK.txt
@@ -1,4 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 3
VERSION_REVISION 4
rev12
rev13
Binary file modified package/host/doc/AN-7292-007-11s_mesh_network.pdf
Binary file not shown.
Binary file modified package/host/doc/UG-7292-018-Raspberry_Pi_setup.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion package/host/evk/binary/VERSION-SDK.txt
@@ -1,4 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 3
VERSION_REVISION 4
rev12
rev13
Binary file modified package/host/evk/binary/cli_app
Binary file not shown.
Binary file modified package/host/evk/binary/nrc.ko
Binary file not shown.
Binary file modified package/host/evk/binary/nrc7292_cspi.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion package/host/evk/sw_pkg/nrc_pkg/VERSION-SDK.txt
@@ -1,4 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 3
VERSION_REVISION 4
rev12
rev13
Binary file modified package/host/evk/sw_pkg/nrc_pkg/script/cli_app
Binary file not shown.
11 changes: 1 addition & 10 deletions package/host/evk/sw_pkg/nrc_pkg/script/start.py
Expand Up @@ -49,9 +49,7 @@
# Max TX PWR
txpwr_max_default = 24 # Board Data Max TX Power
#--------------------------------------------------------------------------------#
# Calibration usage option
# If this value is changed, the device should be restarted for applying the value
cal_use = 1 # 0(disable) or 1(enable)

##################################################################################
# PHY Conf.
guard_int = 'long' # Guard Interval ('long'(LGI) or 'short'(SGI))
Expand Down Expand Up @@ -300,7 +298,6 @@ def argv_print():
print("STA Type : " + strSTA())
print("Country : " + str(sys.argv[3]))
print("Security Mode : " + strSecurity())
print("CAL. USE : " + strOnOff(cal_use))
print("AMPDU : " + strOnOff(ampdu_enable))
if strSTA() == 'STA':
print("CQM : " + strOnOff(cqm_enable))
Expand Down Expand Up @@ -624,12 +621,6 @@ def run_common():
print("[5] Set guard interval")
os.system('/home/pi/nrc_pkg/script/cli_app set gi ' + guard_int)

print("[6] Set cal_use")
if int(cal_use) == 1:
os.system('/home/pi/nrc_pkg/script/cli_app set cal_use on')
else:
os.system('/home/pi/nrc_pkg/script/cli_app set cal_use off')

print("[*] Start DHCPCD and DNSMASQ")
startDHCPCD()
startDNSMASQ()
Expand Down
Binary file modified package/host/evk/sw_pkg/nrc_pkg/sw/driver/nrc.ko
Binary file not shown.
Binary file modified package/host/evk/sw_pkg/nrc_pkg/sw/firmware/nrc7292_cspi.bin
Binary file not shown.
46 changes: 25 additions & 21 deletions package/host/src/cli_app/cli_cmd.c
Expand Up @@ -167,6 +167,8 @@ static int show_signal_periodic_timer;
static int show_signal_try_number;
const char response_timeout_str[] = "Failed";
const char no_self_conf_str[] = "no_self_conf";
const char not_matched_cc_str[] = "not_matched_country";
const char not_matched_cc_msg[] = "is not the currently set country";

/*******************************************************************************
* command list
Expand Down Expand Up @@ -2036,7 +2038,7 @@ static int cmd_set_tx_time(cmd_tbl_t *t, int argc, char *argv[])
memset(param, 0x0, sizeof(param));

if(argc == 4){
sprintf(param, "test tx_time %s %s -sr", argv[2], argv[3]);
sprintf(param, "test tx_time %s %s", argv[2], argv[3]);
}else{
return CMD_RET_FAILURE;
}
Expand Down Expand Up @@ -2130,19 +2132,22 @@ static int cmd_set_self_configuration(cmd_tbl_t *t, int argc, char *argv[])
memset(response, 0x0, NL_MSG_MAX_RESPONSE_SIZE);
memset(param, 0x0, sizeof(param));

if(argc == 5){
if (argc == 5)
sprintf(param, "set self_config %s %s %s -sr", argv[2], argv[3], argv[4]);
} else {
else
return CMD_RET_FAILURE;
}

netlink_ret = netlink_send_data(NL_SHELL_RUN_RAW, param, response);

if(!netlink_ret){
if(strcmp(response, response_timeout_str)== 0){
if (!netlink_ret) {
if (strcmp(response, response_timeout_str) == 0) {
ret = CMD_RET_RESPONSE_TIMEOUT;
} else if (strcmp(response, no_self_conf_str)==0){
} else if (strcmp(response, no_self_conf_str) == 0) {
printf("%s\n",no_self_conf_str);
ret = CMD_RET_FAILURE;
} else if (strcmp(response, not_matched_cc_str) == 0) {
printf("[%s] %s\n", argv[2], not_matched_cc_msg);
ret = CMD_RET_FAILURE;
} else {
printf("\tFrequency\tCCA\tbandwidth\n");

Expand All @@ -2155,7 +2160,7 @@ static int cmd_set_self_configuration(cmd_tbl_t *t, int argc, char *argv[])
memcpy(&best_nons1g_freq_idx, &response[result_idx_ptr], sizeof(best_nons1g_freq_idx));
result_idx_ptr+=2;

for ( ; result_idx_ptr< NL_MSG_MAX_RESPONSE_SIZE ; ){
for ( ; result_idx_ptr< NL_MSG_MAX_RESPONSE_SIZE ; ) {
unsigned short freq =0 ;
unsigned short cca =0 ;
char bw=0;
Expand All @@ -2173,13 +2178,13 @@ static int cmd_set_self_configuration(cmd_tbl_t *t, int argc, char *argv[])
result_idx_ptr+=1;

// Outputs only the results for the preferred bandwidth.
if (atoi(argv[3]) == 1){
if (atoi(argv[3]) == 1) {
if (bw == 0)
printf("--\t%4.1f MHz\t%3.1f%%\t%dM\n", freq/10.0, cca/10.0, (bw == 0)?1:(bw == 1)?2:4);
} else if (atoi(argv[3]) == 2){
} else if (atoi(argv[3]) == 2) {
if (bw == 1)
printf("--\t%4.1f MHz\t%3.1f%%\t%dM\n", freq/10.0, cca/10.0, (bw == 0)?1:(bw == 1)?2:4);
} else if (atoi(argv[3]) == 4){
} else if (atoi(argv[3]) == 4) {
if (bw == 2)
printf("--\t%4.1f MHz\t%3.1f%%\t%dM\n", freq/10.0, cca/10.0, (bw == 0)?1:(bw == 1)?2:4);
} else {
Expand All @@ -2193,7 +2198,7 @@ static int cmd_set_self_configuration(cmd_tbl_t *t, int argc, char *argv[])

ret = CMD_RET_SUCCESS;
}
}else{
} else {
ret = CMD_RET_FAILURE;
}
return ret;
Expand Down Expand Up @@ -2433,7 +2438,7 @@ void *showRxThreadRun(cmd_tbl_t *t)
char param[NRC_MAX_CMDLINE_SIZE];
char response[NL_MSG_MAX_RESPONSE_SIZE];
int netlink_ret = 0;
int rssi, snr;
int rssi = 0, snr = 0;
int i = 0;
int device_number = 0;

Expand All @@ -2454,14 +2459,13 @@ void *showRxThreadRun(cmd_tbl_t *t)
memset(mac_addr, 0x0, MAX_ADDR_SIZE);

/* create log file and initialize value */
if(signal_log_create(show_signal_periodic_timer) == 0){
for(i=0; i<MAX_CONECTION_NUM; i++){
rssi_sum[i] = 0;
rssi_sum_sqrs[i] = 0;
snr_sum[i] = 0;
snr_sum_sqrs[i] =0;
}
try_count = 0;
signal_log_create(show_signal_periodic_timer);

for(i=0; i<MAX_CONECTION_NUM; i++){
rssi_sum[i] = 0;
rssi_sum_sqrs[i] = 0;
snr_sum[i] = 0;
snr_sum_sqrs[i] =0;
}

while(1)
Expand Down
2 changes: 1 addition & 1 deletion package/host/src/cli_app/cli_config.h
Expand Up @@ -25,7 +25,7 @@

#ifndef _CLI_CONFIG_H_

const char* nrc_cli_app_ver= "2.10.4";
const char* nrc_cli_app_ver= "2.10.5";
const char* app_name = "Newracom Command Line Application";
const char* exit_msg = "Exit Newracom Command Line Application";
const char* prompt_name = "NRC";
Expand Down
29 changes: 16 additions & 13 deletions package/host/src/cli_app/cli_util.c
Expand Up @@ -47,7 +47,7 @@
#define TAB_TO_SPACE_LENGTH 8

static char log_file_prefix[64] = "nrc_signal";
static FILE *fp_log_file;
static FILE *fp_log_file = NULL;

/*******************************************************************************
* util functions
Expand Down Expand Up @@ -664,23 +664,26 @@ int signal_log_display(char* mac_addr, int snr_sum, int snr_sum_sqrs, int rssi_s
printf(" std_dev : %.3lf\n", std_dev_snr);
printf("--------------------------------------------------\n");

fprintf(fp_log_file, "--------------------------------------------------\n");
fprintf(fp_log_file, "[MAC Addr]: %s\n", mac_addr_temp);
fprintf(fp_log_file, "[Total] : %d\n", n);
fprintf(fp_log_file, "[RSSI]\n");
fprintf(fp_log_file, " average : %.3lf\n", avg_rssi);
fprintf(fp_log_file, " std_dev : %.3lf\n", std_dev_rssi);
fprintf(fp_log_file, "[SNR]\n");
fprintf(fp_log_file, " average : %.3lf\n", avg_snr);
fprintf(fp_log_file, " std_dev : %.3lf\n", std_dev_snr);
fprintf(fp_log_file, "--------------------------------------------------\n");

if(fp_log_file != NULL) {
fprintf(fp_log_file, "--------------------------------------------------\n");
fprintf(fp_log_file, "[MAC Addr]: %s\n", mac_addr_temp);
fprintf(fp_log_file, "[Total] : %d\n", n);
fprintf(fp_log_file, "[RSSI]\n");
fprintf(fp_log_file, " average : %.3lf\n", avg_rssi);
fprintf(fp_log_file, " std_dev : %.3lf\n", std_dev_rssi);
fprintf(fp_log_file, "[SNR]\n");
fprintf(fp_log_file, " average : %.3lf\n", avg_snr);
fprintf(fp_log_file, " std_dev : %.3lf\n", std_dev_snr);
fprintf(fp_log_file, "--------------------------------------------------\n");
}
return 0;
}

int signal_log_update(int device_number, char* mac_addr, int rssi, int snr){
printf("Mac Addr : %s\trssi: %d \tsnr: %d\n", mac_addr, rssi, snr);
fprintf(fp_log_file, "Mac Addr : %s\trssi: %d \tsnr: %d\n", mac_addr, rssi, snr);
if(fp_log_file != NULL) {
fprintf(fp_log_file, "Mac Addr : %s\trssi: %d \tsnr: %d\n", mac_addr, rssi, snr);
}
return 0;
}

Expand Down
8 changes: 8 additions & 0 deletions package/host/src/nrc/Kconfig
@@ -0,0 +1,8 @@

config NRC7292
tristate "Newracom 802.11ah Wi-Fi halow driver (NRC7292)"
depends on MAC80211
depends on SPI
---help---
The Host Driver for Newracom 802.11ah Wi-Fi halow device (NRC7292)

0 comments on commit c59ce40

Please sign in to comment.