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

No support for Omega2 Pro i2c-exp / adc / python3 / power-dock #81

Open
t3therdev opened this issue Dec 13, 2023 · 1 comment
Open

No support for Omega2 Pro i2c-exp / adc / python3 / power-dock #81

t3therdev opened this issue Dec 13, 2023 · 1 comment
Labels

Comments

@t3therdev
Copy link

t3therdev commented Dec 13, 2023

What package does this bug affect?

i2c-exp

Describe the bug

i2c-exp is not able to be compiled on 22.03 due to a lack of support for python2. We have been working on trying to port it over, has there been any work on getting the i2c-exp drivers working for the Omega2 Pro or LTE so we can use i2c to read battery voltages and get power-dock to work?

To Reproduce

Expected behavior

Getting work power-dock, i2c-exp driver for 22.03

Screenshots or Console output

Version Info (please complete the following information):

  • Firmware version: 22.03 openwrt
  • Package name i2c-exp, power-dock
  • Repo branch (if applicable) openwrt-22.03

Additional context

@t3therdev t3therdev added the bug label Dec 13, 2023
@greenbreakfast
Copy link
Contributor

Thanks for the issue. I'll address both packages here, but in future feel free to make separate issues.

Power Dock

Reading the battery level is actually very straight-forward. It involves reading 2 GPIOs and doesn't use the I2C bus at all.
The battery level is just based on this truth table:

	GPIO 18		GPIO16		Battery level
	(level1)		(level0)
	----------------------------------------
	HIGH		LOW 		4/4 - 100%
	HIGH		HIGH		3/4 - 75%
	LOW  		HIGH		2/4 - 50%
	LOW 		LOW		1/4 - 25%

Looking back, it was 100% overkill to write a C program to do this. At this point I would recommend writing a small sh script to read the battery level. See the beta firmware documentation on GPIOs for more info.

Let me know if you need some pointers with a script

I2C Exp

Can you give me more context on what you need the i2c-exp packages for?

Our preference is to not port these packages to the new firmware for a few reasons:

  • They're an ok I2C implementation, but there's implementations out there that are better in every way (code quality, documentation, maintenance)
  • Instead of maintaining old packages that provide marginal benefits, we want to focus our development efforts on what Omega2 users actually find important

That's why I ask about the context. If you need help with getting something specific working, we can work in that direction and/or suggest alternative methods.

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

No branches or pull requests

2 participants