-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add RTR frames to TCP messages #24
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no sudo
for those above needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for ssh needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or for sd card access. i dont know, other way it throws errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, only use sudo make install
all others don't need root permission.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't do this in /boot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why s that? its easy to copypaste files from my windows machine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need the empty line? What about adding the .service
file to the git repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have no idea! its a linux magic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need that empty line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this case this thing gonna yell at me that im passing arguments in excutable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it say exactly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/[email protected]
, see other comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what makes my option more noob proof.
how normal user should know all this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proper instructions are a good starting point to learn more, if someone is interested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please name the file [email protected]
|
||
[Service] | ||
ExecStart= | ||
ExecStart=-/usr/local/bin/socketcand -i can0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use %I
instead of can0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo systemctl start [email protected]
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo systemctl enable [email protected]
|
||
[Unit] | ||
Description=CAN ethernet | ||
After=server.service multi-user.target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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