Skip to content

Commit

Permalink
NRC7394 Standalone SDK v1.0 release
Browse files Browse the repository at this point in the history
- New features
    * AT-CMD features
      o WPA3-SAE (v1.0)
      o OWE (v1.0)
      o FOTA (v1.0)
      o SoftAP (v1.0)
      o Power save TIM mode (v1.0)
      o Power save non-TIM mode (v1.0)
    * Regulation features
      o Duty cycle (v1.0)
    * System features
      o Power save – deep sleep (v1.0)
      o WDT/Recovery (v1.0)
      o UART/UART-HFC/HSPI interface (v1.0)
    * Sample applications
      o Refer to UG-7394-004-Standalone SDK document (v1.0)
        - Wi-Fi: Wi-Fi state, WPS-PBC, Ethernet bridge, SoftAP, FOTA
        - Protocol: TCP/UDP
        - Power save
        - Peripheral: GPIO, UART, ADC, NVS, PWM, sensors, etc.
        - Middleware: XML, JSON, AWS, MQTT, HTTP
        - Scenario: PS schedule, UART data handling
- Known Issues
    * The initial connection time for WPA3-SAE/OWE can be quite lengthy (> 15 seconds) due to the substantial computational load required by software for large number operations.
    * The SoftAP disable/enable sequence on the standalone mode is not supported.
    * The issue of deauthentication frame delivery failure can occur between PMF-enabled NRC7394 and PMF-enabled NRC7292 devices.
    * During deep sleep, TCP connections are not maintained. Upon waking up, a new TCP connection must be established.
    * The AT-CMD throughput over HSPI interface is slightly lower than NRC7292 device.
  • Loading branch information
newracom committed Aug 7, 2023
1 parent 8da741a commit 011157b
Show file tree
Hide file tree
Showing 4,612 changed files with 1,481,716 additions and 2 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
# nrc7394_sdk
NRC7394 Standalone SDK Package
# NRC7394 Standalone SDK Package

## Notice

> **Note**
> The NRC7394 software package v1.0 includes an upgraded data structure for calibration and sysconfig. Therefore, to calibrate NRC7394 EVK, the v3.3.0 (Test Version 3.2) calibration tool (MFGT) should be used, and the EVK should be run on the NRC7394 software package v1.0 after it has been calibrated with the v3.3.0 (Test Version 3.2) calibration tool (MFGT). You can download this tool from the partner's FTP site.
### Release roadmap
- v1.0 (2023.08.07)

### Latest release
- [NRC7394_Standalone_SDK_v1.0](https://github.com/newracom/nrc7394_sdk/releases/tag/v1.0)

### Release package contents
- NRC7394 standalone SDK package for global regulatory domains

## NRC7394 Standalone SDK User Guide
### Get NRC7394 Standalone SDK Package
NRC7394 Standalone SDK package is provided in this repository. Please use the following git command to get it.
```
cd ~/
git clone https://github.com/newracom/nrc7394_sdk.git
```

### Get the detailed user guide
Please refer to [UG-7394-004-Standalone SDK.pdf](https://github.com/newracom/nrc7394_sdk/blob/master/package/doc/UG-7394-004-Standalone%20SDK.pdf) in doc directory.
40 changes: 40 additions & 0 deletions package/ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
*******************************************************************
*
* ChangeLog : SW_SDK-NRC7394
*
*******************************************************************

[2023-08-07]
Change summary for version 1.0:

New features

* AT-CMD features
o WPA3-SAE (v1.0)
o OWE (v1.0)
o FOTA (v1.0)
o SoftAP (v1.0)
o Power save TIM mode (v1.0)
o Power save non-TIM mode (v1.0)
* Regulation features
o Duty cycle (v1.0)
* System features
o Power save – deep sleep (v1.0)
o WDT/Recovery (v1.0)
o UART/UART-HFC/HSPI interface (v1.0)
* Sample applications
o Refer to UG-7394-004-Standalone SDK document (v1.0)
- Wi-Fi: Wi-Fi state, WPS-PBC, Ethernet bridge, SoftAP, FOTA
- Protocol: TCP/UDP
- Power save
- Peripheral: GPIO, UART, ADC, NVS, PWM, sensors, etc.
- Middleware: XML, JSON, AWS, MQTT, HTTP
- Scenario: PS schedule, UART data handling

Known Issues

* The initial connection time for WPA3-SAE/OWE can be quite lengthy (> 15 seconds) due to the substantial computational load required by software for large number operations.
* The SoftAP disable/enable sequence on the standalone mode is not supported.
* The issue of deauthentication frame delivery failure can occur between PMF-enabled NRC7394 and PMF-enabled NRC7292 devices.
* During deep sleep, TCP connections are not maintained. Upon waking up, a new TCP connection must be established.
* The AT-CMD throughput over HSPI interface is slightly lower than NRC7292 device.
167 changes: 167 additions & 0 deletions package/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
PREFIX = make -j16 -f make/Makefile
FILENAME = .build-target
USERMAKE = makefile.me
FUNCMAKE = makefile.func
PARAM =

.PHONY : all lib bdf

-include $(FILENAME)
ifneq ($(ALIAS), )
PARAM := ALIAS=$(ALIAS) $(PARAM)
endif

split = $(word $2, $(subst +, , $1))
param = $(strip $(subst target=$(target), , $(MAKEFLAGS)))

# UCODE PARAM
ifneq ($(MAKEFILE), )
USYSTEM := $(word 1, $(subst ., ,$(MAKEFILE)))
UTARGET := $(word 2, $(subst ., ,$(MAKEFILE)))
UCODEBIN := ./out/$(USYSTEM)/ucode/$(USYSTEM)_ucode.bin
UCODEHDR := ./system/$(USYSTEM)/ucode.h
#UCODE ALIAS (cm0)
ifneq ($(ALIAS), )
ifeq ($(UTARGET), $(filter $(UTARGET),standalone))
UPARAM := ALIAS=$(ALIAS)+pscb
else
UPARAM := ALIAS=$(ALIAS)
endif
else
ifeq ($(UTARGET), $(filter $(UTARGET),standalone))
UPARAM := ALIAS=pscb
endif
endif
UMAKEFILE := $(USYSTEM).ucode
#remove lib in ALIAS for UCODE Build
UPARAM := $(subst lib,,$(UPARAM))
endif

ifneq ($(MAKEFILE), )
SYSTEM := $(word 1, $(subst ., ,$(MAKEFILE)))
endif

ifneq ($(MAKEFILE), )
BLSYSTEM := $(word 1, $(subst ., ,$(MAKEFILE)))
BLTARGET := $(word 2, $(subst ., ,$(MAKEFILE)))
BLCODEBIN := ./out/$(BLSYSTEM)/boot/$(BLSYSTEM)_boot.bin
BLCODEHDR := ./system/$(BLSYSTEM)/second_bl.h
ifneq ($(ALIAS), )
BLPARAM := ALIAS=$(ALIAS)
endif
BLMAKEFILE := $(BLSYSTEM).boot
BLPARAM := $(subst xip,,$(BLPARAM))
endif

# Extract the filename using pattern matching and substitution
BDF_INPUT := $(lastword $(filter %.dat,$(subst +, ,$(ALIAS))))
BDFFOLDER := ./bdf
BDFNAME := bd.dat
BDFHEADERNAME := bd.h
ifneq ($(BDF_INPUT), )
BDFSYSDATA := $(BDFFOLDER)/$(SYSTEM)/$(BDF_INPUT)
else
BDFSYSDATA := $(BDFFOLDER)/$(SYSTEM)/$(SYSTEM)_$(BDFNAME)
endif
BDFDATA := $(BDFFOLDER)/$(BDFNAME)
BDFHDR := $(BDFFOLDER)/$(BDFHEADERNAME)

ifeq ($(UTARGET), $(filter $(UTARGET),standalone))
$(info =================================================)
$(info BDFSYSDATA : $(BDFSYSDATA))
$(info =================================================)
endif

######### BUILD ########################################################
all: ucode bdf second_bl
$(PREFIX).$(MAKEFILE) $(PARAM)
lib:
$(PREFIX).$(MAKEFILE) $(PARAM) lib

pkg:
$(PREFIX).$(MAKEFILE) $(PARAM) pkg

clean: ucodeclean second_blclean
$(PREFIX).$(MAKEFILE) $(PARAM) ALIAS=$(ALIAS) clean
@rm -f $(BDFHDR)
@rm -f $(BDFDATA)

distclean: ucodeclean second_blclean
$(PREFIX).$(MAKEFILE) clean
@rm $(FILENAME)

select::
@echo "MAKEFILE = $(call split, $(target), 1)" > $(FILENAME)
ifneq ($(call split, $(target), 2), )
@echo -n "ALIAS = $(call split, $(target), 2)" >> $(FILENAME)
endif
ifneq ($(call split, $(target), 3), )
@echo -n "+$(call split, $(target), 3)" >> $(FILENAME)
endif
ifneq ($(call split, $(target), 4), )
@echo -n "+$(call split, $(target), 4)" >> $(FILENAME)
endif
ifneq ($(call split, $(target), 5), )
@echo -n "+$(call split, $(target), 5)" >> $(FILENAME)
endif
@echo "" >> $(FILENAME)
@echo "PARAM := $(param)" >> $(FILENAME)

ucode:
ifeq ($(USYSTEM), $(filter $(USYSTEM),nrc7292 nrc7393 nrc7394 nrc4791))
ifeq ($(UTARGET), $(filter $(UTARGET),cspi standalone))
ifeq ($(findstring noucode, $(ALIAS)), )
ifeq ($(findstring halow, $(ALIAS)), )
$(PREFIX).$(UMAKEFILE) $(UPARAM)
@xxd --include $(UCODEBIN) > $(UCODEHDR)
@sed -i '1i const' $(UCODEHDR)
endif
endif
endif
endif

ucodeclean:
ifeq ($(USYSTEM), $(filter $(USYSTEM),nrc7292 nrc7393 nrc7394 nrc4791))
ifeq ($(UTARGET), $(filter $(UTARGET),cspi standalone))
ifeq ($(findstring noucode, $(ALIAS)), )
ifeq ($(findstring halow, $(ALIAS)), )
$(PREFIX).$(UMAKEFILE) $(UPARAM) clean
@rm -f $(UCODEHDR)
endif
endif
endif
endif

bdf:
@echo "BDFILE = $(BDFSYSDATA)"
@cp -f $(BDFSYSDATA) $(BDFDATA)
@xxd --include $(BDFDATA) > $(BDFHDR)
@sed -i '1i const' $(BDFHDR)
@sed -i '/unsigned int/i const' $(BDFHDR)
@sed -i '1i #ifndef __BD_H__' $(BDFHDR)
@sed -i '2i #define __BD_H__' $(BDFHDR)
@echo "#endif" >> $(BDFHDR)

second_bl:
ifeq ($(BLSYSTEM), $(filter $(BLSYSTEM),nrc7292 nrc7393 nrc7394 nrc5292))
ifeq ($(BLTARGET), $(filter $(BLTARGET),boot))
ifneq ($(findstring xip, $(ALIAS)), )
$(PREFIX).$(BLMAKEFILE) $(BLPARAM)
@xxd --include $(BLCODEBIN) > $(BLCODEHDR)
@sed -i '1i const' $(BLCODEHDR)
endif
endif
endif

second_blclean:
ifeq ($(BLSYSTEM), $(filter $(BLSYSTEM),nrc7292 nrc7393 nrc7394 nrc5292))
ifeq ($(BLTARGET), $(filter $(BLTARGET),boot))
ifneq ($(findstring xip, $(ALIAS)), )
$(PREFIX).$(BLMAKEFILE) $(BLPARAM) clean
@rm -f $(BLCODEHDR)
endif
endif
endif


##############################################################################################
Binary file not shown.
4 changes: 4 additions & 0 deletions package/VERSION-SDK
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
VERSION_MAJOR 1
VERSION_MINOR 0
VERSION_REVISION 0

17 changes: 17 additions & 0 deletions package/atcmd/host/python-http-server/Run-server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
#

case $1 in
http)
# python -m SimpleHTTPServer 8080
python3 -m http.server 8080
;;

https)
python3 python/https-server.py
;;

*)
echo "Usage: $0 <http|https>"
esac

82 changes: 82 additions & 0 deletions package/atcmd/host/python-http-server/Update-fota-info.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#!/bin/sh
#

CHIP_NAME=nrc7292

SDK_VER="10.10.10"
CMD_VER="10.10.10"

FOTA_INFO_FILE="fota.json"

#############################################################

case $1 in
7292|7394)
CHIP_NAME=nrc$1
;;

clean)
rm -vf $FOTA_INFO_FILE
rm -vf *.bin
exit 0
;;

*)
echo "Usage: $0 {7292|7394|clean}"
exit 0
;;
esac

if [ -z $CHIP_NAME ]; then
echo "no chip name"
exit 1
fi

HSPI_BIN="$CHIP_NAME""_standalone_xip_ATCMD_HSPI.bin"
UART_BIN="$CHIP_NAME""_standalone_xip_ATCMD_UART.bin"
UART_HFC_BIN="$CHIP_NAME""_standalone_xip_ATCMD_UART_HFC.bin"

if [ -f $HSPI_BIN ]; then
HSPI_CRC=$(python/crc.py $HSPI_BIN)
else
echo "No such file: $HSPI_BIN"
fi

if [ -f $UART_BIN ]; then
UART_CRC=$(python/crc.py $UART_BIN)
else
echo "No such file: $UART_BIN"
fi

if [ -f $UART_HFC_BIN ]; then
UART_HFC_CRC=$(python/crc.py $UART_HFC_BIN)
else
echo "No such file: $UART_HFC_BIN"
fi

echo
echo "[ Before ]"
cat $FOTA_INFO_FILE

rm -f $FOTA_INFO_FILE

echo "{" >> $FOTA_INFO_FILE
echo " \"AT_SDK_VER\" : \"$SDK_VER\"," >> $FOTA_INFO_FILE
echo " \"AT_CMD_VER\" : \"$CMD_VER\"," >> $FOTA_INFO_FILE
echo "" >> $FOTA_INFO_FILE
echo " \"AT_HSPI_BIN\" : \"$HSPI_BIN\"," >> $FOTA_INFO_FILE
echo " \"AT_HSPI_CRC\" : \"$HSPI_CRC\"," >> $FOTA_INFO_FILE
echo "" >> $FOTA_INFO_FILE
echo " \"AT_UART_BIN\" : \"$UART_BIN\"," >> $FOTA_INFO_FILE
echo " \"AT_UART_CRC\" : \"$UART_CRC\"," >> $FOTA_INFO_FILE
echo "" >> $FOTA_INFO_FILE
echo " \"AT_UART_HFC_BIN\" : \"$UART_HFC_BIN\"," >> $FOTA_INFO_FILE
echo " \"AT_UART_HFC_CRC\" : \"$UART_HFC_CRC\"" >> $FOTA_INFO_FILE
echo "}" >> $FOTA_INFO_FILE

echo
echo "[ After ]"
cat $FOTA_INFO_FILE

echo
exit 0
26 changes: 26 additions & 0 deletions package/atcmd/host/python-http-server/python/crc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/python
#

import sys
import zlib

def unsigned32(n):
return n & 0xFFFFFFFF

def getCRC32(filename):
try:
f = open(filename, 'rb')
crc = zlib.crc32(f.read())
return unsigned32(crc)
except IOError:
print("Error: Cannot find such file.")
exit(1)

if len(sys.argv) == 1:
print("Error: There's no file name")
print("Usage:")
print(" $python crc.py <file name>")
exit(1)

print("%x" % getCRC32(sys.argv[1]))

18 changes: 18 additions & 0 deletions package/atcmd/host/python-http-server/python/https-server.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from http.server import HTTPServer, BaseHTTPRequestHandler, SimpleHTTPRequestHandler
import ssl

bind_to_address = ''
server_port = 4443
ssl_key_file = "ssl-cert/server.key"
ssl_certificate_file = "ssl-cert/server.crt"

#httpd = HTTPServer((bind_to_address, 4443), BaseHTTPRequestHandler)
httpd = HTTPServer((bind_to_address, server_port), SimpleHTTPRequestHandler)

httpd.socket = ssl.wrap_socket (httpd.socket,
keyfile=ssl_key_file,
certfile=ssl_certificate_file,
server_side=True)

print("Serving HTTP on 0.0.0.0 port 4443..")
httpd.serve_forever()
Loading

0 comments on commit 011157b

Please sign in to comment.