Conversation
|
Hey @Vasili-Sk, thanks for contributing.
Thanks, |
|
Can i somehow edit changes here or need to make a new request? |
|
You can force push your modified or rebased branch over the existing one, add the |
|
Formatting removed in last commit, please check |
|
The idea of re-formating the code is a good one, but please do either no reformating at all, or do the reformating in one patch and no other changes. Usually the first one. |
|
i have no idea how to, other than wiping my fork and making it from scratch :P |
|
Check if this branch still works: https://github.com/marckleinebudde/socketcand/tree/vasili-sk/socketcand |
|
Can you take care of not setting the DLC to 0 in RTR frames? |
|
Do you want to set it manually? |
|
No, please extend the protocol to transfer the DLC of RTR messages. |
| cd socketcand | ||
| sudo ./autogen.sh | ||
| sudo ./configure | ||
| sudo make |
There was a problem hiding this comment.
no sudo for those above needed
There was a problem hiding this comment.
or for sd card access. i dont know, other way it throws errors
There was a problem hiding this comment.
No, only use sudo make install all others don't need root permission.
There was a problem hiding this comment.
Ah, I see where the problem is. Don't change to /boot. You can directly start the git clone in your home directory.
There was a problem hiding this comment.
why s that? its easy to copypaste files from my windows machine
There was a problem hiding this comment.
Under Linux /boot is for booting the system. A mistake there might lead to an unbootable system. This is why normal users don't have write permission there. Your home directory is where you can and should do your things.
| After=server.service multi-user.target | ||
|
|
||
| [Service] | ||
| ExecStart= |
There was a problem hiding this comment.
Why do you need the empty line? What about adding the .service file to the git repo?
There was a problem hiding this comment.
i have no idea! its a linux magic
There was a problem hiding this comment.
You don't need that empty line.
There was a problem hiding this comment.
in this case this thing gonna yell at me that im passing arguments in excutable.
There was a problem hiding this comment.
What does it say exactly?
There was a problem hiding this comment.
Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
There was a problem hiding this comment.
If you get this error message you might have a drop-in file in /etc/systemd/system/socketcand.service.d/, which has an ExecStart= aswell. You only want /etc/systemd/system/socketcand.service (or /etc/systemd/system/socketcand@.service, see other comment).
There was a problem hiding this comment.
what makes my option more noob proof.
how normal user should know all this?
There was a problem hiding this comment.
Proper instructions are a good starting point to learn more, if someone is interested.
There was a problem hiding this comment.
you can update it in a commit
|
|
||
| After that you may want to make it run on boot as service, run this command to edit it | ||
|
|
||
| sudo systemctl edit --force --full socketcand.service |
There was a problem hiding this comment.
Please name the file socketcand@.service
|
|
||
| [Service] | ||
| ExecStart= | ||
| ExecStart=-/usr/local/bin/socketcand -i can0 |
There was a problem hiding this comment.
use %I instead of can0
There was a problem hiding this comment.
Man i described the way it worked. it took me half day long to make it work. i dont want to try over again
| Try to start it with | ||
|
|
||
| sudo systemctl daemon-reload | ||
| sudo systemctl start socketcand.service |
There was a problem hiding this comment.
sudo systemctl start socketcand@can0.service
| Note that it should say 'can0' and not 'vcan0'. | ||
| If everything ok so far, what is quite suprisingly, then run this command to activate service on boot. | ||
|
|
||
| sudo systemctl enable socketcand.service |
There was a problem hiding this comment.
sudo systemctl enable socketcand@can0.service
|
|
||
| [Unit] | ||
| Description=CAN ethernet | ||
| After=server.service multi-user.target |
There was a problem hiding this comment.
After=multi-user.target and WantedBy=multi-user.target looks wrong
What about:
After=network.target
After=sys-subsystem-net-devices-%i.device
BindsTo=sys-subsystem-net-devices-%i.device
Updated guide
|
Okay guide updated. DLC code also added. |
|
It would have been good to place your changes ontop of my cleaned up branch.... |


added < rtr %x %d.%d> message for received Remote transfer request messages in raw mode
added < sendrtr %x > to send RTR message
a little bit formatted files with eclipse CDT formatter
p.s. code needs optimisation... remove same used parts of code, make something like can_message_decode/encode to parse text. Too much same used code.
p.p.s. barely tested. However raspberry pi successfully sends rtr messages over tcp