├── ArduinoCanbusMinitor.jpg ├── ArduinoCanbusMonitor ├── ArduinoCanbusCode │ └── ArduinoCanbusCode.ino ├── ArduinoCanbusMinitor.jpg ├── CS_code │ ├── ArduinoCanbusMonitor.csproj │ ├── ArduinoCanbusMonitor.sln │ ├── ArduioCanbus.cs │ ├── Form1.Designer.cs │ ├── Form1.cs │ ├── Form1.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ └── app.config ├── jSwingCode │ ├── Sav60EC.tmp │ ├── build.xml │ ├── build │ │ ├── built-jar.properties │ │ └── classes │ │ │ ├── .netbeans_automatic_build │ │ │ ├── .netbeans_update_resources │ │ │ ├── jSerialComm-2.0.2.jar │ │ │ ├── jTerminal$1.class │ │ │ ├── jTerminal$10.class │ │ │ ├── jTerminal$11.class │ │ │ ├── jTerminal$12.class │ │ │ ├── jTerminal$13.class │ │ │ ├── jTerminal$14.class │ │ │ ├── jTerminal$15.class │ │ │ ├── jTerminal$16.class │ │ │ ├── jTerminal$17.class │ │ │ ├── jTerminal$18.class │ │ │ ├── jTerminal$19.class │ │ │ ├── jTerminal$2.class │ │ │ ├── jTerminal$20.class │ │ │ ├── jTerminal$21.class │ │ │ ├── jTerminal$22.class │ │ │ ├── jTerminal$3.class │ │ │ ├── jTerminal$4.class │ │ │ ├── jTerminal$5.class │ │ │ ├── jTerminal$6.class │ │ │ ├── jTerminal$7.class │ │ │ ├── jTerminal$8.class │ │ │ ├── jTerminal$9.class │ │ │ ├── jTerminal.class │ │ │ └── jTerminal.form │ ├── manifest.mf │ ├── nbproject │ │ ├── build-impl.xml │ │ ├── genfiles.properties │ │ ├── private │ │ │ ├── private.properties │ │ │ └── private.xml │ │ ├── project.properties │ │ └── project.xml │ └── src │ │ ├── jSerialComm-2.0.2.jar │ │ ├── jTerminal.form │ │ └── jTerminal.java └── mcp_can.cpp ├── Linux_Java.jpg └── README.md /ArduinoCanbusMinitor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMinitor.jpg -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/ArduinoCanbusCode/ArduinoCanbusCode.ino: -------------------------------------------------------------------------------- 1 | // Arduino based Canbus monitor 2 | // communicates with host PC program written in C# 3 | 4 | #include 5 | #include "mcp_can.h" 6 | 7 | int stringSplit(char *str, const char *delim, int data[]); 8 | 9 | // the cs pin of the version after v1.1 is default to D9 10 | // v0.9b and v1.0 is default D10 11 | const int SPI_CS_PIN = 10;//9; 12 | 13 | 14 | MCP_CAN CAN(SPI_CS_PIN); // Set CS pin 15 | void setup() 16 | { 17 | while(!Serial); 18 | delay(1000); 19 | Serial.begin(115200); 20 | delay(1000); 21 | CanbusStart(); 22 | } 23 | 24 | // start canbus shield 25 | void CanbusStart(void) 26 | { 27 | Serial.println("Canbus monitor"); 28 | while (CAN_OK != CAN.begin(CAN_250KBPS)) // init can bus : baudrate = 500k 29 | { 30 | Serial.println("CAN BUS Shield init fail"); 31 | Serial.println(" Init CAN BUS Shield again"); 32 | delay(100); 33 | } 34 | Serial.println("CAN BUS Shield init ok!"); 35 | } 36 | 37 | enum CANcommand 38 | {CANBUSspeed=0, CANBUStransmit, Rx0mask, Rx0filter1, Rx0filter2, 39 | Rx1mask, Rx1filter3, Rx1filter4, Rx1filter5, Rx1filter6 }; 40 | 41 | char str[100]={0}; 42 | int strIndex=0; 43 | 44 | void loop() 45 | { 46 | // if serial data from PC process it 47 | if(Serial.available()) 48 | { 49 | char ch=Serial.read(); 50 | if(ch<' ') 51 | { // end of line parse the text[] for ints 52 | char text[50]={0}; 53 | long int result[100]={0}; 54 | int i=stringSplit(str, " ", result); 55 | Serial.print(i); Serial.print(" ints found = "); 56 | for(int j=0; jTx EXT "); else strcat(text,">Tx STD "); 70 | sprintf(&text[strlen(text)],"ID %08lx ", result[1]); 71 | Serial.print(text); 72 | static unsigned char stmp[8] = {0, 0, 0, 0, 0, 0, 0, 0}; 73 | if(result[3]) Serial.print(" RTR "); 74 | else 75 | { 76 | Serial.print("data "); 77 | for(int i = 0; i<8; i++) // print the data 78 | { 79 | text[0]=0;; 80 | sprintf(text,"%02X", result[4+i]); 81 | Serial.print(text); 82 | stmp[i]=result[4+i]; 83 | } 84 | } 85 | Serial.println(); 86 | // byte sendMsgBuf(unsigned long id, byte ext, byte len, const byte *buf, bool wait_sent=true); // send buf 87 | CAN.sendMsgBuf(result[1], result[2], result[3], 8, stmp); 88 | break; 89 | // byte init_Mask(byte num, byte ext, unsigned long ulData); // init Masks 90 | case Rx0mask: CAN.init_Mask(0, result[1], result[2]); break; // there are 2 mask in mcp2515, you need to set both of them 91 | case Rx1mask: CAN.init_Mask(1, result[1], result[2]); break; // there are 2 mask in mcp2515, you need to set both of them 92 | case Rx0filter1: CAN.init_Filt(0,result[1], result[2]); break; // there are 6 filter in mcp2515 93 | case Rx0filter2: CAN.init_Filt(1,result[1], result[2]); break; // there are 6 filter in mcp2515 94 | case Rx1filter3: CAN.init_Filt(2,result[1], result[2]); break; // there are 6 filter in mcp2515 95 | case Rx1filter4: CAN.init_Filt(3,result[1], result[2]); break; // there are 6 filter in mcp2515 96 | case Rx1filter5: CAN.init_Filt(4,result[1], result[2]); break; // there are 6 filter in mcp2515 97 | case Rx1filter6: CAN.init_Filt(5,result[1], result[2]); break; // there are 6 filter in mcp2515 98 | } 99 | } 100 | else 101 | { 102 | if(ch=='>') CanbusStart(); // if line contains > restart canbus 103 | else 104 | { // add character to text[] 105 | str[strIndex++]=ch; 106 | if(strIndex>99)strIndex=99; 107 | str[strIndex]=0; 108 | } 109 | } 110 | } 111 | // check for received message 112 | unsigned char len = 0; 113 | unsigned char buf[8]={0}; 114 | if(CAN_MSGAVAIL == CAN.checkReceive()) // check if data coming 115 | { 116 | CAN.readMsgBuf(&len, buf); // read data, len: data length, buf: data buf 117 | unsigned long int canId = CAN.getCanId(); 118 | char text[50]={0}; 119 | // setup standard 11 bit or extended 29 bit frame and add ID value 120 | if(CAN.isExtendedFrame()) strcat(text,">Rx EXT "); else strcat(text,">Rx STD "); 121 | sprintf(&text[strlen(text)],"ID %08lx ", canId); 122 | Serial.print(text); 123 | // check RTR or data frame 124 | if(CAN.isRemoteRequest()) Serial.print(" RTR "); 125 | else 126 | { 127 | Serial.print("data "); 128 | for(int i = 0; i<8; i++) // print the data 129 | { 130 | text[0]=0;; 131 | sprintf(text,"%02X", buf[i]); 132 | Serial.print(text); 133 | // Serial.print(buf[i], HEX); 134 | } 135 | } 136 | Serial.println(); 137 | } 138 | } 139 | 140 | // split string str into long int values using delimiters 141 | // this version uses atof() and does not return tokens with value 0.0f 142 | // return function result number of floats converted 143 | // return converted values in data[] 144 | int stringSplit(char *str, const char *delim, long int data[]) 145 | { 146 | //Serial.print("Splitting string into tokens:\n"); 147 | //Serial.println(str); 148 | int i=0; 149 | char *pch = strtok (str,delim); // get first token 150 | while (pch != NULL) 151 | { 152 | float x=999; 153 | //Serial.print("string found '"); Serial.print(pch);Serial.println("'"); 154 | // check if token is a int 155 | if(strcmp(pch,"0") == 0) 156 | {data[i]=0; /*Serial.print("int value decoded "); Serial.println(data[i]);*/ data[i++]; } 157 | else 158 | if((data[i]=atol(pch)) != 0) { /*Serial.print("int value decoded "); Serial.println(data[i]);*/ data[i++]; } 159 | else Serial.println(" not a int"); 160 | pch = strtok (NULL, delim); // parse next token 161 | } 162 | return i; 163 | } 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/ArduinoCanbusMinitor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/ArduinoCanbusMinitor.jpg -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/ArduinoCanbusMonitor.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | x86 6 | 8.0.30703 7 | 2.0 8 | {F6E7D935-D0D1-45C5-9168-0BFF65B9906A} 9 | Exe 10 | Properties 11 | PIC24mechatronicsCsharp 12 | PIC24mechatronicsCsharpTest 13 | v4.5 14 | 15 | 16 | 512 17 | publish\ 18 | true 19 | Disk 20 | false 21 | Foreground 22 | 7 23 | Days 24 | false 25 | false 26 | true 27 | 0 28 | 1.0.0.%2a 29 | false 30 | false 31 | true 32 | 33 | 34 | x86 35 | true 36 | full 37 | false 38 | bin\Debug\ 39 | DEBUG;TRACE 40 | prompt 41 | 4 42 | false 43 | false 44 | 45 | 46 | AnyCPU 47 | pdbonly 48 | true 49 | bin\Release\ 50 | TRACE 51 | prompt 52 | 4 53 | false 54 | true 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | Form 74 | 75 | 76 | Form1.cs 77 | 78 | 79 | 80 | 81 | 82 | Form1.cs 83 | 84 | 85 | ResXFileCodeGenerator 86 | Resources.Designer.cs 87 | Designer 88 | 89 | 90 | True 91 | Resources.resx 92 | True 93 | 94 | 95 | 96 | SettingsSingleFileGenerator 97 | Settings.Designer.cs 98 | 99 | 100 | True 101 | Settings.settings 102 | True 103 | 104 | 105 | 106 | 107 | False 108 | Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 109 | true 110 | 111 | 112 | False 113 | .NET Framework 3.5 SP1 Client Profile 114 | false 115 | 116 | 117 | False 118 | .NET Framework 3.5 SP1 119 | false 120 | 121 | 122 | False 123 | Windows Installer 3.1 124 | true 125 | 126 | 127 | 128 | 135 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/ArduinoCanbusMonitor.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27004.2005 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArduinoCanbusMonitor", "ArduinoCanbusMonitor.csproj", "{F6E7D935-D0D1-45C5-9168-0BFF65B9906A}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x86 = Debug|x86 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {F6E7D935-D0D1-45C5-9168-0BFF65B9906A}.Debug|x86.ActiveCfg = Debug|x86 15 | {F6E7D935-D0D1-45C5-9168-0BFF65B9906A}.Debug|x86.Build.0 = Debug|x86 16 | {F6E7D935-D0D1-45C5-9168-0BFF65B9906A}.Release|x86.ActiveCfg = Release|x86 17 | {F6E7D935-D0D1-45C5-9168-0BFF65B9906A}.Release|x86.Build.0 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {81B2375E-E793-4AD8-9A4F-475D76624E8F} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/ArduioCanbus.cs: -------------------------------------------------------------------------------- 1 | // to check for CLS compliance add [assembly: CLSCompliant(true)]to AssemblyInfo.cs 2 | 3 | 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Runtime.InteropServices; 9 | using System.Threading; 10 | using System.IO.Ports; 11 | 12 | 13 | namespace Arduino_Canbus 14 | { 15 | internal class Arduino_Canbus_interface 16 | { 17 | /* CANBUS functions */ 18 | 19 | /** read CANBUS setup parameters 20 | \param canbusMask 29-bit canbus mask 21 | \param canbusFilter 29-bit canbus receive filter 22 | \param CANBUSspeed - canbus baud rate 125, 250 or 500kbs 23 | */ 24 | // [DllImport("PIC24mechatronics.dll")] 25 | public static bool CANBUSreadSetup(ref UInt32 canbusMask, ref UInt32 canbusFilter, ref int canbusSpeed) 26 | { 27 | return false; 28 | } 29 | 30 | // convert UInt16 to two bytes for transmission over USB 31 | static void UInt16_to_Byte(UInt16 i, ref Byte[] d, int index) 32 | { 33 | d[index + 1] = Convert.ToByte((i >> 8) & 0xff); d[index] = Convert.ToByte(i & 0xFF); 34 | } 35 | 36 | // convert UInt32 to four bytes for transmission over USB 37 | static void UInt32_to_Byte(UInt32 i, ref Byte[] d, int index) 38 | { 39 | d[index] = Convert.ToByte(i & 0xFF); 40 | d[index + 1] = Convert.ToByte((i >> 8) & 0xff); 41 | d[index + 2] = Convert.ToByte((i >> 16) & 0xff); 42 | d[index + 3] = Convert.ToByte((i >> 24) & 0xff); 43 | } 44 | 45 | 46 | /** setup CANBUS parameters 47 | \param Rx0extended if 1 use extended filters and mask else standard for receiver 0 48 | \param Rx0mask 11bit or 29-bit canbus mask for receiver 0 49 | \param Rx0filter[] 2 of 11-bit or 29-bit canbus receive filters for receiver 0 50 | \param Rx1extended if 1 use extended filters and mask else standard for receiver 1 51 | \param Rx1mask 11bit or 29-bit canbus mask for receiver 1 52 | \param Rx1filter[] 4 of 11-bit or 29-bit canbus receive filters for receiver 1 53 | \param CANBUSspeed - canbus baud rate 125, 250 or 500kbs 54 | */ 55 | // [DllImport("PIC24mechatronics.dll")] 56 | enum CANcommand : byte 57 | { 58 | CANBUSspeed = (byte)'0', CANBUStransmit, Rx0mask, Rx0filter1, Rx0filter2, 59 | Rx1mask, Rx1filter3, Rx1filter4, Rx1filter5, Rx1filter6 60 | }; 61 | 62 | public static void CANBUSsetup(SerialPort serialPort1, UInt16 Rx0extended, UInt32 Rx0mask, UInt32[] Rx0filter, 63 | UInt16 Rx1extended, UInt32 Rx1mask, UInt32[] Rx1filter, UInt16 CANBUSspeed)//UInt32 canbusMask, UInt32 canbusFilter, int canbusSpeed); 64 | { 65 | Console.WriteLine("CANBUSsetup"); 66 | serialPort1.Write((char)CANcommand.CANBUSspeed + " " + CANBUSspeed.ToString() + Environment.NewLine); 67 | serialPort1.Write((char)CANcommand.Rx0mask + " " + +Rx0extended + " " + Rx0mask.ToString() + "\n"); 68 | serialPort1.Write((char)CANcommand.Rx1mask + " " + +Rx1extended + " " + Rx1mask.ToString() + "\n"); 69 | serialPort1.Write((char)CANcommand.Rx0filter1 + " " + +Rx0extended + " " + Rx0filter[0].ToString() + "\n"); 70 | serialPort1.Write((char)CANcommand.Rx0filter2 + " " + +Rx0extended + " " + Rx0filter[1].ToString() + "\n"); 71 | serialPort1.Write((char)CANcommand.Rx1filter3 + " " + +Rx1extended + " " + Rx1filter[0].ToString() + "\n"); 72 | serialPort1.Write((char)CANcommand.Rx1filter4 + " " + +Rx1extended + " " + Rx1filter[1].ToString() + "\n"); 73 | serialPort1.Write((char)CANcommand.Rx1filter5 + " " + +Rx1extended + " " + Rx1filter[2].ToString() + "\n"); 74 | serialPort1.Write((char)CANcommand.Rx1filter6 + " " + +Rx1extended + " " + Rx1filter[3].ToString() + "\n"); 75 | } 76 | 77 | /** transmit a CANBUS message 78 | \param extendedID - if non 0 using 29-bit ID else 11-bit 79 | \param canbusOutputID 11-bit of 29-bit canbus message ID 80 | \param RTR if 1 sending RTR else data 81 | \param message[] 8 bytes of data to transmit (Not sent wth RTR) 82 | */ 83 | // [DllImport("PIC24mechatronics.dll")] 84 | public static void CANBUStransmit(SerialPort serialPort1, int extendedID, UInt32 canbusOutputID, int RTR, int[] message) 85 | { 86 | serialPort1.Write((char)CANcommand.CANBUStransmit + " " + canbusOutputID.ToString() 87 | + " " + extendedID.ToString() + " " + RTR.ToString() 88 | + " " + message[0].ToString() + " " + message[1].ToString() + " " + message[2].ToString() + " " + message[3].ToString() 89 | + " " + message[4].ToString() + " " + message[5].ToString() + " " + message[6].ToString() + " " + message[7].ToString() + Environment.NewLine); 90 | } 91 | 92 | /* check if CANBUS message has been received 93 | \param receivedData 0 nothing received, 1 standard frame received, 2 extended frame received 94 | \param canbusReceivedID 29-bit receive ID if read is sucessful 95 | \param RTR = 1 if RTR else 0 if data message 96 | \param canbusReceivedMessage[8] message recived if sucessful (empty if RTR) 97 | \return 0 if it fails, i.e. if the board has been disconnected 98 | \return 1 if target board and software version OK 99 | \return 2 if target board and/or software version error 100 | */ 101 | // [DllImport("PIC24mechatronics.dll")] 102 | public static bool CANBUSreceived(ref int receivedData, ref UInt32 canbusReceivedID, ref int RTR, ref int[] message) 103 | { 104 | return false; 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Arduino_Canbus 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker(); 33 | this.statusStrip1 = new System.Windows.Forms.StatusStrip(); 34 | this.label8 = new System.Windows.Forms.Label(); 35 | this.panel5 = new System.Windows.Forms.Panel(); 36 | this.label12 = new System.Windows.Forms.Label(); 37 | this.panel8 = new System.Windows.Forms.Panel(); 38 | this.panel10 = new System.Windows.Forms.Panel(); 39 | this.CANBUSmaskRFX1textBox = new System.Windows.Forms.TextBox(); 40 | this.CANBUSfilterRXF1_4textBox = new System.Windows.Forms.TextBox(); 41 | this.CANBUSfilterRXF1_3textBox = new System.Windows.Forms.TextBox(); 42 | this.label21 = new System.Windows.Forms.Label(); 43 | this.label20 = new System.Windows.Forms.Label(); 44 | this.label17 = new System.Windows.Forms.Label(); 45 | this.RFX1checkBox = new System.Windows.Forms.CheckBox(); 46 | this.CANBUSfilterRXF1_2textBox = new System.Windows.Forms.TextBox(); 47 | this.CANBUSfilterRXF1_1textBox = new System.Windows.Forms.TextBox(); 48 | this.label18 = new System.Windows.Forms.Label(); 49 | this.label19 = new System.Windows.Forms.Label(); 50 | this.panel9 = new System.Windows.Forms.Panel(); 51 | this.CANBUSfilterRXF0_2textBox = new System.Windows.Forms.TextBox(); 52 | this.label16 = new System.Windows.Forms.Label(); 53 | this.RFX0checkBox = new System.Windows.Forms.CheckBox(); 54 | this.CANBUSfilterRXF0_1textBox = new System.Windows.Forms.TextBox(); 55 | this.CANBUSmaskRFX0textBox = new System.Windows.Forms.TextBox(); 56 | this.label9 = new System.Windows.Forms.Label(); 57 | this.label14 = new System.Windows.Forms.Label(); 58 | this.setCanbus = new System.Windows.Forms.Button(); 59 | this.panel6 = new System.Windows.Forms.Panel(); 60 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 61 | this.button500 = new System.Windows.Forms.RadioButton(); 62 | this.button250 = new System.Windows.Forms.RadioButton(); 63 | this.button125 = new System.Windows.Forms.RadioButton(); 64 | this.label15 = new System.Windows.Forms.Label(); 65 | this.panel7 = new System.Windows.Forms.Panel(); 66 | this.RTRcheckBox = new System.Windows.Forms.CheckBox(); 67 | this.extended29bitIDcheckBox = new System.Windows.Forms.CheckBox(); 68 | this.transmitButton = new System.Windows.Forms.Button(); 69 | this.canbusMessageTextBox = new System.Windows.Forms.TextBox(); 70 | this.label10 = new System.Windows.Forms.Label(); 71 | this.label11 = new System.Windows.Forms.Label(); 72 | this.canbusIDtextBox = new System.Windows.Forms.TextBox(); 73 | this.canbusReceivedMessageTextBox = new System.Windows.Forms.TextBox(); 74 | this.label13 = new System.Windows.Forms.Label(); 75 | this.terminalTextBox = new System.Windows.Forms.TextBox(); 76 | this.serialPort1 = new System.IO.Ports.SerialPort(this.components); 77 | this.label1 = new System.Windows.Forms.Label(); 78 | this.panel5.SuspendLayout(); 79 | this.panel8.SuspendLayout(); 80 | this.panel10.SuspendLayout(); 81 | this.panel9.SuspendLayout(); 82 | this.panel6.SuspendLayout(); 83 | this.groupBox1.SuspendLayout(); 84 | this.panel7.SuspendLayout(); 85 | this.SuspendLayout(); 86 | // 87 | // backgroundWorker1 88 | // 89 | this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork); 90 | // 91 | // statusStrip1 92 | // 93 | this.statusStrip1.Location = new System.Drawing.Point(0, 683); 94 | this.statusStrip1.Name = "statusStrip1"; 95 | this.statusStrip1.Size = new System.Drawing.Size(1218, 22); 96 | this.statusStrip1.TabIndex = 0; 97 | this.statusStrip1.Text = "statusStrip1"; 98 | // 99 | // label8 100 | // 101 | this.label8.AutoSize = true; 102 | this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 103 | this.label8.Location = new System.Drawing.Point(382, 9); 104 | this.label8.Name = "label8"; 105 | this.label8.Size = new System.Drawing.Size(313, 29); 106 | this.label8.TabIndex = 15; 107 | this.label8.Text = "C# Arduino Canbus Monitor"; 108 | // 109 | // panel5 110 | // 111 | this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 112 | this.panel5.Controls.Add(this.label12); 113 | this.panel5.Controls.Add(this.panel8); 114 | this.panel5.Controls.Add(this.panel6); 115 | this.panel5.Controls.Add(this.panel7); 116 | this.panel5.Location = new System.Drawing.Point(12, 59); 117 | this.panel5.Name = "panel5"; 118 | this.panel5.Size = new System.Drawing.Size(409, 511); 119 | this.panel5.TabIndex = 17; 120 | // 121 | // label12 122 | // 123 | this.label12.AutoSize = true; 124 | this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 125 | this.label12.Location = new System.Drawing.Point(104, 9); 126 | this.label12.Name = "label12"; 127 | this.label12.Size = new System.Drawing.Size(138, 24); 128 | this.label12.TabIndex = 9; 129 | this.label12.Text = "CANBUS setup"; 130 | // 131 | // panel8 132 | // 133 | this.panel8.Controls.Add(this.panel10); 134 | this.panel8.Controls.Add(this.panel9); 135 | this.panel8.Controls.Add(this.setCanbus); 136 | this.panel8.Location = new System.Drawing.Point(11, 97); 137 | this.panel8.Name = "panel8"; 138 | this.panel8.Size = new System.Drawing.Size(337, 295); 139 | this.panel8.TabIndex = 8; 140 | // 141 | // panel10 142 | // 143 | this.panel10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 144 | this.panel10.Controls.Add(this.CANBUSmaskRFX1textBox); 145 | this.panel10.Controls.Add(this.CANBUSfilterRXF1_4textBox); 146 | this.panel10.Controls.Add(this.CANBUSfilterRXF1_3textBox); 147 | this.panel10.Controls.Add(this.label21); 148 | this.panel10.Controls.Add(this.label20); 149 | this.panel10.Controls.Add(this.label17); 150 | this.panel10.Controls.Add(this.RFX1checkBox); 151 | this.panel10.Controls.Add(this.CANBUSfilterRXF1_2textBox); 152 | this.panel10.Controls.Add(this.CANBUSfilterRXF1_1textBox); 153 | this.panel10.Controls.Add(this.label18); 154 | this.panel10.Controls.Add(this.label19); 155 | this.panel10.Location = new System.Drawing.Point(67, 126); 156 | this.panel10.Name = "panel10"; 157 | this.panel10.Size = new System.Drawing.Size(256, 166); 158 | this.panel10.TabIndex = 8; 159 | // 160 | // CANBUSmaskRFX1textBox 161 | // 162 | this.CANBUSmaskRFX1textBox.Location = new System.Drawing.Point(129, 25); 163 | this.CANBUSmaskRFX1textBox.Name = "CANBUSmaskRFX1textBox"; 164 | this.CANBUSmaskRFX1textBox.Size = new System.Drawing.Size(114, 20); 165 | this.CANBUSmaskRFX1textBox.TabIndex = 13; 166 | this.CANBUSmaskRFX1textBox.TextChanged += new System.EventHandler(this.canbusTextBox_TextChanged); 167 | // 168 | // CANBUSfilterRXF1_4textBox 169 | // 170 | this.CANBUSfilterRXF1_4textBox.Location = new System.Drawing.Point(128, 125); 171 | this.CANBUSfilterRXF1_4textBox.Name = "CANBUSfilterRXF1_4textBox"; 172 | this.CANBUSfilterRXF1_4textBox.Size = new System.Drawing.Size(114, 20); 173 | this.CANBUSfilterRXF1_4textBox.TabIndex = 12; 174 | this.CANBUSfilterRXF1_4textBox.TextChanged += new System.EventHandler(this.canbusTextBox_TextChanged); 175 | // 176 | // CANBUSfilterRXF1_3textBox 177 | // 178 | this.CANBUSfilterRXF1_3textBox.Location = new System.Drawing.Point(128, 99); 179 | this.CANBUSfilterRXF1_3textBox.Name = "CANBUSfilterRXF1_3textBox"; 180 | this.CANBUSfilterRXF1_3textBox.Size = new System.Drawing.Size(114, 20); 181 | this.CANBUSfilterRXF1_3textBox.TabIndex = 11; 182 | this.CANBUSfilterRXF1_3textBox.TextChanged += new System.EventHandler(this.canbusTextBox_TextChanged); 183 | // 184 | // label21 185 | // 186 | this.label21.AutoSize = true; 187 | this.label21.Location = new System.Drawing.Point(4, 128); 188 | this.label21.Name = "label21"; 189 | this.label21.Size = new System.Drawing.Size(111, 13); 190 | this.label21.TabIndex = 10; 191 | this.label21.Text = "receiver 1 filter 4 (hex)"; 192 | // 193 | // label20 194 | // 195 | this.label20.AutoSize = true; 196 | this.label20.Location = new System.Drawing.Point(3, 102); 197 | this.label20.Name = "label20"; 198 | this.label20.Size = new System.Drawing.Size(111, 13); 199 | this.label20.TabIndex = 9; 200 | this.label20.Text = "receiver 1 filter 3 (hex)"; 201 | // 202 | // label17 203 | // 204 | this.label17.AutoSize = true; 205 | this.label17.Location = new System.Drawing.Point(3, 76); 206 | this.label17.Name = "label17"; 207 | this.label17.Size = new System.Drawing.Size(111, 13); 208 | this.label17.TabIndex = 7; 209 | this.label17.Text = "receiver 1 filter 2 (hex)"; 210 | // 211 | // RFX1checkBox 212 | // 213 | this.RFX1checkBox.AutoSize = true; 214 | this.RFX1checkBox.Checked = true; 215 | this.RFX1checkBox.CheckState = System.Windows.Forms.CheckState.Checked; 216 | this.RFX1checkBox.Location = new System.Drawing.Point(20, 8); 217 | this.RFX1checkBox.Name = "RFX1checkBox"; 218 | this.RFX1checkBox.Size = new System.Drawing.Size(228, 17); 219 | this.RFX1checkBox.TabIndex = 0; 220 | this.RFX1checkBox.Text = "extended 29-bit ID (else standard 11-bit ID)\r\n"; 221 | this.RFX1checkBox.UseVisualStyleBackColor = true; 222 | this.RFX1checkBox.CheckedChanged += new System.EventHandler(this.RFX1checkBox_CheckedChanged); 223 | // 224 | // CANBUSfilterRXF1_2textBox 225 | // 226 | this.CANBUSfilterRXF1_2textBox.Location = new System.Drawing.Point(128, 73); 227 | this.CANBUSfilterRXF1_2textBox.Name = "CANBUSfilterRXF1_2textBox"; 228 | this.CANBUSfilterRXF1_2textBox.Size = new System.Drawing.Size(114, 20); 229 | this.CANBUSfilterRXF1_2textBox.TabIndex = 5; 230 | this.CANBUSfilterRXF1_2textBox.TextChanged += new System.EventHandler(this.canbusTextBox_TextChanged); 231 | // 232 | // CANBUSfilterRXF1_1textBox 233 | // 234 | this.CANBUSfilterRXF1_1textBox.Location = new System.Drawing.Point(128, 49); 235 | this.CANBUSfilterRXF1_1textBox.Name = "CANBUSfilterRXF1_1textBox"; 236 | this.CANBUSfilterRXF1_1textBox.Size = new System.Drawing.Size(114, 20); 237 | this.CANBUSfilterRXF1_1textBox.TabIndex = 6; 238 | this.CANBUSfilterRXF1_1textBox.TextChanged += new System.EventHandler(this.canbusTextBox_TextChanged); 239 | // 240 | // label18 241 | // 242 | this.label18.AutoSize = true; 243 | this.label18.Location = new System.Drawing.Point(4, 52); 244 | this.label18.Name = "label18"; 245 | this.label18.Size = new System.Drawing.Size(111, 13); 246 | this.label18.TabIndex = 3; 247 | this.label18.Text = "receiver 1 filter 1 (hex)"; 248 | // 249 | // label19 250 | // 251 | this.label19.AutoSize = true; 252 | this.label19.Location = new System.Drawing.Point(4, 28); 253 | this.label19.Name = "label19"; 254 | this.label19.Size = new System.Drawing.Size(108, 13); 255 | this.label19.TabIndex = 4; 256 | this.label19.Text = "receiver 1 mask (hex)"; 257 | // 258 | // panel9 259 | // 260 | this.panel9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 261 | this.panel9.Controls.Add(this.CANBUSfilterRXF0_2textBox); 262 | this.panel9.Controls.Add(this.label16); 263 | this.panel9.Controls.Add(this.RFX0checkBox); 264 | this.panel9.Controls.Add(this.CANBUSfilterRXF0_1textBox); 265 | this.panel9.Controls.Add(this.CANBUSmaskRFX0textBox); 266 | this.panel9.Controls.Add(this.label9); 267 | this.panel9.Controls.Add(this.label14); 268 | this.panel9.Location = new System.Drawing.Point(67, 11); 269 | this.panel9.Name = "panel9"; 270 | this.panel9.Size = new System.Drawing.Size(256, 100); 271 | this.panel9.TabIndex = 7; 272 | // 273 | // CANBUSfilterRXF0_2textBox 274 | // 275 | this.CANBUSfilterRXF0_2textBox.Location = new System.Drawing.Point(128, 73); 276 | this.CANBUSfilterRXF0_2textBox.Name = "CANBUSfilterRXF0_2textBox"; 277 | this.CANBUSfilterRXF0_2textBox.Size = new System.Drawing.Size(114, 20); 278 | this.CANBUSfilterRXF0_2textBox.TabIndex = 8; 279 | this.CANBUSfilterRXF0_2textBox.TextChanged += new System.EventHandler(this.canbusTextBox_TextChanged); 280 | // 281 | // label16 282 | // 283 | this.label16.AutoSize = true; 284 | this.label16.Location = new System.Drawing.Point(3, 76); 285 | this.label16.Name = "label16"; 286 | this.label16.Size = new System.Drawing.Size(111, 13); 287 | this.label16.TabIndex = 7; 288 | this.label16.Text = "receiver 0 filter 2 (hex)"; 289 | // 290 | // RFX0checkBox 291 | // 292 | this.RFX0checkBox.AutoSize = true; 293 | this.RFX0checkBox.Location = new System.Drawing.Point(20, 8); 294 | this.RFX0checkBox.Name = "RFX0checkBox"; 295 | this.RFX0checkBox.Size = new System.Drawing.Size(228, 17); 296 | this.RFX0checkBox.TabIndex = 0; 297 | this.RFX0checkBox.Text = "extended 29-bit ID (else standard 11-bit ID)\r\n"; 298 | this.RFX0checkBox.UseVisualStyleBackColor = true; 299 | this.RFX0checkBox.CheckedChanged += new System.EventHandler(this.RFX0checkBox_CheckedChanged); 300 | // 301 | // CANBUSfilterRXF0_1textBox 302 | // 303 | this.CANBUSfilterRXF0_1textBox.Location = new System.Drawing.Point(128, 49); 304 | this.CANBUSfilterRXF0_1textBox.Name = "CANBUSfilterRXF0_1textBox"; 305 | this.CANBUSfilterRXF0_1textBox.Size = new System.Drawing.Size(114, 20); 306 | this.CANBUSfilterRXF0_1textBox.TabIndex = 5; 307 | this.CANBUSfilterRXF0_1textBox.TextChanged += new System.EventHandler(this.canbusTextBox_TextChanged); 308 | // 309 | // CANBUSmaskRFX0textBox 310 | // 311 | this.CANBUSmaskRFX0textBox.Location = new System.Drawing.Point(128, 25); 312 | this.CANBUSmaskRFX0textBox.Name = "CANBUSmaskRFX0textBox"; 313 | this.CANBUSmaskRFX0textBox.Size = new System.Drawing.Size(114, 20); 314 | this.CANBUSmaskRFX0textBox.TabIndex = 6; 315 | this.CANBUSmaskRFX0textBox.TextChanged += new System.EventHandler(this.canbusTextBox_TextChanged); 316 | // 317 | // label9 318 | // 319 | this.label9.AutoSize = true; 320 | this.label9.Location = new System.Drawing.Point(4, 52); 321 | this.label9.Name = "label9"; 322 | this.label9.Size = new System.Drawing.Size(111, 13); 323 | this.label9.TabIndex = 3; 324 | this.label9.Text = "receiver 0 filter 1 (hex)"; 325 | // 326 | // label14 327 | // 328 | this.label14.AutoSize = true; 329 | this.label14.Location = new System.Drawing.Point(4, 28); 330 | this.label14.Name = "label14"; 331 | this.label14.Size = new System.Drawing.Size(108, 13); 332 | this.label14.TabIndex = 4; 333 | this.label14.Text = "receiver 0 mask (hex)"; 334 | // 335 | // setCanbus 336 | // 337 | this.setCanbus.Location = new System.Drawing.Point(3, 76); 338 | this.setCanbus.Name = "setCanbus"; 339 | this.setCanbus.Size = new System.Drawing.Size(55, 160); 340 | this.setCanbus.TabIndex = 2; 341 | this.setCanbus.Text = "set "; 342 | this.setCanbus.UseVisualStyleBackColor = true; 343 | this.setCanbus.Click += new System.EventHandler(this.setCanbus_Click); 344 | // 345 | // panel6 346 | // 347 | this.panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 348 | this.panel6.Controls.Add(this.groupBox1); 349 | this.panel6.Location = new System.Drawing.Point(53, 39); 350 | this.panel6.Name = "panel6"; 351 | this.panel6.Size = new System.Drawing.Size(269, 46); 352 | this.panel6.TabIndex = 0; 353 | // 354 | // groupBox1 355 | // 356 | this.groupBox1.Controls.Add(this.button500); 357 | this.groupBox1.Controls.Add(this.button250); 358 | this.groupBox1.Controls.Add(this.button125); 359 | this.groupBox1.Controls.Add(this.label15); 360 | this.groupBox1.Location = new System.Drawing.Point(9, 3); 361 | this.groupBox1.Name = "groupBox1"; 362 | this.groupBox1.Size = new System.Drawing.Size(255, 38); 363 | this.groupBox1.TabIndex = 0; 364 | this.groupBox1.TabStop = false; 365 | // 366 | // button500 367 | // 368 | this.button500.AutoSize = true; 369 | this.button500.Location = new System.Drawing.Point(185, 13); 370 | this.button500.Name = "button500"; 371 | this.button500.Size = new System.Drawing.Size(60, 17); 372 | this.button500.TabIndex = 3; 373 | this.button500.Text = "500kbs"; 374 | this.button500.UseVisualStyleBackColor = true; 375 | this.button500.CheckedChanged += new System.EventHandler(this.setCanbus_Click); 376 | // 377 | // button250 378 | // 379 | this.button250.AutoSize = true; 380 | this.button250.Checked = true; 381 | this.button250.Location = new System.Drawing.Point(119, 14); 382 | this.button250.Name = "button250"; 383 | this.button250.Size = new System.Drawing.Size(60, 17); 384 | this.button250.TabIndex = 2; 385 | this.button250.TabStop = true; 386 | this.button250.Text = "250kbs"; 387 | this.button250.UseVisualStyleBackColor = true; 388 | this.button250.CheckedChanged += new System.EventHandler(this.setCanbus_Click); 389 | // 390 | // button125 391 | // 392 | this.button125.AutoSize = true; 393 | this.button125.Location = new System.Drawing.Point(53, 13); 394 | this.button125.Name = "button125"; 395 | this.button125.Size = new System.Drawing.Size(60, 17); 396 | this.button125.TabIndex = 1; 397 | this.button125.Text = "125kbs"; 398 | this.button125.UseVisualStyleBackColor = true; 399 | this.button125.CheckedChanged += new System.EventHandler(this.setCanbus_Click); 400 | // 401 | // label15 402 | // 403 | this.label15.AutoSize = true; 404 | this.label15.Location = new System.Drawing.Point(6, 14); 405 | this.label15.Name = "label15"; 406 | this.label15.Size = new System.Drawing.Size(36, 13); 407 | this.label15.TabIndex = 0; 408 | this.label15.Text = "speed"; 409 | // 410 | // panel7 411 | // 412 | this.panel7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 413 | this.panel7.Controls.Add(this.RTRcheckBox); 414 | this.panel7.Controls.Add(this.extended29bitIDcheckBox); 415 | this.panel7.Controls.Add(this.transmitButton); 416 | this.panel7.Controls.Add(this.canbusMessageTextBox); 417 | this.panel7.Controls.Add(this.label10); 418 | this.panel7.Controls.Add(this.label11); 419 | this.panel7.Controls.Add(this.canbusIDtextBox); 420 | this.panel7.Location = new System.Drawing.Point(28, 408); 421 | this.panel7.Name = "panel7"; 422 | this.panel7.Size = new System.Drawing.Size(337, 86); 423 | this.panel7.TabIndex = 7; 424 | // 425 | // RTRcheckBox 426 | // 427 | this.RTRcheckBox.AutoSize = true; 428 | this.RTRcheckBox.Location = new System.Drawing.Point(223, 7); 429 | this.RTRcheckBox.Name = "RTRcheckBox"; 430 | this.RTRcheckBox.Size = new System.Drawing.Size(49, 17); 431 | this.RTRcheckBox.TabIndex = 8; 432 | this.RTRcheckBox.Text = "RTR"; 433 | this.RTRcheckBox.UseVisualStyleBackColor = true; 434 | this.RTRcheckBox.CheckedChanged += new System.EventHandler(this.RTRcheckBox_CheckedChanged); 435 | // 436 | // extended29bitIDcheckBox 437 | // 438 | this.extended29bitIDcheckBox.AutoSize = true; 439 | this.extended29bitIDcheckBox.Location = new System.Drawing.Point(79, 8); 440 | this.extended29bitIDcheckBox.Name = "extended29bitIDcheckBox"; 441 | this.extended29bitIDcheckBox.Size = new System.Drawing.Size(114, 17); 442 | this.extended29bitIDcheckBox.TabIndex = 7; 443 | this.extended29bitIDcheckBox.Text = "Extended 29 bit ID"; 444 | this.extended29bitIDcheckBox.UseVisualStyleBackColor = true; 445 | // 446 | // transmitButton 447 | // 448 | this.transmitButton.Location = new System.Drawing.Point(8, 41); 449 | this.transmitButton.Name = "transmitButton"; 450 | this.transmitButton.Size = new System.Drawing.Size(100, 23); 451 | this.transmitButton.TabIndex = 1; 452 | this.transmitButton.Text = "transmit message"; 453 | this.transmitButton.UseVisualStyleBackColor = true; 454 | this.transmitButton.Click += new System.EventHandler(this.transmitButton_Click); 455 | // 456 | // canbusMessageTextBox 457 | // 458 | this.canbusMessageTextBox.Location = new System.Drawing.Point(207, 56); 459 | this.canbusMessageTextBox.Name = "canbusMessageTextBox"; 460 | this.canbusMessageTextBox.Size = new System.Drawing.Size(112, 20); 461 | this.canbusMessageTextBox.TabIndex = 6; 462 | this.canbusMessageTextBox.TextChanged += new System.EventHandler(this.canbisMessageTextBox_TextChanged); 463 | // 464 | // label10 465 | // 466 | this.label10.AutoSize = true; 467 | this.label10.Location = new System.Drawing.Point(111, 33); 468 | this.label10.Name = "label10"; 469 | this.label10.Size = new System.Drawing.Size(89, 13); 470 | this.label10.TabIndex = 3; 471 | this.label10.Text = "message ID (hex)"; 472 | // 473 | // label11 474 | // 475 | this.label11.AutoSize = true; 476 | this.label11.Location = new System.Drawing.Point(123, 59); 477 | this.label11.Name = "label11"; 478 | this.label11.Size = new System.Drawing.Size(75, 13); 479 | this.label11.TabIndex = 4; 480 | this.label11.Text = "message (hex)"; 481 | // 482 | // canbusIDtextBox 483 | // 484 | this.canbusIDtextBox.Location = new System.Drawing.Point(207, 30); 485 | this.canbusIDtextBox.Name = "canbusIDtextBox"; 486 | this.canbusIDtextBox.Size = new System.Drawing.Size(112, 20); 487 | this.canbusIDtextBox.TabIndex = 5; 488 | this.canbusIDtextBox.TextChanged += new System.EventHandler(this.canbusTextBox_TextChanged); 489 | // 490 | // canbusReceivedMessageTextBox 491 | // 492 | this.canbusReceivedMessageTextBox.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 493 | this.canbusReceivedMessageTextBox.Location = new System.Drawing.Point(459, 75); 494 | this.canbusReceivedMessageTextBox.Multiline = true; 495 | this.canbusReceivedMessageTextBox.Name = "canbusReceivedMessageTextBox"; 496 | this.canbusReceivedMessageTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 497 | this.canbusReceivedMessageTextBox.Size = new System.Drawing.Size(362, 495); 498 | this.canbusReceivedMessageTextBox.TabIndex = 11; 499 | // 500 | // label13 501 | // 502 | this.label13.AutoSize = true; 503 | this.label13.Location = new System.Drawing.Point(512, 50); 504 | this.label13.Name = "label13"; 505 | this.label13.Size = new System.Drawing.Size(215, 13); 506 | this.label13.TabIndex = 10; 507 | this.label13.Text = "Canbus received and transmitted messages"; 508 | // 509 | // terminalTextBox 510 | // 511 | this.terminalTextBox.Location = new System.Drawing.Point(848, 76); 512 | this.terminalTextBox.Multiline = true; 513 | this.terminalTextBox.Name = "terminalTextBox"; 514 | this.terminalTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 515 | this.terminalTextBox.Size = new System.Drawing.Size(344, 478); 516 | this.terminalTextBox.TabIndex = 18; 517 | // 518 | // serialPort1 519 | // 520 | this.serialPort1.BaudRate = 115200; 521 | this.serialPort1.PortName = "COM9"; 522 | this.serialPort1.ErrorReceived += new System.IO.Ports.SerialErrorReceivedEventHandler(this.serialPort1_ErrorReceived); 523 | this.serialPort1.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.serialPort1_DataReceived); 524 | // 525 | // label1 526 | // 527 | this.label1.AutoSize = true; 528 | this.label1.Location = new System.Drawing.Point(938, 50); 529 | this.label1.Name = "label1"; 530 | this.label1.Size = new System.Drawing.Size(99, 13); 531 | this.label1.TabIndex = 19; 532 | this.label1.Text = "serial data received"; 533 | // 534 | // Form1 535 | // 536 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 537 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 538 | this.BackColor = System.Drawing.SystemColors.Window; 539 | this.ClientSize = new System.Drawing.Size(1218, 705); 540 | this.Controls.Add(this.label1); 541 | this.Controls.Add(this.terminalTextBox); 542 | this.Controls.Add(this.canbusReceivedMessageTextBox); 543 | this.Controls.Add(this.label13); 544 | this.Controls.Add(this.panel5); 545 | this.Controls.Add(this.label8); 546 | this.Controls.Add(this.statusStrip1); 547 | this.Name = "Form1"; 548 | this.Text = "Canbus monitor"; 549 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); 550 | this.panel5.ResumeLayout(false); 551 | this.panel5.PerformLayout(); 552 | this.panel8.ResumeLayout(false); 553 | this.panel10.ResumeLayout(false); 554 | this.panel10.PerformLayout(); 555 | this.panel9.ResumeLayout(false); 556 | this.panel9.PerformLayout(); 557 | this.panel6.ResumeLayout(false); 558 | this.groupBox1.ResumeLayout(false); 559 | this.groupBox1.PerformLayout(); 560 | this.panel7.ResumeLayout(false); 561 | this.panel7.PerformLayout(); 562 | this.ResumeLayout(false); 563 | this.PerformLayout(); 564 | 565 | } 566 | 567 | #endregion 568 | 569 | private System.ComponentModel.BackgroundWorker backgroundWorker1; 570 | private System.Windows.Forms.StatusStrip statusStrip1; 571 | private System.Windows.Forms.Label label8; 572 | private System.Windows.Forms.Panel panel5; 573 | private System.Windows.Forms.Button setCanbus; 574 | private System.Windows.Forms.Button transmitButton; 575 | private System.Windows.Forms.Panel panel6; 576 | private System.Windows.Forms.TextBox canbusMessageTextBox; 577 | private System.Windows.Forms.TextBox canbusIDtextBox; 578 | private System.Windows.Forms.Label label11; 579 | private System.Windows.Forms.Label label10; 580 | private System.Windows.Forms.Panel panel7; 581 | private System.Windows.Forms.TextBox canbusReceivedMessageTextBox; 582 | private System.Windows.Forms.Label label13; 583 | private System.Windows.Forms.Label label12; 584 | private System.Windows.Forms.Panel panel8; 585 | private System.Windows.Forms.TextBox CANBUSfilterRXF0_1textBox; 586 | private System.Windows.Forms.Label label14; 587 | private System.Windows.Forms.Label label9; 588 | private System.Windows.Forms.TextBox CANBUSmaskRFX0textBox; 589 | private System.Windows.Forms.GroupBox groupBox1; 590 | private System.Windows.Forms.RadioButton button500; 591 | private System.Windows.Forms.RadioButton button250; 592 | private System.Windows.Forms.RadioButton button125; 593 | private System.Windows.Forms.Label label15; 594 | private System.Windows.Forms.CheckBox RTRcheckBox; 595 | private System.Windows.Forms.CheckBox extended29bitIDcheckBox; 596 | private System.Windows.Forms.Panel panel9; 597 | private System.Windows.Forms.CheckBox RFX0checkBox; 598 | private System.Windows.Forms.Panel panel10; 599 | private System.Windows.Forms.Label label21; 600 | private System.Windows.Forms.Label label20; 601 | private System.Windows.Forms.Label label17; 602 | private System.Windows.Forms.CheckBox RFX1checkBox; 603 | private System.Windows.Forms.TextBox CANBUSfilterRXF1_2textBox; 604 | private System.Windows.Forms.TextBox CANBUSfilterRXF1_1textBox; 605 | private System.Windows.Forms.Label label18; 606 | private System.Windows.Forms.Label label19; 607 | private System.Windows.Forms.TextBox CANBUSfilterRXF0_2textBox; 608 | private System.Windows.Forms.Label label16; 609 | private System.Windows.Forms.TextBox CANBUSfilterRXF1_3textBox; 610 | private System.Windows.Forms.TextBox CANBUSfilterRXF1_4textBox; 611 | private System.Windows.Forms.TextBox CANBUSmaskRFX1textBox; 612 | private System.Windows.Forms.TextBox terminalTextBox; 613 | public System.IO.Ports.SerialPort serialPort1; 614 | private System.Windows.Forms.Label label1; 615 | } 616 | } 617 | 618 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/Form1.cs: -------------------------------------------------------------------------------- 1 | // C# Canbus Monitor host communicating over serial line to Arduino target with Canbus shield 2 | 3 | // March 2018 - adapted from code communicating with a PIC24 via USB 4 | // 22/5/2018 - fixed problems with other threads communicating directly with GUI components 5 | // 22/5/2018 - if communication with Arduino fails added loop to attempt communication again 6 | 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.ComponentModel; 11 | using System.Data; 12 | using System.Drawing; 13 | using System.Linq; 14 | using System.Text; 15 | using System.Windows.Forms; 16 | using System.Threading; 17 | //using Arduino_Canbus_interface; 18 | using System.IO.Ports; 19 | 20 | namespace Arduino_Canbus 21 | { 22 | public partial class Form1 : Form 23 | { 24 | // delegate to transfer received data to TextBox 25 | public delegate void AddDataDelegate(String myString); 26 | public AddDataDelegate myDelegate; 27 | private bool running; 28 | private bool transmitCANBUSmessage = false, setCANBUSparameters = false; 29 | private UInt16 Rx0extended=0, Rx1extended=0; 30 | private UInt32 Rx0mask=0, Rx1mask=0; 31 | private UInt32[] Rx0filter={0, 0}, Rx1filter={0, 0, 0, 0}; 32 | private UInt32 canbusTranmitID = 0; 33 | private int extendedID = 0, RTR = 0; 34 | private UInt64 canbusMessage; 35 | private UInt16 CANBUSspeed = 250; 36 | private string serialData; 37 | private bool canbusMonitorFound=false; 38 | 39 | public Form1() 40 | { 41 | this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true); 42 | InitializeComponent(); 43 | this.myDelegate = new AddDataDelegate(AddDataMethod); 44 | backgroundWorker1.RunWorkerAsync(); 45 | 46 | } 47 | 48 | 49 | // thread opening serial port communication with the Arduino board 50 | private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) 51 | { 52 | Console.WriteLine("background worker "); 53 | while (true) 54 | { 55 | // Get a list of serial port names. 56 | string[] ports = SerialPort.GetPortNames(); 57 | // terminalTextBox.AppendText("The following serial ports were found:" + Environment.NewLine); 58 | terminalTextBox.Invoke(this.myDelegate, new Object[] { "The following serial ports were found:" }); 59 | // Display each port name to the console. and send > to prompt for response 60 | foreach (string port in ports) 61 | { 62 | try 63 | { 64 | terminalTextBox.Invoke(this.myDelegate, "attempting to open " + port); 65 | //terminalTextBox.Invoke(this.myDelegate, new Object[] { " " + port }); 66 | serialPort1.PortName = port; 67 | serialPort1.Open(); 68 | } 69 | catch (Exception e1) 70 | { 71 | terminalTextBox.Invoke(this.myDelegate, "port open failed "); 72 | } 73 | if (serialPort1.IsOpen) 74 | { 75 | serialPort1.Write(">"); // prompt Arduino to respond 76 | Thread.Sleep(2000); // wait for serial commincations 77 | if (canbusMonitorFound) break; // found? if so exit foreach() 78 | serialPort1.Close(); 79 | } 80 | terminalTextBox.Invoke(this.myDelegate, "communication failed "); 81 | Thread.Sleep(100); 82 | } 83 | if (serialPort1.IsOpen) // if communicating with Arduino close backgroundWorker 84 | { 85 | canbusReceivedMessageTextBox.Invoke(this.myDelegate, ">"+Environment.NewLine + "Communication to Arduino OK"); 86 | CANBUStransmitSetup(); 87 | return; 88 | } 89 | else 90 | { 91 | canbusReceivedMessageTextBox.Invoke(this.myDelegate, ">Communication to Arduino failed! " + Environment.NewLine 92 | + " is it connected?"); 93 | } 94 | Thread.Sleep(5000); 95 | terminalTextBox.Invoke(this.myDelegate, Environment.NewLine + "attempting communication again!"); 96 | canbusReceivedMessageTextBox.Invoke(this.myDelegate, ">"+Environment.NewLine + "attempting communication again!"); 97 | } 98 | } 99 | 100 | // Form is closing, if background working is running stop it and call close again 101 | private void Form1_FormClosing(object sender, FormClosingEventArgs e) 102 | { 103 | if (running) { running = false; e.Cancel = true; } 104 | serialPort1.Close(); 105 | 106 | } 107 | 108 | private void serialPort1_ErrorReceived(object sender, System.IO.Ports.SerialErrorReceivedEventArgs e) 109 | { 110 | 111 | } 112 | 113 | private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) 114 | { 115 | try 116 | { 117 | //textBox1.AppendText(serialPort1.ReadExisting()); // direct GUI communication is not thread safe 118 | serialData = serialPort1.ReadLine(); // use degegate 119 | terminalTextBox.Invoke(this.myDelegate, new Object[] { serialData }); 120 | if (serialData.Contains("Canbus monitor")) canbusMonitorFound = true; // Arduino responded OK? 121 | } 122 | catch (Exception e1) 123 | { 124 | terminalTextBox.Invoke(this.myDelegate, "Error! " + e1); 125 | } 126 | } 127 | 128 | // display seral data on textbox 129 | public void AddDataMethod(String myString) 130 | { 131 | terminalTextBox.AppendText(myString + Environment.NewLine); 132 | var chars = myString.ToCharArray(); 133 | if (chars[0] == '>') canbusReceivedMessageTextBox.AppendText(myString.Substring(1)+Environment.NewLine); 134 | } 135 | 136 | 137 | private void transmitButton_Click(object sender, EventArgs e) 138 | { 139 | //transmitCANBUSmessage = true; 140 | CANBUStransmitMessageNow(); 141 | } 142 | 143 | private void canbisMessageTextBox_TextChanged(object sender, EventArgs e) 144 | { 145 | read64bitHexNumber(canbusMessageTextBox, ref canbusMessage); 146 | } 147 | 148 | // read a 29bit hex number (canbus ID) from TextBox, if not hex reject it, write number back to text box 149 | private UInt32 read29bitHexNumber(TextBox textbox, ref UInt32 number) 150 | { 151 | if (textbox.Text == "") // if TextBox is empty value is 0 152 | number = 0; 153 | else // else convert string to hex 154 | try 155 | { 156 | UInt32 ID = Convert.ToUInt32(textbox.Text, 16); 157 | //Console.WriteLine(ID) 158 | if (ID <= 0x1FFFFFFF) number = ID; // if > 29bit reject it 159 | } 160 | catch (Exception) { } 161 | //Console.WriteLine("number {0:X}", number); 162 | textbox.Text = String.Format("{0:X}", number); // write number back out to TextBox 163 | textbox.Select(100, 100); 164 | return number; 165 | } 166 | 167 | // read a 11bit or 29bit hex number (canbus ID) from TextBox, if not hex reject it, write number back to text box 168 | private UInt32 read11or29bitHexNumber(TextBox textbox, ref UInt32 number, bool extended) 169 | { 170 | if (textbox.Text == "") // if TextBox is empty value is 0 171 | number = 0; 172 | else // else convert string to hex 173 | try 174 | { 175 | UInt32 ID = Convert.ToUInt32(textbox.Text, 16); 176 | //Console.WriteLine(ID) 177 | if (extended) 178 | { if (ID <= 0x1FFFFFFF) number = ID; } // if > 29bit reject it 179 | else 180 | if (ID <= 0x7ffUL) number = ID; // if > 11bit reject it 181 | } 182 | catch (Exception) { } 183 | //Console.WriteLine("number {0:X}", number); 184 | textbox.Text = String.Format("{0:X}", number); // write number back out to TextBox 185 | textbox.Select(100, 100); 186 | return number; 187 | } 188 | 189 | // read a 64bit hex number (canbus ID) from TextBox, if not hex reject it, write number back to text box 190 | private UInt64 read64bitHexNumber(TextBox textbox, ref UInt64 number) 191 | { 192 | if (textbox.Text == "") // if TextBox is empty value is 0 193 | number = 0; 194 | else // else convert string to hex 195 | try 196 | { 197 | UInt64 ID = Convert.ToUInt64(textbox.Text, 16); 198 | //Console.WriteLine(ID) 199 | number = ID; 200 | } 201 | catch (Exception) { } 202 | //Console.WriteLine("number {0:X}", number); 203 | textbox.Text = String.Format("{0:X}", number); // write number back out to TextBox 204 | textbox.Select(100, 100); 205 | return number; 206 | } 207 | 208 | // transmit an 8 byte canbus message from TextBox canbusMessageTextBox canbus ID is in transmitIDtextBox 209 | private void CANBUStransmitMessageNow() 210 | { 211 | transmitCANBUSmessage = false; 212 | Console.WriteLine("CANBUStransmitMessageNow()"); 213 | // right justify hex digits filling with 0's from right 214 | StringBuilder s = new StringBuilder("0000000000000000", 25); 215 | for(int ii = 0; ii <= canbusMessageTextBox.Text.Length - 1; ii++) 216 | s[ii] = canbusMessageTextBox.Text[ii]; // copy hex digits to s 217 | String save = s.ToString(); 218 | canbusMessage = Convert.ToUInt64(save, 16); // convert s to 64 bit unsigned number 219 | int[] message = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; 220 | int i = 7; 221 | while (i >= 0 ) // convert 64bit number into 8 byte values 222 | { 223 | UInt64 x = 0xFF; 224 | try 225 | { message[i] = Convert.ToInt16(canbusMessage & x); } // get rightmost byte 226 | catch (Exception) { } 227 | canbusMessage = canbusMessage >> 8 ; // shift right one byte 228 | i = i - 1 ; // get next byte 229 | } 230 | read29bitHexNumber(canbusIDtextBox, ref canbusTranmitID); // get the can ID 231 | if (RTRcheckBox.Checked) RTR = 1; else RTR = 0; 232 | if (extended29bitIDcheckBox.Checked) extendedID = 1; else extendedID = 0; 233 | Arduino_Canbus_interface.CANBUStransmit(serialPort1, extendedID, canbusTranmitID, RTR, message); // transmit message 234 | } 235 | 236 | 237 | private void setCanbus_Click(object sender, EventArgs e) 238 | { 239 | // setCANBUSparameters = true; 240 | CANBUStransmitSetup(); 241 | } 242 | 243 | private void CANBUStransmitSetup() 244 | { 245 | setCANBUSparameters = false; 246 | if (button125.Checked) CANBUSspeed = 125; // setup canbus speed 247 | else 248 | if (button250.Checked) CANBUSspeed = 250; else CANBUSspeed = 500; 249 | if (RFX0checkBox.Checked) Rx0extended = 1; else Rx0extended = 0; 250 | if (RFX1checkBox.Checked) Rx1extended = 1; else Rx1extended = 0; 251 | //Console.WriteLine("CANBUStransmitSetup filter {0:X} mask {1:X} speed {2}", canbusMask, canbusFilter, CANBUSspeed); 252 | Arduino_Canbus_interface.CANBUSsetup(serialPort1, Rx0extended, Rx0mask, Rx0filter, Rx1extended, Rx1mask, Rx1filter, CANBUSspeed); 253 | } 254 | 255 | 256 | private void canbusTextBox_TextChanged(object sender, EventArgs e) 257 | { 258 | read11or29bitHexNumber(canbusIDtextBox, ref canbusTranmitID, extended29bitIDcheckBox.Checked); 259 | read11or29bitHexNumber(CANBUSmaskRFX0textBox, ref Rx0mask, RFX0checkBox.Checked); 260 | read11or29bitHexNumber(CANBUSfilterRXF0_1textBox, ref Rx0filter[0], RFX0checkBox.Checked); 261 | read11or29bitHexNumber(CANBUSfilterRXF0_2textBox, ref Rx0filter[1], RFX0checkBox.Checked); 262 | read11or29bitHexNumber(CANBUSmaskRFX1textBox, ref Rx1mask, RFX1checkBox.Checked); 263 | read11or29bitHexNumber(CANBUSfilterRXF1_1textBox, ref Rx1filter[0], RFX1checkBox.Checked); 264 | read11or29bitHexNumber(CANBUSfilterRXF1_2textBox, ref Rx1filter[1], RFX1checkBox.Checked); 265 | read11or29bitHexNumber(CANBUSfilterRXF1_3textBox, ref Rx1filter[2], RFX1checkBox.Checked); 266 | read11or29bitHexNumber(CANBUSfilterRXF1_4textBox, ref Rx1filter[3], RFX1checkBox.Checked); 267 | 268 | } 269 | 270 | private void RTRcheckBox_CheckedChanged(object sender, EventArgs e) 271 | { 272 | if (RTRcheckBox.Checked) canbusMessageTextBox.Enabled = false; else canbusMessageTextBox.Enabled = true; 273 | 274 | } 275 | 276 | private void RFX1checkBox_CheckedChanged(object sender, EventArgs e) 277 | { 278 | if (RFX1checkBox.Checked) CANBUSmaskRFX1textBox.Text = "1fffffff"; 279 | else CANBUSmaskRFX1textBox.Text = "7ff"; 280 | CANBUSfilterRXF1_1textBox.Text = "0"; CANBUSfilterRXF1_2textBox.Text = "0"; 281 | CANBUSfilterRXF1_3textBox.Text = "0"; CANBUSfilterRXF1_4textBox.Text = "0"; 282 | 283 | } 284 | 285 | private void RFX0checkBox_CheckedChanged(object sender, EventArgs e) 286 | { 287 | if (RFX0checkBox.Checked) CANBUSmaskRFX0textBox.Text = "1fffffff"; 288 | else CANBUSmaskRFX0textBox.Text = "7ff"; 289 | CANBUSfilterRXF0_1textBox.Text = "0"; CANBUSfilterRXF0_2textBox.Text = "0"; 290 | 291 | } 292 | } 293 | } 294 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/Form1.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | 124 | 169, 17 125 | 126 | 127 | 285, 17 128 | 129 | 130 | 25 131 | 132 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace Arduino_Canbus 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new Form1()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using System; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("PIC24mechatronicsCsharp")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("PIC24mechatronicsCsharp")] 14 | [assembly: AssemblyCopyright("Copyright © 2012")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | // The following GUID is for the ID of the typelib if this project is exposed to COM 25 | [assembly: Guid("34d66db4-0137-4558-bbb3-b224dc65e063")] 26 | 27 | // Version information for an assembly consists of the following four values: 28 | // 29 | // Major Version 30 | // Minor Version 31 | // Build Number 32 | // Revision 33 | // 34 | // You can specify all the values or you can default the Build and Revision Numbers 35 | // by using the '*' as shown below: 36 | // [assembly: AssemblyVersion("1.0.*")] 37 | [assembly: AssemblyVersion("1.0.0.0")] 38 | [assembly: AssemblyFileVersion("1.0.0.0")] 39 | [assembly: CLSCompliant(true)] 40 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PIC24mechatronicsCsharp.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PIC24mechatronicsCsharp.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace PIC24mechatronicsCsharp.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/CS_code/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/Sav60EC.tmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/Sav60EC.tmp -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Builds, tests, and runs the project jSwingTerminal. 12 | 13 | 73 | 74 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/built-jar.properties: -------------------------------------------------------------------------------- 1 | #Thu, 24 May 2018 20:50:43 +0100 2 | 3 | 4 | D\:\\Programming\\GITHUB\\JavaSwing_terminal_emulator\\jSwingTerminalOptions= 5 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/.netbeans_automatic_build: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/.netbeans_automatic_build -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/.netbeans_update_resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/.netbeans_update_resources -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jSerialComm-2.0.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jSerialComm-2.0.2.jar -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$1.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$10.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$10.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$11.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$11.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$12.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$12.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$13.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$13.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$14.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$14.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$15.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$15.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$16.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$16.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$17.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$17.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$18.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$18.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$19.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$19.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$2.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$20.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$20.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$21.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$21.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$22.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$22.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$3.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$4.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$5.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$5.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$6.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$6.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$7.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$7.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$8.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$8.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$9.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal$9.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal.class -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/build/classes/jTerminal.form: -------------------------------------------------------------------------------- 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 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=8e0a707c 2 | build.xml.script.CRC32=bb463759 3 | build.xml.stylesheet.CRC32=8064a381@1.80.1.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=8e0a707c 7 | nbproject/build-impl.xml.script.CRC32=322ac827 8 | nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 9 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | user.properties.file=C:\\Users\\Brian.Bramer\\AppData\\Roaming\\NetBeans\\8.2\\build.properties 3 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/D:/Programming/GITHUB/Arduino_Canbus_Monitor/ArduinoCanbusMonitor/jSwingCode/src/jTerminal.java 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processor.options= 4 | annotation.processing.processors.list= 5 | annotation.processing.run.all.processors=true 6 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 7 | build.classes.dir=${build.dir}/classes 8 | build.classes.excludes=**/*.java,**/*.form 9 | # This directory is removed when the project is cleaned: 10 | build.dir=build 11 | build.generated.dir=${build.dir}/generated 12 | build.generated.sources.dir=${build.dir}/generated-sources 13 | # Only compile against the classpath explicitly listed here: 14 | build.sysclasspath=ignore 15 | build.test.classes.dir=${build.dir}/test/classes 16 | build.test.results.dir=${build.dir}/test/results 17 | # Uncomment to specify the preferred debugger connection transport: 18 | #debug.transport=dt_socket 19 | debug.classpath=\ 20 | ${run.classpath} 21 | debug.test.classpath=\ 22 | ${run.test.classpath} 23 | # Files in build.classes.dir which should be excluded from distribution jar 24 | dist.archive.excludes= 25 | # This directory is removed when the project is cleaned: 26 | dist.dir=dist 27 | dist.jar=${dist.dir}/jSwingTerminal.jar 28 | dist.javadoc.dir=${dist.dir}/javadoc 29 | excludes= 30 | file.reference.jSerialComm-2.0.2.jar=src\\jSerialComm-2.0.2.jar 31 | includes=** 32 | jar.compress=false 33 | javac.classpath=\ 34 | ${file.reference.jSerialComm-2.0.2.jar} 35 | # Space-separated list of extra javac options 36 | javac.compilerargs= 37 | javac.deprecation=false 38 | javac.external.vm=true 39 | javac.processorpath=\ 40 | ${javac.classpath} 41 | javac.source=1.8 42 | javac.target=1.8 43 | javac.test.classpath=\ 44 | ${javac.classpath}:\ 45 | ${build.classes.dir} 46 | javac.test.processorpath=\ 47 | ${javac.test.classpath} 48 | javadoc.additionalparam= 49 | javadoc.author=false 50 | javadoc.encoding=${source.encoding} 51 | javadoc.noindex=false 52 | javadoc.nonavbar=false 53 | javadoc.notree=false 54 | javadoc.private=false 55 | javadoc.splitindex=true 56 | javadoc.use=true 57 | javadoc.version=false 58 | javadoc.windowtitle= 59 | main.class=jTerminal 60 | manifest.file=manifest.mf 61 | meta.inf.dir=${src.dir}/META-INF 62 | mkdist.disabled=false 63 | platform.active=default_platform 64 | run.classpath=\ 65 | ${javac.classpath}:\ 66 | ${build.classes.dir} 67 | # Space-separated list of JVM arguments used when running the project. 68 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 69 | # To set system properties for unit tests define test-sys-prop.name=value: 70 | run.jvmargs= 71 | run.test.classpath=\ 72 | ${javac.test.classpath}:\ 73 | ${build.test.classes.dir} 74 | source.encoding=UTF-8 75 | src.dir=src 76 | test.src.dir=test 77 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | jSwingTerminal 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/src/jSerialComm-2.0.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/ArduinoCanbusMonitor/jSwingCode/src/jSerialComm-2.0.2.jar -------------------------------------------------------------------------------- /ArduinoCanbusMonitor/jSwingCode/src/jTerminal.form: -------------------------------------------------------------------------------- 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 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | -------------------------------------------------------------------------------- /Linux_Java.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/horace3/Arduino_Canbus_Monitor/39af4536a77060e44387e0715e7e1626f32c7cdf/Linux_Java.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Arduino_Canbus_Monitor 2 | C# and Java programs which use an arduino+canbus shield to Monitor Canbus traffic 3 | # Arduino_Canbus_Monitor 4 | a C# and Java programs which uses an arduino+canbus shield to Monitor Canbus traffic 5 | a Java program which uses an arduino+canbus shield to Monitor Canbus traffic 6 | 7 | hardware 8 | 1. Arduino Uno, Mega or similar 9 | 2. Seeed CAN-BUS Shield V1.2 10 | 11 | programming: 12 | 1. program the Arduino using the file Arduino_Canbus_Monitor/ArduinoCanbusMonitor/ArduinoCanbusCode/ArduinoCanbusCode.ino 13 | 2. Run the Serial Monitor at 115200 baud, it should display *Canbus monitor* then *CAN BUS Shield init ok!* 14 | 3. close the Serial Monitor 15 | 4. Build C# program - Instal Vistal Studio 2017 or later 16 | 5. open VS project Arduino_Canbus_Monitor/ArduinoCanbusMonitor/CS_code/ArduinoCanbusMonitor.sln 17 | 6. hit CTRL/F5 to compile, build and run 18 | 19 | ![C# Canbus monitor](ArduinoCanbusMinitor.jpg) 20 | 21 | 7. Build Java PC program (Windows, Linux, etc) - Instal NetBeans and run (under Ubuntu use sudo to enable access to serial port) 22 | 8. Open the project ArduinoCanbusMonitor/jSwingCode 23 | 9. Build and run the project 24 | 25 | ![Java Canbus monitor](Linux_Java.jpg) 26 | 27 | note that this code requires an updated version of the following function which fixes problems with the values of id and rtrBit being returned incorrectly 28 | ``` 29 | /********************************************************************************************************* 30 | ** Function name: mcp2515_read_canMsg 31 | ** Descriptions: read message 32 | *********************************************************************************************************/ 33 | void MCP_CAN::mcp2515_read_canMsg( const byte buffer_load_addr, volatile unsigned long *id, volatile byte *ext, volatile byte *rtrBit, volatile byte *len, volatile byte *buf) /* read can msg */ 34 | { 35 | byte tbufdata[4]; 36 | byte i; 37 | 38 | MCP2515_SELECT(); 39 | spi_readwrite(buffer_load_addr); 40 | // mcp2515 has auto-increment of address-pointer 41 | for (i = 0; i < 4; i++) tbufdata[i] = spi_read(); 42 | 43 | *rtrBit=(tbufdata[3]&0x08 ? 1 : 0 ); // <<< does not work 23/1/2018 44 | 45 | *id = (tbufdata[MCP_SIDH] << 3) + (tbufdata[MCP_SIDL] >> 5); 46 | *ext=0; // <<< zero EXT bit 23/1/2013 47 | if ( (tbufdata[MCP_SIDL] & MCP_TXB_EXIDE_M) == MCP_TXB_EXIDE_M ) 48 | { 49 | /* extended id */ 50 | *id = (*id << 2) + (tbufdata[MCP_SIDL] & 0x03); 51 | *id = (*id << 8) + tbufdata[MCP_EID8]; 52 | *id = (*id << 8) + tbufdata[MCP_EID0]; 53 | *ext = 1; 54 | } 55 | 56 | // *len=spi_read() & MCP_DLC_MASK; // <<< replaced with following statements 57 | byte pMsgSize=spi_read(); // <<< read Data Length 23/1/2018 58 | *len=pMsgSize & MCP_DLC_MASK; // <<< message length 23/1/2018 59 | *rtrBit=(pMsgSize & MCP_RTR_MASK ? 1 : 0 ); // << get RTR bit 23/1/2018 60 | for (i = 0; i < *len && i