Commit Graph

73 Commits

Author SHA1 Message Date
Javier Viguera 876b1d55fc connectcore-demo-example: use is_local_access for local run detection
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>
2025-11-12 17:29:44 +01:00
Javier Viguera 79bd5559bf connectcore-demo-example: add support for ccimx95-dvk
https://onedigi.atlassian.net/browse/DEL-9809

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2025-11-11 17:56:54 +01:00
Javier Viguera 420bed0ba3 connectcore-demo-example: fix ccimx8x-sbc audio component position
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2025-11-11 17:50:04 +01:00
Javier Viguera 90ffa6a9c8 connectcore-demo-example: fix shown ethernet MAC address format
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
2025-11-11 17:50:04 +01:00
Isaac Hermida 4250a5e098 connectcore-demo-example: preserve "swu" file in update_firmware
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>
2025-07-14 15:50:42 +02:00
Isaac Hermida 14911565e8 connectcore-demo-example: improve is_dual_system()
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>
2025-07-14 15:48:33 +02:00
Isaac Hermida 2a9f9933cf connectcore-demo-example: update the root home path to DEY-5.0 default
Home root path changed to '/root' on DEY-5.0.

https://onedigi.atlassian.net/browse/DEL-9718

Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
2025-07-14 15:47:39 +02:00
Arturo Buzarra e6b2ef0fbf connectcore-demo-example: fix build info filename from "build" to "buildinfo"
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>
2025-04-29 16:53:10 +02:00
Gabriel Valcazar 453479e548 connectcore-demo-example: remove "#top" href from sidebar "collapse" button
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>
2025-04-08 12:25:46 +02:00
David Escalona 46100efac4 connectcore-demo-example: improve npu demos launch mechanism
- 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>
2024-09-19 16:50:04 +02:00
David Escalona 893bd689c0 connectcore-demo-example: avoid pjax to cache npu page and force redraw
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>
2024-09-19 16:49:34 +02:00
David Escalona 09d0f7d178 connectcore-demo-example: update NPU demos links for CCMP25
https://onedigi.atlassian.net/browse/CCS-10

Signed-off-by: David Escalona <david.escalona@digi.com>
2024-09-18 10:43:50 +02:00
David Escalona 5113d8e340 connectcore-demo-example: add NPU section to display and run NPU demos
https://onedigi.atlassian.net/browse/CCS-10

Signed-off-by: David Escalona <david.escalona@digi.com>
2024-09-10 18:11:29 +02:00
David Escalona b71aa2e72b connectcore-demo-example: generalize code to read platform ID
Signed-off-by: David Escalona <david.escalona@digi.com>
2024-09-06 09:59:58 +02:00
David Escalona a1ecbfb119 connectcore-demo-example: add support for the ConnectCore 91
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>
2024-08-26 10:22:58 +02:00
Gabriel Valcazar 44351d357d ccmp25-dvk: fix LED area position
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>
2024-08-01 11:31:49 +02:00
Francisco Gil 0b1f362a8d ccdemo: update links and fix a typo
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
2024-07-30 11:28:41 +02:00
Arturo Buzarra 37a0ef6664 connectcore-demo-example: enable audio support to ccimx8x-sbc-pro
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2024-07-25 12:18:07 +02:00
Arturo Buzarra 10570b5ebc connectcore-demo-example: network: remove duplicate entries for eth1
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2024-07-25 12:18:07 +02:00
Arturo Buzarra 5d801b0386 connectcore-demo-example: add support to a third ethernet interface
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2024-07-25 12:18:07 +02:00
Arturo Buzarra a326832902 ccmp25: add support for the ConnectCore MP2 platform
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2024-07-22 23:09:55 +02:00
David Escalona 3aa9894251 connectcore-demo-example: fix set volume command for CC6 devices
https://onedigi.atlassian.net/browse/DEL-8719

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-11-09 12:03:34 +01:00
David Escalona 0d599e8de9 connectcore-demo-example: add support for 'ccimx6sbc' and 'ccimx6qpsbc' platforms
https://onedigi.atlassian.net/browse/DEL-8719

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-11-09 12:03:30 +01:00
David Escalona cf8b2b0412 connectcore-demo-example: dashboard: add a mechanism to determine the color of the panels
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>
2023-11-09 12:03:25 +01:00
Tatiana Leon 323f53cf56 connectcore-demo-example: update dashboard refresh timeout
Increase the dashboard refresh timeout to be 15s.
Uploading every 5s is too much for some platforms, ConnectCore MP15, with really
high CPU load.

https://onedigi.atlassian.net/browse/DEL-8508
https://onedigi.atlassian.net/browse/DEL-8509

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-05-15 15:06:44 +02:00
David Escalona 148f0dc99c connectcore-demo-example: limit demo to use only native BT adapter
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>
2023-03-27 14:05:06 +02:00
David Escalona 352fabc24d connectcore-demo-example: enable audio in ccimx8m-mini and ccimx8m-nano
Signed-off-by: David Escalona <david.escalona@digi.com>
2023-03-08 11:14:22 +01:00
Tatiana Leon 81a057207e connectcore-demo-example: add support for ccmp133-dvk in the network page
ConnectCore MP13 DVK was not added to the network page when it was created
(commit 4f9717a2d3)

This commit is similar to 252c3544cb.

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-03-08 11:14:22 +01:00
Tatiana Leon 17ec656b71 connectcore-demo-example: reduce the text in the dashboard labels
Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-02-15 13:10:16 +01:00
Tatiana Leon aaf09f4a9c connectcore-demo-example: fix get storage size in demo server
File '/proc/mtd' may exist in the file system although with no data. So, first
check the emmc file '/sys/class/mmc_host/mmc0/mmc0:0001/block/mmcblk0/size'.

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-02-10 14:19:43 +01:00
David Escalona 6ff808bc80 connectcore-demo-example: add support for ccimx93-dvk board
Signed-off-by: David Escalona <david.escalona@digi.com>
2023-02-08 18:07:20 +01:00
David Escalona cf5383ab3b connectcore-demo-example: adjust BLE payload size
Remove the sleep time between write operations in the BLE service. The communication
problems observed are more related with the size of the payload written rather than
the timing between frames.

Signed-off-by: David Escalona <david.escalona@digi.com>
2023-02-08 18:07:03 +01:00
Tatiana Leon 8a81829e7b connectcore-demo-example: add BLE support to the demo
Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
Signed-off-by: David Escalona <david.escalona@digi.com>
2023-02-08 11:02:04 +01:00
Tatiana Leon 2b39907ddf connectcore-demo-example: ccmp1: remove multimedia section
Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-02-06 18:25:28 +01:00
Tatiana Leon 1bb220793e connectcore-demo-example: set Digi logo link to 'index.html'
The original destination ('/') opens the root of the file system to browse.

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2023-02-06 18:24:30 +01:00
Arturo Buzarra f6585852ae connectcore-demo-example: reduce sample audio file size
This commit replaces the sample audio file for a short version with a lowest
bitrate to reduce the size.

https://onedigi.atlassian.net/browse/DEL-8335

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-02-01 16:25:42 +01:00
Arturo Buzarra 3a8f512859 connectcore-demo-example: reduce image size for ccmp1 platforms
This commit reduce the size of the ccmp1 platform images to save space on disk.

https://onedigi.atlassian.net/browse/DEL-8335

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-01-31 15:38:54 +01:00
Arturo Buzarra 5234e455c4 connectcore-demo-example: rename platform image names
This commit renames the platform image files to match with the yocto machine
names, so non-platform image files can be removed and the root file system size
is reduced.

https://onedigi.atlassian.net/browse/DEL-8335

Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
2023-01-31 15:38:17 +01:00
Tatiana Leon d9e0146e41 connectcore-demo-example: fix firmware update from local web
Use the same command independently of the boot system.
Fix the way dual boot is detected to use 'dualboot' U-Boot variable.

Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2022-11-24 16:55:21 +01:00
Tatiana Leon cab26c39e7 connectcore-demo-example: fix possible exception if video file is empty
Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
2022-11-24 16:55:21 +01:00
David Escalona 4f9717a2d3 connectcore-demo-example: add network configuration section
Signed-off-by: David Escalona <david.escalona@digi.com>
2022-10-19 18:12:38 +02:00
David Escalona 14f849fb8d connectcore-demo-example: use 'libdigiapix' API for network and bluetooth
Signed-off-by: David Escalona <david.escalona@digi.com>
2022-10-19 13:48:26 +02:00
David Escalona fe23aafc92 connectcore-demo-example: generalize constants and styles for configuration
Signed-off-by: David Escalona <david.escalona@digi.com>
2022-10-18 10:24:29 +02:00
David Escalona 4db2bb783b connectcore-demo-example: ccmp157: enable audio panel
Signed-off-by: David Escalona <david.escalona@digi.com>
2022-10-11 17:02:35 +02:00
David Escalona eca31deca4 connectcore-demo-example: ccimx6ulsbc: enable audio panel
Signed-off-by: David Escalona <david.escalona@digi.com>
2022-10-06 09:45:19 +02:00
David Escalona a8f6d228e6 connectcore-demo-example: add play and stop music feature
Signed-off-by: David Escalona <david.escalona@digi.com>
2022-10-06 09:45:19 +02:00
David Escalona 58c06b00e7 connectcore-demo-example: fix signal handling for DEY-4.0
With the update to DEY-4.0, the signal handling in the "demoserver.py" Python script
stopped working. The call to "event.wait()" caused the application to stop receiving
signals. This commit fixes the issue by replacing the event lock mechanism with the
"signal.sigwait()" call, which stops the thread execution until any specified signal
is received.

Signed-off-by: David Escalona <david.escalona@digi.com>
2022-10-06 09:45:01 +02:00
David Escalona 0e931c1826 connectcore-demo-example: general fixes
- Improve error messages.
- Fix resizing issues with dashboard image.
- Add generic message when video resolution cannot be read.
- Fix change volume action and include a confirmation message.
- Add confirmation message when LED state is changed.
- Remove execution bit from images.

Signed-off-by: David Escalona <david.escalona@digi.com>
2022-10-05 11:32:29 +02:00
David Escalona 252c3544cb connectcore-demo-example: add support for ccmp133-dvk board
Signed-off-by: David Escalona <david.escalona@digi.com>
2022-09-29 11:40:40 +02:00
David Escalona be0c37a04e connectcore-demo-example: fix HDMI video resolution read for ccmp devices
Signed-off-by: David Escalona <david.escalona@digi.com>
2022-07-26 11:42:48 +02:00