[{"url":"https://api.github.com/repos/networkupstools/nut/issues/comments/6032267673","html_url":"https://github.com/networkupstools/nut/issues/3735#issuecomment-6032267673","issue_url":"https://api.github.com/repos/networkupstools/nut/issues/3735","id":6032267673,"node_id":"IC_kwDOAHwK6c8AAAABZ40ZmQ","user":{"login":"csc06","id":39016778,"node_id":"MDQ6VXNlcjM5MDE2Nzc4","avatar_url":"https://avatars.githubusercontent.com/u/39016778?v=4","gravatar_id":"","url":"https://api.github.com/users/csc06","html_url":"https://github.com/csc06","followers_url":"https://api.github.com/users/csc06/followers","following_url":"https://api.github.com/users/csc06/following{/other_user}","gists_url":"https://api.github.com/users/csc06/gists{/gist_id}","starred_url":"https://api.github.com/users/csc06/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csc06/subscriptions","organizations_url":"https://api.github.com/users/csc06/orgs","repos_url":"https://api.github.com/users/csc06/repos","events_url":"https://api.github.com/users/csc06/events{/privacy}","received_events_url":"https://api.github.com/users/csc06/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2026-10-07T06:22:56Z","updated_at":"2026-10-07T06:22:56Z","body":"Follow-up: the man page's power-cycle procedure fully restored communications on this unit — confirming that recovery works for this trigger as well.\n\nAfter recovery, the **correct** extended identification exchange (`0x2B / 0x0E / ReadDevID=0x03 / ObjectID=0x87`, i.e. the driver's own `ident_req` frame) works fine and returns the device list. This confirms:\n\n1. Object 0x87 itself is safe to request — the lockup is specific to the malformed basic-ReadDevID variant (`ReadDevID=0x01`).\n2. Device info for Huawei triage, decoded from the identification response:\n   - Model family: `UPS2000A` (1 kVA, RS-232 via XR21V1410 USB-UART)\n   - Firmware: **V2R1C1SPC50**\n   - Protocol string: `P1.0-D1.0`\n   (ESN withheld.)\n\nNote: V2R1C1SPC50 is the same firmware version already mentioned in #3593 (shutdown-command behaviour), so this firmware build is known to the project — and it exhibits the malformed-frame lockup too.","author_association":"NONE","pin":null,"reactions":{"url":"https://api.github.com/repos/networkupstools/nut/issues/comments/6032267673/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null},{"url":"https://api.github.com/repos/networkupstools/nut/issues/comments/6041899108","html_url":"https://github.com/networkupstools/nut/issues/3735#issuecomment-6041899108","issue_url":"https://api.github.com/repos/networkupstools/nut/issues/3735","id":6041899108,"node_id":"IC_kwDOAHwK6c8AAAABaCAQZA","user":{"login":"jimklimov","id":1636756,"node_id":"MDQ6VXNlcjE2MzY3NTY=","avatar_url":"https://avatars.githubusercontent.com/u/1636756?v=4","gravatar_id":"","url":"https://api.github.com/users/jimklimov","html_url":"https://github.com/jimklimov","followers_url":"https://api.github.com/users/jimklimov/followers","following_url":"https://api.github.com/users/jimklimov/following{/other_user}","gists_url":"https://api.github.com/users/jimklimov/gists{/gist_id}","starred_url":"https://api.github.com/users/jimklimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimklimov/subscriptions","organizations_url":"https://api.github.com/users/jimklimov/orgs","repos_url":"https://api.github.com/users/jimklimov/repos","events_url":"https://api.github.com/users/jimklimov/events{/privacy}","received_events_url":"https://api.github.com/users/jimklimov/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2026-10-07T16:11:16Z","updated_at":"2026-10-07T16:11:16Z","body":"CC: @biergaizi ","author_association":"MEMBER","pin":null,"reactions":{"url":"https://api.github.com/repos/networkupstools/nut/issues/comments/6041899108/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null},{"url":"https://api.github.com/repos/networkupstools/nut/issues/comments/6260642899","html_url":"https://github.com/networkupstools/nut/issues/3735#issuecomment-6260642899","issue_url":"https://api.github.com/repos/networkupstools/nut/issues/3735","id":6260642899,"node_id":"IC_kwDOAHwK6c8AAAABdSnUUw","user":{"login":"biergaizi","id":1310693,"node_id":"MDQ6VXNlcjEzMTA2OTM=","avatar_url":"https://avatars.githubusercontent.com/u/1310693?v=4","gravatar_id":"","url":"https://api.github.com/users/biergaizi","html_url":"https://github.com/biergaizi","followers_url":"https://api.github.com/users/biergaizi/followers","following_url":"https://api.github.com/users/biergaizi/following{/other_user}","gists_url":"https://api.github.com/users/biergaizi/gists{/gist_id}","starred_url":"https://api.github.com/users/biergaizi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biergaizi/subscriptions","organizations_url":"https://api.github.com/users/biergaizi/orgs","repos_url":"https://api.github.com/users/biergaizi/repos","events_url":"https://api.github.com/users/biergaizi/events{/privacy}","received_events_url":"https://api.github.com/users/biergaizi/received_events","type":"User","user_view_type":"public","site_admin":false},"created_at":"2026-10-19T05:51:34Z","updated_at":"2026-10-19T07:26:35Z","body":"Nowadays, LLMs have great analytical and writing capabilities, but the LLMs are only as good as the instructions given by their users. This bug report is an excellent demonstration of useless work \"solved\" by LLM users, who lack any context about the NUT project.\n\n> The huawei-ups2000(8) man page documents that \"some malformed commands are known to lock up the serial port\", says this was \"only a problem during early development\", and asks that reproducible lockups be reported. Here is a concrete, real-hardware trigger observed today: [...]\n\nThis is a complete misunderstanding of the man page's context. The man page is *not* asking for just *any* reproducible lockups for the UPS. Instead, it's only asking for reproducible lockups by the use of the NUT's `huawei_ups2000` driver, *not just random hardware erratas*! \n\nNothing new has been discovered in this bug report. It's a firmware bug discovered by reading the documentation, and reported to the developer who wrote the documentation.\n\nI already found a 100% reproducible raw Modbus command sequence that could create the lockup back in 2021, back when I started implementing the first handshake. This is why the paragraph about \"serial port lockup\" even exists in the man page. The command sequence was very similar to the example provided in this bug report. If I kept quiet about it, nobody would even think about investigating it.\n\n> drivers/huawei-ups2000.c never sends such a frame (its ident_req correctly uses ReadDevID=0x03)\n\nOf course it never does so, because I found putting other numbers in this field caused serial port lockups! After some try-and-error, I found `0x03` was the safe command to issue, and this is why the driver works. \n\nFrom my best knowledge, it's impossible to trigger this hardware bug during normal use. This is the reason that the man page said this was \"only a problem during early development\"!  All Modbus commands are protected by CRC checksum, furthermore, access to the serial port is already privileged.\n\nFor this reason. the detail of my finding remained private and never published, I only vaguely described it as a \"malformed command\", because I thought the detail is not useful for end-users, and it also does not worth my time to document and publish as a developer. I believe I have already done enough of a courtesy to include a recovery procedure for a driver bug that no longer exists, as a precaution against unknown driver bugs (I also said those bugs should be reported).\n\n> Some malformed commands are known to lock up the serial port (including USB, which is a USB-to-serial device). Upon receiving them, UPS2000 stops all serial communications. The result is a completely unresponsive UPS, regardless of what you do -- restarting NUT, rebooting the computer -- can not restore connectivity, as if someone has unplugged the RS-232 cable. To recover, simply power cycle the UPS: Turn off the UPS output via the front panel, then unplug the UPS from line power. Wait for the LCD front screen to go black. Finally reconnect line power and restart your UPS. That being said, a serial port lockup is unlikely to happen. To our best knowledge, this driver never sends malformed commands to the UPS (it was only a problem during early development). Furthermore, due to a CRC checksum, they're unlikely to be accidentally generated. Still, we recommend to power cycle your UPS after making a cabling change, especially after changing from RS-485/USB to RS-232, just to ensure the UPS selects the correct communication interface. Also, if you have discovered a reproducible serial port lockup problem, it can be a previously unknown bug, so please make sure to file a bug report.\n\nThe manual only invited readers to submit a report for reproducible lockup problems, if such lockup problems are caused by the NUT driver, or can somehow triggered from NUT. \n\n> Suggested actions: Man page: extend \"Serial port becomes unresponsive\" with this concrete trigger class (ReadDevID=0x01/0x02 combined with ObjectID ≥ 0x80), since the current text only mentions malformed commands generically and readers have no way to know which frames are poisonous.\n\nThe man page is end-user documentation, not developer documentation. The man page is supposed to be a documentation of the `huawei_ups2000` device driver, not to provide a free knowledge base for about the Huawei UPS2000 hardware in general. While it's useful to share more developer information on GitHub, such as by submitting this issue. It's not appropriate to describe the technical detail encountered by every developer in a user manual. \n\nWhen you read a user manual of a Asus or Supermicro motherboard, you won't find any step-by-step instruction to trigger an AMI BIOS or Intel chipset errata on the motherboard (although it may contain a recovery procedure to reset the motherboard in case it occurs, and you may find more information from the Intel website or 3rd-party hardware/gaming). NUT driver man pages should be treated similarly, it should be end-user oriented, not a developer log. \n\nAlternative action: Update the man page to state a reproducer is available, with a link to the Github Issue. \n\n> Suggested actions: Forward to Huawei: the firmware should answer with a Modbus exception (or ignore the frame) instead of permanently wedging the shared serial stack (RS-232 + USB).\n\nAgain, this shows the lack of context by the LLM. If *you* are affected by the hardware errata when *your driver* is sending these malformed commands, it's *your job* to forward it to Huawei as a customer. It's not the responsibility for unpaid volunteers from a free software project who happens to write a driver for the same hardware to report a bug for *you*.\n\nThis driver is implemented and tested entirely by independent developers and users who collaborated through public forums on the Internet, thanks to Huawei's willingness to publish the public datasheet of this UPS model. So, unlike the Linux kernel where you can possibly find some insiders or people who know contacts, no one involved in this `huawei_ups2000` driver was employed, sponsored, or contracted by Huawei, and no purchase/support contracts were involved. These UPS units were simply purchased ordered from online UPS resellers or second-hand markets. Thus, we do not have any Huawei contacts or negotiation power with Huawei to report a firmware problem.  If you're powering your company's production system with Huawei's UPS, you're in a better position than us to report the problem. \n\n## Conclusion\n\nPlease remove the tag \"Connection stability issues\". This is a hardware errata, not a connection stability issue, NUT drivers are not affected because these malformed commands are never generated. \n\nHowever, it's arguably still a legitimate report: \n\n1. In the bug tracker, there's a category defined as \"documentation protocol\": *Submitted vendor-provided or user-discovered protocol information, or similar data (measurements...).* This report clearly fits within this category.\n2. It's arguably a documentation bug, because the documentation only says \"*also, if you have discovered a reproducible serial port lockup problem, it can be a previously unknown bug, so please make sure to file a bug report.*\" The implied context is that the problem is caused by the driver, because this sentence appeared in the driver's man page, which I believe most humans would understand the context. But a LLM took a literal read of the sentence, so a bug report was submitted as described. \n3. This report is itself a useful contribution, in the sense of documenting the errata, so although it's not the responsibility of the man page to describe the hardware errata, but linking to this errata report on the bug tracker from the man page with a URL would be perfectly reasonable. \n\nI'll update the documentation with a link to the issue, and then we can close this bug.","author_association":"CONTRIBUTOR","pin":null,"reactions":{"url":"https://api.github.com/repos/networkupstools/nut/issues/comments/6260642899/reactions","total_count":1,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":1,"rocket":0,"eyes":0},"performed_via_github_app":null,"minimized":null}]