darkxst / ha-operating-system

HAOS for iHost
Apache License 2.0
44 stars 6 forks source link

pmu_io_domains Ethernet configuration error #40

Open Daniel-zhan-itead opened 8 months ago

Daniel-zhan-itead commented 8 months ago

We recently found that there is a problem with the configuration in this project (0023-dts-pmu_io_domain-set-wifi-to-3.3v.patch) which may cause potential permanent damage to the Ethernet functionality. Please correct it. lQLPKGzzsRXEBCvNASvNAd-wa-zd2iqopLcF1hckOP_MAA_479_299

darkxst commented 8 months ago

I don’t know if there are difference in the upstream kernel drivers here, however if I set vccio5-supply to vcc3v3_sd then the MAC fails to communicate with PHY (see below error). This is presumably why I have kept this set on vcc_1v8. Unfortunately the RTL8201F datasheet does not provide any information on the RMII signalling voltages. Phy-supply is correctly set to vcc_3v3 though.

 808.047071] rk_gmac-dwmac ffc40000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19)
chrismarine74 commented 8 months ago

If i understand preferably when you define vcc 1v8 does it mean 1.8v power supply? and 3v3 3.3v ? how is it possible for something that works with a lower voltage than normal design to get damaged?

freezingzz commented 8 months ago

If i understand preferably when you define vcc 1v8 does it mean 1.8v power supply? and 3v3 3.3v ? how is it possible for something that works with a lower voltage than normal design to get damaged?

The power supply is determined by the hardware not by this configuration, and this configuration only sets up some pull-up resistors or MOS tube matches in the IO to make the IO suitable for operation in this voltage range.

Incorrect matching will cause IO damage in use, resulting in distortion of the output waveform - we have proved this through comparative experiments, and we have replicated the damage to the IO port on the device running this HAOS. Rockchip officials have also confirmed that this incorrect configuration will definitely cause hardware damage - it is just a matter of time and probability.

darkxst commented 8 months ago

The power supply is determined by the hardware not by this configuration, and this configuration only sets up some pull-up resistors or MOS tube matches in the IO to make the IO suitable for operation in this voltage range.

Can you explain then why setting vccio5 to 3v3 completely disables ethernet on the upstream kernel? If I ship an update with this setting, it will completely disable ethernet for ALL USERS.

808.047071] rk_gmac-dwmac ffc40000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19)

chrismarine74 commented 8 months ago

the official configuration of the original sonoff operating system what settings it has adopted, maybe copying it will solve the problem, unless the integrated design io is wrong

darkxst commented 8 months ago

the official configuration of the original sonoff operating system what settings it has adopted, maybe copying it will solve the problem, unless the integrated design io is wrong

They are using the downstream Rockchip kernel, which apart from being old, diverges quite significantly from the mainline upstream kernel that is used in HAOS. That being said I have mostly the same Device tree at least as far as ethernet configuration. Underlying drivers however will be different.

astangcong commented 8 months ago

倒闭算了, 我现在对你们这个设备和系统失望透顶了。弄个设备当玩具吧,别做智能家居系统了

darkxst commented 8 months ago

@astangcong I am not employed or paid by Sonoff. I provide these builds in my spare time so that other users can enjoy HAOS.

astangcong commented 8 months ago

可是当初sonoff宣传的是可以刷系统,而且给的是这个项目地址,具体你们内部是如何的我也管不着了,反正我也不打算用了

darkxst commented 8 months ago

@astangcong go complain to Sonoff on their forums then.

chrismarine74 commented 7 months ago

is there anything newer regarding the ethernet port malfunction issue? the company sent me a new device to replace the previous one that gave an ethernet, failure I'm waiting to see if a solution has finally been given from itead and if it really was a problem of the haos. that has been excellent work I believe that sonoff has some mistake in the design of the product and now he is trying to collect it

darkxst commented 7 months ago

I do not yet have any updates on a solution to this. Nor have iTead provided any assistance on this. I will try again to find some solution when updating to the 12.2 release.

fredofm commented 7 months ago

Hi all,

I think I'm facing the same eth0 issue. It's not usable anymore and the only solution I have is to use a usb ethernet device.

No problem to use that workaround and I would like to take the opportunity to say thank you for your great work @darkxst . We all know that it's something you do for free :)

In my case I think the eth0 stops working in the middle of a HA core update, I guess that something was corrupted and after that HA is not working fine anymore (updates take too much time or fail, I have to restart several times until all services connect properly, sometimes backups section is not available, ....) so I decided to flash again the sd card with image haos_ihost-12.0.rc1.img.xz and start it from scratch but using the usb ethernet device instead.

But after seeing the waiting screen for a while (http://homeassistant.local), it ends with the following error:

.900 ERROR (MainThread) [asyncio] Task exception was never retrieved future: .sync_property_change() done, defined at /usr/src/supervisor/supervisor/utils/dbus.py:217> exception=DBusInterfaceError('D-Bus object /org/freedesktop/NetworkManager/ActiveConnection/13766 is not usable, introspection is missing required properties interface')> Traceback (most recent call last): File "/usr/src/supervisor/supervisor/utils/dbus.py", line 235, in sync_property_change await update(changed) File "/usr/src/supervisor/supervisor/dbus/network/interface.py", line 160, in update await self.connection.connect(self.dbus.bus) File "/usr/src/supervisor/supervisor/dbus/interface.py", line 95, in connect await super().connect(bus) File "/usr/src/supervisor/supervisor/dbus/interface.py", line 49, in connect await self.initialize(await DBus.connect(bus, self.bus_name, self.object_path)) File "/usr/src/supervisor/supervisor/dbus/interface.py", line 103, in initialize raise DBusInterfaceError( supervisor.exceptions.DBusInterfaceError: D-Bus object /org/freedesktop/NetworkManager/ActiveConnection/13766 is not usable, introspection is missing required properties interface .913 ERROR (MainThread) [asyncio] Task exception wa...

I tried to boot it again from the original ihost image but it's not working (remove the maskrom pins soldering) and it keeps the red light forever and there is not network activity (I tried hard reset as well).

Could you help me to solve the issue?. Currently it's a nice brick.

darkxst commented 7 months ago

It may help to provide NetworkManager configuration file for the usb ethernet. These can be installed on CONFIG usb drive (you will need a hub so you can also have ethernet plugged in!)

https://github.com/home-assistant/operating-system/blob/dev/Documentation/configuration.md

It uses standard Network Manager config files, for which there should be plenty of references online.

github-actions[bot] commented 4 months ago

There hasn't been any activity on this issue recently. To keep our backlog manageable we have to clean old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant OS version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

vladimird commented 2 months ago

any news about ETH issue?

brooqs commented 1 month ago

I think there is no any news. Unfortunately my sonoff dead as rat. 100 usd is flying away. Too expensive experience for me. Anyway thanks for the advanture.