According to the API, navigator.platform is unreliable and not recommended
for runtime detection. As our platforms are ARM based, we were using it
to get the platform and grep for a literal arm. That fails for example
when using chromium browser on the ConnectCore devices, as it is reporting
'Linux x86_64' even running on an arm64 device.
Instead use the already implemented is_local_access function to detect
whether the browser is running locally in the target.
https://onedigi.atlassian.net/browse/DEL-9838
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Avoid deleting the original "swu" firmware file during the update process,
especially in dual-boot systems.
Previously, the file could be removed from the source path even
in the event of an exception. This change ensures the original file
remains intact regardless of update outcome.
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Fix an issue where the fw_printenv command output includes a trailing newline,
which could lead to incorrect string comparisons. The output is now stripped to
ensure consistent and accurate evaluation.
Example before fix:
>>> res = exec_cmd("fw_printenv -n dualboot")
>>> res
(0, 'yes\n')
https://onedigi.atlassian.net/browse/DEL-9718
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Replace incorrect NULL pointer checks on button_ctrl and led_ctrl with
string emptiness checks, since these are fixed-size character arrays and
never NULL.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
* Initialize 'iface' and validate it before use to avoid undefined
behavior.
* Move 'deffilter' to global static scope in can-recv-example to prevent
stack address escape.
* Fix incorrect retry count in failure message in can-send-example.
No functional changes.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
With _TIME_BITS=64, tv_sec and tv_usec are long long integer types,
so update %ld to %llu and cast to (unsigned long long) to fix timestamp
formatting.
https://onedigi.atlassian.net/browse/DEL-9638
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Commit 99f1425340 ("image-buildinfo: Improve and extend to SDK coverage too")
in the Poky layer changes the name of the default build information file from
"build" to "buildinfo", so this commit reflects this change by adapting the
path to obtain the build information.
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This href causes issues when running the demo on a target with WebKit's
non-HTTP(S) process swap enabled. When clicking the "collapse" button, the
sidebar collapses, but the page is loaded again due to WebKit's process swap,
and the sidebar reverts back to its original state.
Removing the href fixes this, and the sidebar collapse functionality still
works as expected.
https://onedigi.atlassian.net/browse/DEL-9498
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
- When launching an NPU demo, display a black screen below the loading spin to avoid
the transparent window of some demos to display part of the ConnectCore application
in the background.
- Create a polling mechanism after an NPU demo is launched to check when the demo is
closed in order to hide the black screen and the loading spin.
Signed-off-by: David Escalona <david.escalona@digi.com>
This is required so that we can show an overlay black screen over the full application
when an NPU demo is launched.
Signed-off-by: David Escalona <david.escalona@digi.com>
While on it, add a missing entry for the cc93 in the 'network.html' file.
https://onedigi.atlassian.net/browse/CCS-8
Signed-off-by: David Escalona <david.escalona@digi.com>
The position of the LED on the dashboard wasn't matching the real position of
the LED on the DVK
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Most of device boards have blue PCBs, but there are some products with green PCBs. In these cases,
the green panels have very poor contrast, so the color needs to be changed dynamically. This commit
adds a mechanism to automatically change the color of the dashboard panels based on the new device
property "PCB_COLOR".
https://onedigi.atlassian.net/browse/DEL-8719
Signed-off-by: David Escalona <david.escalona@digi.com>
This commit increases the number of seconds between incremental values so, the
sample uploads 10 samples per minute.
While on it, fix a typo.
Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
By default, when retrieving the Bluetooth interface to use in the demo, the service
first tries with the native Bluetooth adapter and, in the case it fails, it looks
for connected XBee devices with Bluetooth capabilities. This is causing the demo to
lock the XBee port if the native Bluetooth interface is not present or fails to
initialize. Avoid this behavior by limiting the Bluetooth service to use only
the native Bluetooth interface for this demo.
Signed-off-by: David Escalona <david.escalona@digi.com>