|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Does anybody have any documentation on the API for the 2CAN device? We're looking for a byte command protocol or something that would allow us to read the raw CAN data packets from the ethernet network.
Thanks. |
|
#2
|
||||
|
||||
|
Re: 2CAN API
If you are trying to send/recieve CAN frames from the cRIO you can just use the functions prototyped in the JaguarCANDriver.h (see CANJaguar c++ examples). this uses the FRC_2CANPlugin.out (see 2CAN User Manual).
If you are trying to send/receive frames outside of the cRIO you can socket to the 2can and do it yourself. We don't have documentation yet for the protocol but you can figure it out by looking at the code for the 2CAN plugin. Basically each CAN frame is wrapped in a udp datagram. To get the plugin source check out the CANJaguar repository from FIRSTForge (SVN). There is a sudirectory under "plugins" that has the FRC_2CANPlugin c++. If you have any trouble PM me and i can get you what you need. |
|
#3
|
|||
|
|||
|
Re: 2CAN API
Thank you so much for the information, we'll be sure to take you up on that offer.
|
|
#4
|
|||
|
|||
|
Re: 2CAN API
Hello,
I am also trying to decypher the 2CAN API in order to make a program that can control jaguars directly. I found the repository you referenced, but the username/password it provides doesn't seem to work. Do you know it its been changed? |
|
#5
|
||||
|
||||
|
Re: 2CAN API
Hmm... looks like there isn't anonymous access to the repository.
I posted the source on our website... http://www.crosstheroadelectronics.com/2CAN.htm Download Wind River Kernel Module Plugin Source (SVN rev 66) for FRC cRIO (Posted 3/12/2011) and import the project into Wind River. Then you can build the FRC_2CANPlugin.out that normally goes in the cRIO's FTP server. Take a look at C2CAN::receiveMessage and C2CAN::sendMessage. Specifically how STo2CAN_TxCANPacket and STo2CAN_RxCANPacket are used. Also I invite you to take a look at the C# example at... http://www.crosstheroadelectronics.com/Cross_link.html ...for using a 2CAN to control Jaguars with non-FIRST firmware. With this you can drive your robot with just your PC/laptop/driverstation/net-book and connection to your 2CAN (Ethernet or Wi-Fi). |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Plugin update for 2CAN | ozrien | CAN | 3 | 01-02-2010 16:26 |
| Wierd program behavior with LabVIEW and 2CAN | Jon236 | CAN | 7 | 01-02-2010 15:55 |
| 2CAN Plugin Released | Mike Copioli | Control System | 16 | 24-01-2010 03:31 |
| Legality of the 2CAN | Geek 2.0 | FRC Control System | 9 | 19-01-2010 20:51 |
| SMTP C++ API | Ryan M. | Programming | 1 | 23-09-2004 13:49 |