logo elektroda
logo elektroda
X
logo elektroda

OpenBeken Flag 13: How to View Real-Time GPIO States for Unconfigured Pins?

divadiow 597 10
Best answers

How can I view real-time logic levels for unconfigured GPIO pins in OpenBeken when the PIN States list stops at P28?

Use Flag 13 to show the actual logic level of unconfigured pins, but the PIN States list can be capped by a platform-specific GPIO limit, which is why it stopped at P28 here. The fix is in the HTTP handler code in `src/httpserver/http_fns.c`, where the platform switch logic needs to be handled and the hardcoded `29` replaced with `PLATFORM_GPIO_MAX`. A proposed commit was linked for this change, and it was confirmed to work on BK7231N after updating the limit. [#21708014] [#21708024] [#21708031] [#21708040] [#21708089] [#21708115]
AI summary based on the discussion. May contain errors.
ADVERTISEMENT
This content has been translated flag-pl » flag-en View the original version here
  • Flag 13 reveals unconfigured button pins in real time

    #1 21708009
    divadiow
    Level 38  
    Posts: 5179
    Help: 443
    Rate: 908
    I forget how useful Flag 13 - [HTTP] Show actual PIN logic level for unconfigured pins is for finding buttons. No GPIO Dr or tracing, just push the button and watch channel state change to identify button.

    eg, this TXW cam clearly shows P08 and P12 as being the two buttons. The trouble is that PIN States list seems to be capped to P28.

    animated
    Pin state list from P00 to P28 showing logic values on dark background
  • ADVERTISEMENT
  • #2 21708010
    DeDaMrAz
    Level 23  
    Posts: 620
    Help: 34
    Rate: 130
    >>21708009

    Consequence of the fast development :D flag is ambiguous to platform change and capped at BK N probably ;)
  • ADVERTISEMENT
  • #4 21708024
    DeDaMrAz
    Level 23  
    Posts: 620
    Help: 34
    Rate: 130
    divadiow wrote:
    https://github.com/divadiow/OpenBK7231T_App/b...296d740e/src/httpserver/http_fns.c#L996-L1016


    nail on the head as the saying goes :) a platform switch logic has to be implemented there as well
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #7 21708041
    DeDaMrAz
    Level 23  
    Posts: 620
    Help: 34
    Rate: 130
    Maybe and let me know if it is, focusing on flasher now and some PR's to test this weekend.

    Long absence does not help :)
  • #8 21708043
    divadiow
    Level 38  
    Posts: 5179
    Help: 443
    Rate: 908
    nope. I'll fiddle
    OpenBeken Flag 13: How to View Real-Time GPIO States for Unconfigured Pins?
  • #9 21708050
    DeDaMrAz
    Level 23  
    Posts: 620
    Help: 34
    Rate: 130
    Btw you two @insmod and @divadiow are (more than) welcome this weekend to test these two PR's

    https://github.com/openshwprojects/OpenBK7231T_App/pull/1795

    https://github.com/openshwprojects/OpenBK7231T_App/pull/1792

    We need to look through some PR's and clear as much as possible, issues as well. We overextended a bit so just to clean house.
  • #11 21708115
    divadiow
    Level 38  
    Posts: 5179
    Help: 443
    Rate: 908
    yay
    OpenBeken Flag 13: How to View Real-Time GPIO States for Unconfigured Pins?

    Added after 6 [minutes]:

    confirming BK7231N
    OpenBeken Flag 13: How to View Real-Time GPIO States for Unconfigured Pins?

    Added after 3 [minutes]:

    >>21708040

    missed this. thanks

Topic summary

✨ The discussion centers on the OpenBeken Flag 13 feature, which enables real-time viewing of GPIO pin logic levels for unconfigured pins via HTTP, facilitating button identification without GPIO tracing. The original issue was that the PIN States display was capped at pin P28, limiting visibility for pins like P08 and P12 used as buttons on a TXW camera. Contributors identified that the limitation stemmed from platform-specific constraints, particularly on BK7231N devices, and suggested implementing platform-aware logic to extend the pin state reporting. Code references and commits were shared to address this, including replacing hardcoded pin limits with the PLATFORM_GPIO_MAX constant. Testing and pull requests were proposed to validate these changes. The solution involves modifying the HTTP server code to dynamically handle GPIO pin counts per platform, thereby restoring full visibility of all GPIO states for unconfigured pins in real time.
AI summary based on the discussion. May contain errors.
ADVERTISEMENT