mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
readme
add extra can device
This commit is contained in:
@@ -92,9 +92,11 @@ Append this to /boot/config.txt
|
|||||||
```
|
```
|
||||||
dtparam=spi=on
|
dtparam=spi=on
|
||||||
dtoverlay=mcp2515-can0,spi0-0,oscillator=16000000,interrupt=22
|
dtoverlay=mcp2515-can0,spi0-0,oscillator=16000000,interrupt=22
|
||||||
|
dtoverlay=mcp2515-can1,spi0-1,oscillator=16000000,interrupt=26
|
||||||
dtoverlay=spi-bcm2835-overlay
|
dtoverlay=spi-bcm2835-overlay
|
||||||
```
|
```
|
||||||
Copy can_dev.service to /etc/systemd/system. Reboot to apply changes.
|
Copy can_dev.service to /etc/systemd/system. Reboot to apply changes.
|
||||||
|
It could be that can0 is switched with can1.
|
||||||
```bash
|
```bash
|
||||||
sudo cp can_dev.service /etc/systemd/system
|
sudo cp can_dev.service /etc/systemd/system
|
||||||
sudo systemctl enable can_dev.service
|
sudo systemctl enable can_dev.service
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=setup can device
|
Description=setup can device
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/sbin/ip link set can0 up type can bitrate 1000000
|
ExecStart=/usr/bin/bash -c '/usr/sbin/ip link set can0 up type can bitrate 1000000 && /usr/sbin/ip link set can1 up type can bitrate 1000000'
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
Reference in New Issue
Block a user