Skip to content

Commit 50d61bc

Browse files
committed
chore: fix building pcap option
1 parent 67d041e commit 50d61bc

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

README.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ Contributions and PRs are welcome.
4747

4848
#### Install PCAP dev libraries
4949

50-
* Ensure you have install the libpcap-dev package
50+
* Optionally, you may want to have libpcap-dev package installed (if building with `-tags pcap`.)
5151

5252
#### Download, extract, and compile phev2mqtt
5353

5454
* Download the phev2mqtt archive
5555
* Extract it
56-
* Go into its the top level directory and run *go build*
57-
* Verify it runs with *./phev2mqtt -h*
56+
* Go into its the top level directory and run `go build`
57+
* Verify it runs with `./phev2mqtt -h`
5858

5959
### Connecting to the vehicle.
6060

@@ -238,10 +238,9 @@ then extract off the phone.
238238
*PCAP Remote* is a little more involved, but allows for live sniffing of the traffic.
239239

240240
Once you have downloaded the PCAP file(s) from the phone, you can analyse them with
241-
the command *phev2mqtt decode pcap <filename>*. Adjust the verbosity level (-v)
242-
between 'info', 'debug' and 'trace' for more details.
241+
the command *phev2mqtt decode pcap <filename>*. First build a `phev2mqtt` with pcap features:
242+
`go build -tags pcap`; you will need libpcap for this. Adjust the verbosity level (`-v`) between
243+
`info`, `debug` and `trace` for more details.
243244

244-
Additionally, the flag '--latency' will use the PCAP packet timestamps to decode
245+
Additionally, the flag `--latency` will use the PCAP packet timestamps to decode
245246
the packets with original timings which can help pinpoint app events.
246-
247-

cmd/pcap.go

-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ func processPayload(cmd *cobra.Command, data []byte, dir string) {
125125
}
126126
}
127127

128-
var securityKey *protocol.SecurityKey
129-
130128
var regs = map[byte]string{}
131129

132130
var pings bool

0 commit comments

Comments
 (0)