Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DT Overlay Functionality not available after reboot #100

Closed
greenbreakfast opened this issue Jun 10, 2024 · 3 comments
Closed

DT Overlay Functionality not available after reboot #100

greenbreakfast opened this issue Jun 10, 2024 · 3 comments
Labels

Comments

@greenbreakfast
Copy link
Contributor

greenbreakfast commented Jun 10, 2024

What package does this bug affect?

onion-dt-overlay-sw-spi and onion-dt-overlay-w1-gpio in the openwrt-23.05 branch

And most likely in openwrt-22.03 branch as well
EDIT: tested on openwrt-22.03 based firmware and did not find the same issue. See comment below for details.

Describe the bug

The functionality added by installing Device Tree Overlay packages is only available until the device is powered off or rebooted.
Once the device reboots, the DT overlay seems to still be in place, but the functionality is not available. That is the additional software SPI bus and the one-wire master are not available.

To Reproduce

Used the OnionIoT/omega2-fw-tester to test this quickly

Steps to reproduce the behavior:

  1. Flash the latest onion_omega2p-23.05.3-20240610.bin firmware to the device
  2. Setup wifi or otherwise connect the device to the internet
  3. On connected computer, run pytest -v test_device.py --json-config test_cases/400_opkg_update.json test_cases/600_dt_overlay.json, observe all tests pass
Screenshot 2024-06-10 at 3 52 00 PM
  1. Reboot the Omega2 device
  2. On connected computer, run pytest -v test_device.py --json-config test_cases/600_dt_overlay.json, observe the tests that check functionality fail:
Screenshot 2024-06-10 at 4 02 01 PM

Expected behavior

Expecting Software SPI and One-Wire Master to be available and work properly after a reboot or power off

Screenshots or Console output

After initial installation of the dt overlay packages (step 3 above), tested manually on command line and both SW SPI and One-Wire worked. Could even read temperature data from a connected sensor:
Screenshot 2024-06-10 at 3 51 50 PM

After rebooting the device (step 4 above), tested manually on command line again. No SW SPI device available, not one-wire master device available:
image

Version Info (please complete the following information):

  • Firmware version: 23.05.3-20240610
  • Package name: onion-dt-overlay-sw-spi and onion-dt-overlay-w1-gpio
  • Package Version: 1.0-5
  • Repo branch (if applicable) openwrt-23.05 branch
@greenbreakfast
Copy link
Contributor Author

Tested on 22.03.5-20240517 firmware and did not have the same issue. So this issue is only present on the 23.05.3 firmware!

After fresh fw install:
image

After reboot:
image

@YevheniiOnishchenkoLemberg
Copy link
Collaborator

YevheniiOnishchenkoLemberg commented Jun 20, 2024

Fixed in PR "Fix dt-overlay patch #35". Results below are for initial boot and after pressing the reset button. The failed "boot" test case indicated actual reset was happening:

Image

Image

@greenbreakfast
Copy link
Contributor Author

greenbreakfast commented Jul 26, 2024

Confirming this issue is resolved in the 23.05.3-20240724 release.

Successfully tested on 23.05.3-20240724 firmware from 23.05.3-20240724 release

Followed test procedure from original post
After fresh fw install, dt-overlay installation and functionality checks pass:
Screenshot 2024-07-26 at 11 01 52 AM

After reboot, dt-overlay functionality checks pass:
Screenshot 2024-07-26 at 11 06 41 AM

Also tested one-wire device after reboot, works as expected. Just noticed a few ghost one-wire slave devices, but that can be investigated at a later date:
EDIT: no ghost devices are detected if one-wire master pin is not left floating
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants