summaryrefslogtreecommitdiff
path: root/CantalopeSoftwareManual.mdwn
blob: c0a610d55e8a4edecba3beeafbb8a9bdb5505518 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# <a name="&quot;CANtalope: The lost manual&quot;"></a> "CANtalope: The lost manual"

## <a name="Introduction"></a> Introduction

Cantalope is a software and hardware system which allows a user to read all data on the CAN bus, and/or write data to the CAN bus. Data is entered in, or read out, in a human readable form. Depending on how CANtalope is run, the data entered in is then either sent to the physical CAN bus, or sent over UDP packets to anyone listening on the network (which could be the flight computer, the launch tower, the launch control laptops, or maybe just your own development laptop), or sent to the flight computer simulation software.

## <a name="Setting up CANtalope"></a> Setting up CANtalope

### <a name="Hardware Setup"></a> Hardware Setup

Before Jamey made CANtalope SuperCool(TM), way back in the time before Nathan Vegdahl graduated from high school, the CANtalope software was only meant to communicate with the CAN bus by using a special piece of hardware (the CANtalope node). The CANtalope node is a CAN bus monitor which sends all data from the CAN bus onto a serial cable, and vice versa. If connecting to the CAN bus directly from your laptop using a serial cable is what you want to do, you will need a CANtalope node. Here is how to get that set up:

- Get a CANtalope node. If you are with PSAS, Andrew can get you one. If you are just some random websurfer, learn how to build your own board by reading about the [[CantalopeHardware]].
- Plug the CAN bus into the CAN bus connection on the CANtalope node.
- Connect the CANtalope node to your computer using the CANtalope pin header to DB9 serial cable (also from Andrew, or build your own as described on the [[CantalopeHardware]] page).
- that should be it.

### <a name="Software Setup"></a> Software Setup

Before you can even start the program, you should do the following:

- If you don't already have a copy of the SVN tree, you can find instructions for getting that at [[AvionicsSVNAccess]].
- Go to /c/tools/cantalope/ and run make; this produces the executables can-serial and can-uncanny.
- If you plan to communicate with the CAN bus via the CANtalope node, you'll need read/write permissions for the serial device (/dev/ttyS\*) on your system. Add yourself to the group (usually "dialout") which owns the serial device file by doing "su; adduser janedoe dialout".

## <a name="Running CANtalope"></a> Running CANtalope

### <a name="Starting CANtalope"></a> Starting CANtalope

The CANtalope program has two modes: receive and transmit. Receive (aka "read") reads CAN from the CAN bus and outputs human readable format, and transmit (aka "write") sends CAN messages to the CAN bus after they are inputted in human readable form. A detailed and up to date list of CANtalope start-up arguments can be obtained by running "can --help". The basic stuff is here:

Fire up one terminal session as a can read session.<br />

    $>can read

Then fire up another terminal as a write session<br />

    $>can –t off write

Here the –t off turns off the need to add a timestamp to the can message you are going to send out.

### <a name="Interactive Use"></a> Interactive Use

In transmit mode, writing to the CAN bus: type ? or "help" to see an up to date list of commands.

In receive mode, reading from the CAN bus: typing ? should give you help (ack! it looks broken now. I'll try to fix it. - [[PeterWelte]] ) typing q should quit

### <a name="Useful Commands"></a> Useful Commands

Turn on the Jupiter board with the sting 0x243 0 1 0x01<br /> Enable Jupiter board uart transmit 0x298 1 2

## <a name="Contributors"></a> Contributors

[[TylerNguyen]] &amp; [[PeterWelte]] wrote the original CANtalope application. [[AndrewGreenberg]] et. al. designed and built the CANtalope nodes. [[JameySharp]] made the CANtalope software work with the flight computer (simulated and real). [[MarkusWeltin]] got the manual up here, and [[PeterWelte]] added a bit to it. Hopefully Peter hasn't confused anyone too much...