<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.distrap.org/index.php?action=history&amp;feed=atom&amp;title=GettingStarted</id>
		<title>GettingStarted - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.distrap.org/index.php?action=history&amp;feed=atom&amp;title=GettingStarted"/>
		<link rel="alternate" type="text/html" href="https://wiki.distrap.org/index.php?title=GettingStarted&amp;action=history"/>
		<updated>2026-05-14T15:49:09Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.0-rc.0</generator>

	<entry>
		<id>https://wiki.distrap.org/index.php?title=GettingStarted&amp;diff=14&amp;oldid=prev</id>
		<title>Srk: minor: missing to</title>
		<link rel="alternate" type="text/html" href="https://wiki.distrap.org/index.php?title=GettingStarted&amp;diff=14&amp;oldid=prev"/>
				<updated>2017-09-30T00:18:44Z</updated>
		
		<summary type="html">&lt;p&gt;minor: missing to&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 00:18, 30 September 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l120&quot; &gt;Line 120:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 120:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# start canopen-posix-test on the other side&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# start canopen-posix-test on the other side&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# for that go the canopen folder you've used in previous step to build&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# for that go &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;to &lt;/ins&gt;the canopen folder you've used in previous step to build&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# a binary as this needs to be started by root (or use su -c &amp;quot;..&amp;quot; as a normal user)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# a binary as this needs to be started by root (or use su -c &amp;quot;..&amp;quot; as a normal user)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;./build/canopen-posix-test/tower_init &amp;lt;&amp;gt; /dev/ttyS1 &amp;gt; /dev/ttyS1&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;./build/canopen-posix-test/tower_init &amp;lt;&amp;gt; /dev/ttyS1 &amp;gt; /dev/ttyS1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:12:newid:14 --&gt;
&lt;/table&gt;</summary>
		<author><name>Srk</name></author>	</entry>

	<entry>
		<id>https://wiki.distrap.org/index.php?title=GettingStarted&amp;diff=12&amp;oldid=prev</id>
		<title>Srk: init GettingStarted</title>
		<link rel="alternate" type="text/html" href="https://wiki.distrap.org/index.php?title=GettingStarted&amp;diff=12&amp;oldid=prev"/>
				<updated>2017-09-30T00:15:24Z</updated>
		
		<summary type="html">&lt;p&gt;init GettingStarted&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Required equip ==&lt;br /&gt;
* Linux computer&lt;br /&gt;
* F4 Discovery board&lt;br /&gt;
* [[CAN4DISCO]] board&lt;br /&gt;
* STLink programmer(s)&lt;br /&gt;
* Slave nodes&lt;br /&gt;
&lt;br /&gt;
== Software stack ==&lt;br /&gt;
&lt;br /&gt;
You can build the complete stack according to instruction on [https://github.com/distrap/distrap-build distrap-build] repository.&lt;br /&gt;
&lt;br /&gt;
=== UDev rules ===&lt;br /&gt;
&lt;br /&gt;
For persistent device names you should create udev rules files in ''/etc/udev/rules.d/''. For example&lt;br /&gt;
to create rules for your F4 Discovery board flashed with Black Magic probe firmware you can use the following&lt;br /&gt;
template:&lt;br /&gt;
{{cmd|code=&lt;br /&gt;
# F4 Discovery&lt;br /&gt;
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{manufacturer}==&amp;quot;Black Sphere Technologies&amp;quot;, ATTRS{serial}!=&amp;quot;E3C09CF4&amp;quot;, GOTO=&amp;quot;f4_bmp_end&amp;quot;&lt;br /&gt;
ACTION==&amp;quot;add&amp;quot;, SUBSYSTEM==&amp;quot;tty&amp;quot;, ATTRS{interface}==&amp;quot;Black Magic GDB Server&amp;quot;, MODE=&amp;quot;0660&amp;quot;, GROUP=&amp;quot;dialout&amp;quot;, SYMLINK+=&amp;quot;f4gdb&amp;quot;&lt;br /&gt;
ACTION==&amp;quot;add&amp;quot;, SUBSYSTEM==&amp;quot;tty&amp;quot;, ATTRS{interface}==&amp;quot;Black Magic UART Port&amp;quot;, MODE=&amp;quot;0660&amp;quot;, GROUP=&amp;quot;dialout&amp;quot;, SYMLINK+=&amp;quot;f4uart&amp;quot;&lt;br /&gt;
LABEL=&amp;quot;f4_bmp_end&amp;quot;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Make sure to set correct ''serial'' number, this can be found by running ''dmesg'' after the board is plugged in.&lt;br /&gt;
Create similar file as ''/etc/udev/rules.d/48-distrap.rules'' and run&lt;br /&gt;
{{cmd|code=&lt;br /&gt;
udevadm control -R&lt;br /&gt;
}}&lt;br /&gt;
to reload UDev daemon. Next time you plug in your device two nodes should be created&lt;br /&gt;
* /dev/f4gdb - for attaching GDB&lt;br /&gt;
* /dev/f4uart - UART2 pass-through&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
=== Flashing ===&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
==== Black Magic Probe ====&lt;br /&gt;
&lt;br /&gt;
== CAN ==&lt;br /&gt;
&lt;br /&gt;
Either you Linux computer or single board computer like Raspberry Pi or BeagleBone Black&lt;br /&gt;
can be used as CAN master. For development purposes powerful computer is better&lt;br /&gt;
due to shorter compilation time, for production BeagleBone Black or ODROID XU4 is a good choice.&lt;br /&gt;
&lt;br /&gt;
=== Bringing up SLCAN bridge ===&lt;br /&gt;
&lt;br /&gt;
Assuming you are using [[CAN4DISCO]] as UART2CAN bridge you can bring up CAN network&lt;br /&gt;
with following commands:&lt;br /&gt;
{{cmd|code=&lt;br /&gt;
modprobe can&lt;br /&gt;
modprobe can-raw&lt;br /&gt;
modprobe slcan&lt;br /&gt;
slcand -F -s8 -S115200 /dev/f4uart can0 # CAN speed 8 -&amp;gt; 1Mbit&lt;br /&gt;
ip link set can0 up&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Script to initialize SLCAN can be found in [https://github.com/distrap/dumpster/blob/master/canscripts/setup distrap/dumpster].&lt;br /&gt;
&lt;br /&gt;
=== Brining up native interface ===&lt;br /&gt;
&lt;br /&gt;
=== Using virtual CAN interface ===&lt;br /&gt;
&lt;br /&gt;
Virtual CAN interface can be started with following commands:&lt;br /&gt;
{{cmd|code=&lt;br /&gt;
modprobe can&lt;br /&gt;
modprobe can-raw&lt;br /&gt;
modprobe vcan&lt;br /&gt;
&lt;br /&gt;
ip link add type vcan&lt;br /&gt;
ip link add dev vcan0 type vcan&lt;br /&gt;
ip link set vcan0 up&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Script to initialize vcan0 can be found in [https://github.com/distrap/dumpster/blob/master/canscripts/setup_vcan distrap/dumpster].&lt;br /&gt;
&lt;br /&gt;
=== Monitoring CAN traffic ===&lt;br /&gt;
&lt;br /&gt;
candump utility can be used to dump traffic on the CAN interface:&lt;br /&gt;
{{cmd|code=&lt;br /&gt;
candump can0&lt;br /&gt;
# or&lt;br /&gt;
# candump vcan0&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Sending CAN messages manually ===&lt;br /&gt;
&lt;br /&gt;
Use cansend utility, for example to send LSS identify uncofigured devices command:&lt;br /&gt;
{{cmd|code=&lt;br /&gt;
cansend can0 7E5#4C&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you have such unconfigured node connected you should see its reply in candump:&lt;br /&gt;
{{cmd|code=&lt;br /&gt;
# candump can0&lt;br /&gt;
can0  7E5   [1]  4C&lt;br /&gt;
can0  7E4   [8]  50 00 00 00 00 00 00 00&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Running CANOpen node on POSIX ===&lt;br /&gt;
&lt;br /&gt;
Build canopen-posix-test&lt;br /&gt;
{{cmd|code=&lt;br /&gt;
cd distrap-build/canopen/&lt;br /&gt;
make canopen-posix-test&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
As root create virtual terminal pair (linking /dev/ttyS0 with /dev/ttyS1) and start SLCAN on one side and&lt;br /&gt;
POSIX node on the other side (POSIX node utilizes SLCAN on its side as well&lt;br /&gt;
to convert SLCAN traffic to CAN traffic internally). To do so start the&lt;br /&gt;
following commands as root:&lt;br /&gt;
{{cmd|code=&lt;br /&gt;
socat -d -d pty,link=/dev/ttyS0,raw,echo=0 pty,link=/dev/ttyS1,raw,echo=0&lt;br /&gt;
# start slcand on one side&lt;br /&gt;
slcand -F -s8 -S115200 /dev/ttyS0 can0&lt;br /&gt;
&lt;br /&gt;
ip link set can0 up&lt;br /&gt;
&lt;br /&gt;
# start canopen-posix-test on the other side&lt;br /&gt;
# for that go the canopen folder you've used in previous step to build&lt;br /&gt;
# a binary as this needs to be started by root (or use su -c &amp;quot;..&amp;quot; as a normal user)&lt;br /&gt;
./build/canopen-posix-test/tower_init &amp;lt;&amp;gt; /dev/ttyS1 &amp;gt; /dev/ttyS1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now the node is running and should respond to messages. It first needs to be configured&lt;br /&gt;
(node ID is set during LSS phase) and then it can be used for testing fully featured&lt;br /&gt;
CANOpen communication. Try talking to it as described in section [[#Sending CAN messages manually]].&lt;/div&gt;</summary>
		<author><name>Srk</name></author>	</entry>

	</feed>