-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
USBPDDebug: Check whether VPDO is EPR or PPS #1600
Conversation
Merge pull request Ralim#1582 from Samuelrmlink/PPSctrl
Merge upstream changes into fork
@River-Mochi |
@Samuelrmlink I can't seem to find a working zip of this PR from above verified numbers, could you give me a link to it so I could download to test this?
if you have already tested on a bunch of chargers and V1 or V2, then I could focus more on the one you didn't test. |
@River-Mochi i have attached a build for the Pinecil and Pincilv2 here. I have tested this with the Pinecilv1 using a PPS charger. I have not tested it with Pinecilv2 or an EPR charger since I don't have either of those yet. This PR does not change the negotiation, behavior, or policy - it only updates the USBPDDebug menu. With previous firmware versions PPS power sources would be misinterpreted causing the Debug menu to show wattage ratings of 100w for a 45w charger in the debug menu. As far as I am aware this issue did not extend beyond the debug menu - so functionality of thd Iron was not affected. |
V1 tested on Baseus 120w gan pro, no issues, no reboots, in pps mode |
Tested Devices: one Pinecil V1, and two Pinecil V2.
Results
Additional information
in all cases, if I waited a couple seconds everything was normal and it did not continue to reboot. I did not see it happen plugging into the 20V USB-C chargers, however I also did not test them enough times to know for sure. Pinecil V2 still works fine, it's just this odd reboot occasionally on start.
Otherwise, looks fine, nothing jumped out as affecting operation on Pinecil V1 or V2. |
@Samuelrmlink since you dont have V2 yet, I made a video so you can see it.
Pinecilv2-EPR28V.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested here #1600 (comment)
@River-Mochi
Looking over the code we have here and the USB-PD spec I haven't been able to spot why your EPR PDO is displaying as current. It should be displayed as wattage, since that is how EPR PDOs are framed in the PD spec. Do you have a PD analyzer? |
On a secondary note - I just added another commit to this PR to change the appearance of the current readout. Old: New: See Commit 9a16eb8 |
|
yes I have the KM002C (chargerlabs) with the PC software to save logs.
Ralim could confirm what the PD Debug menu is supposed to do but I don't see any time where EPR has not been 28V 5A (or rather it has not show watts there afaik for any EPR charger in the past).
|
|
@Samuelrmlink your beta for V2 doesn't have the BLE built in. is it possible you bring in one of Ralim's newer approved versions of the beta so that I can test your features using also PineSAM which gives me extra information. |
Last night’s build has BLE. I noticed that BLE can take a minute before it shows up on your other device though. |
just in general you have a long delay pairing BLE pinecil V2 to PineSam? I usually plug in V2, start the script and then if it doesn't connect on Browser first time, I hit F5. after that even if I quit the terminal script and re-open, then it's faster to connect in the Browser bc pinesam script connected Pinecil to my PC bluetooth already. |
Attached PD analyzer Logs and Videos of PD Debug for:
|
@Samuelrmlink did you get a chance to look at the logs I attached; are you good now for this PR? |
fwiw. I tested in Windows 11, and PineSAM does not connect if I first connect Pinecil to "windows bluetooth" Pinecil has to be disconnected from all other OS/devices. and then when I open PineSAM, and let the script do all the backend connecting - then the browser opens automatically and connects to BLE Pinecil automatically and it's good. if the PC is a little slow working with the backend script, then I hit "F5" on the browser and it works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code-wise this seems good to me, dont have a suitable charger for testing.
Has this been tested as working (Comments are not super clear)
yes it has been tested by at least 2 people and it works. I also sent some of my PD logs to Samuel as requested but did not hear back if he did anything with that. I tested with PPS charger. and Dancho/dandimi (test results here above #1600 (comment)) tested with PPS charger. Dancho/dandimi said this code helped him, his PPS charger no longer reboots. I tested also with EPR chargers and it does not seem to cause any harm or break anything. |
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
SPR PPS VPDOs are being classified as AVS EPR VPDOs.
This results in an incorrect wattage value being displayed in the PD Debug menu.
What is the new behavior (if this is a feature change)?
VPDOs are identified.
Other information:
Referencing Table 6-13 and Table 6-14 from the "USB Power Delivery Specification Revision 3.1, Version 1.7" (Pages 138, 139)