onomondo / nrf-softsim Goto Github PK
View Code? Open in Web Editor NEWManifest repo for integrating SoftSIM and nrf-sdk
Manifest repo for integrating SoftSIM and nrf-sdk
Tried with the SLM app in NCS, when below is configured, project cannot run.
CONFIG_SOFTSIM_AUTO_INIT=n
CONFIG_SETTINGS=y
CONFIG_SETTINGS_FCB=y
CONFIG_FCB=y
API nrf_softsim_init()
is called after settings_subsys_init()
.
Any special attention is required to use Settings?
Hi,
we are currently encountering a problem where when issuing a CFUN=0
after a CFUN=1
the application core will reboot due to a crash in the DEINIT
switch case, in particular while executing the deinit_fs
function.
To reproduce the bug, checkout the branch https://github.com/MirkoCovizzi/nrf-softsim/tree/deinit-crash, point the manifest to west.yml
and do a west update
.
This will pull the NCS branch https://github.com/MirkoCovizzi/sdk-nrf/tree/deinit-crash that contains the application (currently WIP) https://github.com/MirkoCovizzi/sdk-nrf/tree/deinit-crash/applications/serial_lte_modem_softsim.
To build the application:
applications/serial_lte_modem_softsim
west build -b nrf9160dk_nrf9160_ns -- -DOVERLAY_CONFIG=overlay-onomondo.conf
To test the application:
Ready
AT+CFUN=1
AT+CFUN=0
Ready
To show that the deinit_fs
function is the culprit, checkout https://github.com/MirkoCovizzi/nrf-softsim/tree/deinit-no-crash and repeat the steps above.
Observe that after executing the same steps, the application will not reboot due to a crash (will not output the string Ready
) after the specific sequence of AT commands.
The configuration option CONFIG_NRF_MODEM_LIB_SYS_INIT is officially deprecated as of nRF Connect SDK v2.4.0
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/nrf/releases/release-notes-2.4.0.html#modem-libraries
The newest SDK version (2.5.2) is stating a new modem initialisation flow:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.2/nrf/libraries/modem/nrf_modem_lib/nrf_modem_lib_wrapper.html#library-wrapper
The configuration used for the SoftSIM samples are still part of the official nRF Connect SDK source code and therefore still allowing the modem to correctly initialise.
https://github.com/nrfconnect/sdk-nrf/blob/v2.5.0/lib/nrf_modem_lib/nrf_modem_lib.c#L214-L217
But we need to re-visit these functions and make sure that the samples are future proof before the support for the required Kconfig options are indeed deprecated.
The custom NVS caching implementation in f_cache.c
is potentially redundant, as the Zephyr NVS filesystem has built-in caching functionality, CONFIG_NVS_LOOKUP_CACHE
.
The caching mechanism makes lookup times linear, instead of needing to walk the linked list.
NVS additionally already performs duplicate data checking to reduce writes:
https://github.com/zephyrproject-rtos/zephyr/blob/f9051d626d7607f1e0e18f5bafd2acb3a199ac12/subsys/fs/nvs/nvs.c#L1078-L1083
A major advantage of using the built-in caching is that there is no need to buffer entries in RAM, as the cache contains a pointer directly to the allocated address in the NVS filesystem.
This is just a suggestion, as I can't know if there is additional de-duplication occurring inside libstorage.a
based on the _b_dirty
field.
There are several examples of functions that are not properly namespaced to this repo, which are almost certain to cause issues for someone in the future with an ecosystem as large as Zephyrs'. By this, I mean the name is so generic that other libraries and application could easily write code with the same name.
In the same vein, there are a few internal variables without a static
qualifier which could cause compilation issues for users.
Namespace issues:
aes_128_encrypt_block
read_nvs_to_cache
fs_is_initialized
init_fs
deinit_fs
port_*
hex_to_uint8
hex_string_to_bytes
decode_profile
Static issues:
shared_buffer
softsim_work_q
ctx
storage_path
As the comment says, 10000 is an excessive value for SOFTSIM_STACK_SIZE
, over 5% of the total RAM available to an application (ignoring the heap used for message passing).
Regardless of whether this value can be optimised at this point, the value should be swapped to a Kconfig symbol so that the value can be updated as needed by users.
Hello,
i'm reaching out like this because all inquires though onomondo email are met with deaf ear.
We are ready to integrate the Onomondo Softsim and we are willing to make the thing work on our own also to contribute into this repository. All i need is your initial code for LittleFS backend you told you have and also the script that created the provisioning template that so we can retrofit older devices that do not have the provision hex included.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.