This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hey all. Trying to get my can devices to have the same can addresses(?) each time they are used. I've tried to get them to have the same address a few ways and it SEEMS to have worked but they are always STOPPED by default using this:
ACTION=="add", SUBSYSTEM=="net", ENV{ID_SERIAL_SHORT}=="480027001050535556323420", NAME="printerCAN0", RUN ="/home/dinec/E3_data/scripts/canbus_udev_rules.sh printerCAN0"
which gives it the printerCAN0 one but each time it shows up as `can state STOPPED` unless the device is unplugged and plugged back in. Is there any way to have it do that but without having to unplug and replug them automaticaly at boot? I have already chmod x
on the script too. It works if the script is run on its own as well
This is the script that is canbus_udev_rules.sh:
#!/bin/bash
INTERFACE=$1
ip link set $INTERFACE type can bitrate 1000000
ip link set $INTERFACE up
Any help would be greatly appreciated
Subreddit
Post Details
- Posted
- 8 months ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/linux4noobs...