Closed DMIINC closed 4 years ago
Do you maybe want to do it with usb only? Instead usb to serial as is it now?
start with usb-serial
ok
!st command out of watch power
can you upload the pcap so i can look too I'm looking for the commands and responses
USB to Serial capture only
Was also interested to see if @cowpen got any actual data in response to commands that use a parallel ID
Really sorry guys. I've been up to my eyeballs in alligators trying to support 100+ work-from-home users with no company laptops. Nightmare. I haven't even had a chance to try to install the "mpp-solar" package yet.
@cowpen It is all good.
thanks
So in the first PCAP, the commands (in order) we see are
QPI
at p 4684 with response (PI41
with CRC 0x13 0xbd
at p 4690-4705
then
QPI
QPI
QPI
QPI
QPI
QPI
QPI
QPI
QPI
QPI
QMN 0xbb 0x64 response (NAK 0x73 0x73 which makes sense as it is an unknown command
QMN (NAK
QMN (NAK
QPI
QPI
QPI
QPI
QPIRI 0xf8 0x54 and response
QSID 0xbb 0x05 response 1492911906100045005535 0x9d 0x48
QPIRI
QSID
QVFW
QVFW2
QVFW3 with (NAK response
QVFW3 with (NAK response
QVFW3 with (NAK response
QPIGS and response
VERFW: (NAK
VERFW: (NAK
VERFW: (NAK
QPIRI
QBEQI and response
QPIRI
QPIGS
QMCHGCR
QMUCHGCR
QBEQI
QFLAG
QDI
QPIWS
QSID
QVFW
QVFW2
QVFW3 - (NAK
QVFW3 - (NAK
QVFW3 - (NAK
QPIGS
VERFW: (NAK
VERFW: (NAK
VERFW: (NAK
QPIRI
QBEQI
QPIRI
QPIWS
QPGS0 0x3f 0xda @ 8716 (1 92911906100045 L 00 123.4 59.98 123.4 59.98 0283 0213 011 56.1 05 095 000.0 005 01533 01274 008 01000010 6 0 060 220 40 00 000 0x92 0xa3
QPG2S0 and a response
QP2GS0 and a response
QPGS1 and response
QP2GS1 and a response
QPIWS and a response
QP2GS1 and response
QSID
QVFW
QVFW2
(and still only at packet 10276)
But basically, same CRC, no resends and a response to parallel commands...
@cowpen yeah no stress just interested
So. There is a response to QP2GSn and QPGSn?
Also @cowpen do you know how to combine packets in wireshark?
Yep command sent and valid response received Maybe wireshark capture of mpp-solar sending QPGS0 and QP2GS0 ? Coz as far as I can tell we are sending the command and getting a response, but the response is (NAK
Would switching to USB help to see further?
it might (it really shouldn't but at this stage it is not making sense to me)
OK. Giving it a try now.
is that using watchpower or mpp-solar?
Watch power windows
Oh man I failed at reading
Hold on. On raspberry pi, do you want all of them connected to raspberry pi or just one inverter?
just one i think The USB one is harder to decipher too (actually I think I've figured it out)
Soooo, LOL How do we go about wireshark on raspberry pi
Use something else
Checking it out
tshark
looks to be the command line version
Does your Pi have the GUI installed?
Installed.
Gui
Usp listener
UDP
OK - should be similar I installed tshark only and did the 'mount usbmon' as per the link and seemed to get USB capture
$ sudo tshark -i usbmon1
Running as user "root" and group "root". This could be dangerous.
Capturing on 'usbmon1'
1 0.000000 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
2 0.000071 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
3 0.000093 host → 1.1.1 USB 64 URB_INTERRUPT in
4 0.000139 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
5 0.000192 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
6 0.000210 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: PORT_SUSPEND]
7 0.058755 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: PORT_SUSPEND]
8 0.058761 1.1.1 → host USB 65 URB_INTERRUPT in
9 0.058777 host → 1.1.1 USB 64 URB_INTERRUPT in
10 0.118699 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
11 0.118749 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
12 0.148691 host → 1.1.0 USBHUB 64 CLEAR_FEATURE Request [Port 1: C_PORT_SUSPEND]
13 0.148741 1.1.0 → host USBHUB 64 CLEAR_FEATURE Response [Port 1: C_PORT_SUSPEND]
14 0.148757 host → 1.2.0 USB 64 GET STATUS Request
15 0.148902 1.2.0 → host USB 66 GET STATUS Response
16 0.148928 host → 1.2.0 USB 64 CLEAR FEATURE Request
17 0.149231 1.2.0 → host USB 64 CLEAR FEATURE Response
18 0.149261 host → 1.2.0 USBHUB 64 GET_STATUS Request [Port 1]
19 0.149277 host → 1.1.0 USBHUB 64 GET_STATUS Request [Port 1]
20 0.149318 1.1.0 → host USBHUB 68 GET_STATUS Response [Port 1]
21 0.149589 1.2.0 → host USBHUB 68 GET_STATUS Response [Port 1]
22 0.149616 host → 1.2.0 USBHUB 64 GET_STATUS Request [Port 2]
How did yours work out?
installing tshark now
with the Pi desktop installed, you could install wireshark and use the gui version for capture
I do have desktop installed too
this is what I see
Cisco remote capture: ciscodump Random packet generator: randpkt SSH remote capture: sshdump UDP Listener remote capture: udpdump
did you run
sudo mount -t debugfs none_debugs /sys/kernel/debug
sudo modprobe usbmon
sudo chmod 755 /sys/kernel/debug
sudo chmod 644 /sys/kernel/debug/usb/usbmon/*
?
How ever command line is working too. It is capturing my mouse movements \
lol - that will be useful...
I did execute what you wrote in previous post
pi@raspberrypi:~ $ sudo mount -t debugfs none_debugs /sys/kernel/debug mount: /sys/kernel/debug: none_debugs already mounted or mount point busy. pi@raspberrypi:~ $ sudo modprobe usbmon pi@raspberrypi:~ $ sudo chmod 755 /sys/kernel/debug pi@raspberrypi:~ $ sudo chmod 644 /sys/kernel/debug/usb/usbmon/* pi@raspberrypi:~ $
I dont have access to my pi that is connected to the inverter - but try
lsusb
to see if you can identify which usb to capture
then try tshark -i usbmon1
(or usbmon2) in one window will running a command in another (e.g. mpp-solar -c QSID ....)
pi@raspberrypi:~ $ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub pi@raspberrypi:~ $
when the capture window is open what is command to make it stop capturing
control+ c
tshark -i usbmon1 -w capture.pcap
to write it to a file too
pi@raspberrypi:~ $ sudo tshark -i usbmon1 -w capture.pcap Running as user "root" and group "root". This could be dangerous. Capturing on 'usbmon1' tshark: The file to which the capture would be saved ("capture.pcap") could not be opened: Permission denied.
pi@raspberrypi:~ $
try /tmp/capture.pcap
as the file
OK captured file with QPGS0 and QP2GS0. How do you Zip it on raspberry pi
theres a command gzip
or the GUI might have compress functionality??
LV5048 5KW protocol-20190222 for customer.pdf Hello,
Thank you for your help last week. I was in touch with MPP Solar and they provided communication protocol for LV5048. See attached. Is there way to integrate some of these commands with what you have written so far?