Hi,

I am after help in improving the interface to the ZKE-EBD-USB device that is supported by sigrok and smuview.

It would be really great for the ZKE-EBD-USB driver to have 9 commands that can be sent to it. These allow the ZKE to enable to test higher voltages when it is connected to USB packs that support QC2/QC3 output.

The commands are quite easy, and all the hardware UART analysis has been done and attached in the txt document.

Just need 9 new commands to the ZKE-EBD-USB to be supported and it all should work. Thanks to the team members that posted the existing protocol. Seeing this, and then analysing the ZKE for these commands made it very easy to work out.

I hope someone can easily put this together. I am hanging out in IRC channel and happy to do hardware testing on smuview. I have been python scripting there with the hardware I have - so will be real easy for me to test. I am offering to buy the ZKE-EBD-USB for a developer to keep if they are keen, but does not have the hardware.

Thanks

Stuart Tyler

Device: ZKETech-EBD-USB

Power Delivery Control:

The ZKETech-EBD-USB uses a PL2303SA USB to UART converter.
The TTL UART TX/RX/GND pins are easily accessible and can be wired out to a 
logic analyser.

The ZKE protocol can then easily be accessed using 9600,N,1 decoder. The 
transmit packet from PC to ZKE device always contains 10 bytes, byte#0 (start) 
0xFA, byte#1 (command), bytes#2..bytes#7 seem to default to 00 when unused, 
byte#8 (check byte), byte#9 (stop) 0xF8. This agrees with the existing 
infomation on the device.

When using the ZKE software menu item ">>Tools>>Quick Charger Test" opens up a 
window that allows you to control the voltage on the USB delivery port - if you 
have a USB power delivery capable hardware attached. There is control passed on 
the USB line from the ZKE to the USB charger to enable these modes. We dont 
care about how that happens - we just want to know the commands to the ZKE to 
enable these actions to occur.

QC2 mode there are 4 settings: 5V, 9V, 12V, 20V. Each of these use byte#1
QC2/5V: byte#1 = 0x07 and byte#7 = 0x0A. Check byte byte#8 = 0x0D. All other 
payload = 0x00.
QC2/9V: byte#1 = 0x07 and byte#7 = 0x0B. Check byte byte#8 = 0x0C. All other 
payload = 0x00.
QC2/12V: byte#1 = 0x07 and byte#7 = 0x0C. Check byte byte#8 = 0x0B. All other 
payload = 0x00.
QC2/20V: byte#1 = 0x07 and byte#7 = 0x0D. Check byte byte#8 = 0x0A. All other 
payload = 0x00.

In QC3 mode there are 3 settings: Change/set mode to QC3, Increase by 0.2V, 
Decrease by 0.2V
QC3/Set: byte#1 = 0x07 and byte#7 = 0x0E. Check byte byte#8 = 0x09. All other 
payload = 0x00.
QC3/+0.2V: byte#1 = 0x07 and byte#7 = 0x0F. Check byte byte#8 = 0x08. All other 
payload = 0x00.
QC3/-0.2V: byte#1 = 0x07 and byte#7 = 0x10. Check byte byte#8 = 0x17. All other 
payload = 0x00.

In MTK-PE there are 2 settings: Plus, Minus. (unknown what these change the 
output voltage by as no MTK-PE compatible hardware is not available to me)
MTKPE/-V: byte#1 = 0x07 and byte#7 = 0x14. Check byte byte#8 = 0x13. All other 
payload = 0x00.
MTKPE/+V: byte#1 = 0x07 and byte#7 = 0x15. Check byte byte#8 = 0x12. All other 
payload = 0x00.

So thats the break down - there are 9 new commands to be sent out. None of 
these have a response from the ZKE. The only way to know if the command was 
received is to look at the output voltage, but then you also need a compatible 
power supply attached for this to occur. 

Here I have included all the bytes in sequential order that need to be sent.
QC2/5V: FA 07 00 00 00 00 00 0A 0D F8
QC2/9V: FA 07 00 00 00 00 00 0B 0C F8
QC2/12V: FA 07 00 00 00 00 00 0C 0B F8
QC2/20V: FA 07 00 00 00 00 00 0D 0A F8

QC3/Set: FA 07 00 00 00 00 00 0E 09 F8
QC3/+0.2V: FA 07 00 00 00 00 00 0F 08 F8
QC3/-0.2V: FA 07 00 00 00 00 00 10 17 F8

MTKPE/-V: FA 07 00 00 00 00 00 14 13 F8
MTKPE/+V: FA 07 00 00 00 00 00 15 12 F8


_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to