-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
197 lines (187 loc) · 10 KB
/
index.html
File metadata and controls
197 lines (187 loc) · 10 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<link href="./styles.css" rel="stylesheet">
<link href="./node_modules/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
<link href="./node_modules/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
<script src="./node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<title>CAN</title>
</head>
<body>
<template id="port-list-item-template">
<option value="{{value}}">{{label}}</option>
</template>
<template id="message-filter-item-template">
<li>
<span class="dropdown-item-text">
<input type="checkbox" class="filter-chk" value="{{messageId}}" id="{{messageId}}-filter-check" />
<label class="text ps-2" for="{{messageId}}-filter-check">{{messageId}}</label>
</span>
</li>
</template>
<template id="table-row-template">
<tr data-message-id="{{messageId}}">
<td class="message-id">{{messageId}}</td>
<td class="data-block">{{d1}}</td>
<td class="data-block">{{d2}}</td>
<td class="data-block">{{d3}}</td>
<td class="data-block">{{d4}}</td>
<td class="data-block">{{d5}}</td>
<td class="data-block">{{d6}}</td>
<td class="data-block">{{d7}}</td>
<td class="data-block">{{d8}}</td>
<td class="notes">
<textarea></textarea>
</td>
</tr>
</template>
<div class="container pt-4 d-flex flex-column h-100">
<div class="alert alert-info d-none" role="alert" id="autoUpdateAlert">
<span></span>
<button class="btn btn-secondary d-none">Update Now</button>
</div>
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link disabled"
id="messages-tab"
data-bs-toggle="tab"
data-bs-target="#messages"
type="button"
role="tab"
aria-controls="messages"
aria-selected="false"
>Messages</button>
</li>
<li class="nav-item active" role="presentation">
<button
class="nav-link active"
id="adapter-tab"
data-bs-toggle="tab"
data-bs-target="#adapter"
type="button"
role="tab"
aria-controls="adapter"
aria-selected="true"
>Adapter Settings</button>
</li>
<li class="nav-item" role="presentation">
<button
class="nav-link"
id="pinout-tab"
data-bs-toggle="tab"
data-bs-target="#pinout"
type="button"
role="tab"
aria-controls="pinout"
aria-selected="false"
>OBD pinout</button>
</li>
</ul>
<div class="tab-content mt-4" id="myTabContent">
<div class="tab-pane fade active show" id="adapter" role="tabpanel" >
<h3>Ports</h3>
<p>
Select the COM port to connect to. If there is more than one it will most likely be the one with <strong>Arduino LLC</strong> in the name.
</p>
<select id="portList"></select>
<button class="btn btn-secondary" id="connectBTN">
<i class="bi bi-upload"></i> Connect
</button>
<button class="btn btn-secondary" id="refreshPortsBTN">
<i class="bi bi-arrow-clockwise"></i> Refresh Ports
</button>
<button class="btn btn-danger" id="disconnectBTN" disabled>
<i class="bi bi-x-octagon"></i> Disconnect
</button>
<h3 class="pt-3">Changing CAN speed</h3>
<p>
If you wish to change the CAN connection speed modify the arduino code. Change the variable <strong>CANSpeed</strong> to the desired speed.
</p>
<p>
It is recommended to disconnect the Arduino from the vehicle before doing this.
</p>
<div class="mt-5 mb-5 alert alert-info" role="alert">
I could have made this configurable but i only needed to connect to a single network so...
</div>
<img src="./CANSpeed.PNG" />
<h3 class="pt-3">Uploading Arduino code</h3>
<p>Have a look at the <a href="https://github.com/ste2425/Electron-CAN-viewer" target="_blank">GitHub repo</a> for information on what needs to be uploaded to the Arduino and how to hook it up to a vehicle.</p>
</div>
<div class="tab-pane fade" id="messages" role="tabpanel" aria-labelledby="messages-tab">
<div class="btn-toolbar mb-3" role="toolbar">
<div class="btn-group me-2" role="group">
</div>
<div class="btn-group me-2" role="group">
<button class="btn btn-success" id="go"><i class="bi bi-play-fill"></i> Go</button>
<button class="btn btn-danger" id="stop" disabled><i class="bi bi-stop-fill"></i> Stop</button>
</div>
<div class="btn-group me-2">
<button class="btn btn-secondary" id="clear"> <i class="bi bi-table"></i> Clear Table</button>
</div>
<div class="btn-group me-2">
<button class="btn btn-secondary" id="expandAll"><i class="bi bi-eye-fill"></i> Show all</button>
</div>
<div class="btn-group me-2">
<div class="dropdown" id="hideMessagesDropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-auto-close="outside" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-eye-slash-fill"></i> Hide messages
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
</ul>
</div>
</div>
<div class="btn-group me-2">
<button class="btn btn-secondary" id="exportTableBTN"><i class="bi bi-file-earmark-spreadsheet"></i> Export Table</button>
</div>
</div>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Id</th>
<th>D0</th>
<th>D1</th>
<th>D2</th>
<th>D3</th>
<th>D4</th>
<th>D5</th>
<th>D6</th>
<th>D7</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="tab-pane fade" id="pinout" role="tabpanel" aria-labelledby="pinout-tab">
<div class="d-flex flex-column">
<h3>OBD</h3>
<p>The OBD-II specification defined standard pins on the OBD port to allow code readers to gain diagnostic data.
This includes a CANBus network, <strong>CAN high on pin 6</strong> and <strong>Can low on pin 14</strong>.
</p>
<img src="OBD.png">
<p>
However it also leaves a number of pins, <strong>1, 3, 8, 9, 11, 12, 13</strong> upto the manufacturer to use as they wish.
Many add extra CANBus networks accessible on these extra pins running at different speeds.
</p>
<p>
What data is available on the standard bus (pin 6 and 14) and what is available on any extra busses is down to the vehcicle manufacturer.
All they need to provide on the standard bus is basic diagnostic info. Engine speed, road speed, error codes etc.
</p>
<p>
My 2010 Focus has an extra bus available on <strong>pin 3 for CAN high</strong> and <strong>pin 11 for CAN low</strong>. This extra bus provides some useful info
such as the state of the doors (open, closed, locked, dead-locked). Info on indicators, headlights etc.
</p>
</div>
</div>
</div>
<hr>
<span class="version"></span>
</div>
<!-- You can also require other files to run in this process -->
<script src="./renderer.js"></script>
</body>
</html>