I don't know why but after a few reboots the control panel would just not work at 115200 bps anymore.
I changed nothing.
Then I tried the async version and that also didn't work anymore.
It still works fine at 9600 bps though, actually at anything that isn't 115200.
W T F... I'm lost.
Can you try lowering the serial port speed down to 9600 just for testing? I hope it's not too painful to update the sketch on your board. I made myself a one click batch file once I found out the Arduino IDE lets you save the Sketch as a hex file for direct flashing.
Try the latest code from the repo. You can open crtcpl.exe with /log and get a detailed debug log of everything it does with the serial port! The log shows up in your temp folder.
Something like this is whats written when it works:
I changed nothing.
Then I tried the async version and that also didn't work anymore.
It still works fine at 9600 bps though, actually at anything that isn't 115200.
W T F... I'm lost.
Can you try lowering the serial port speed down to 9600 just for testing? I hope it's not too painful to update the sketch on your board. I made myself a one click batch file once I found out the Arduino IDE lets you save the Sketch as a hex file for direct flashing.
Try the latest code from the repo. You can open crtcpl.exe with /log and get a detailed debug log of everything it does with the serial port! The log shows up in your temp folder.
Something like this is whats written when it works:
Code:
15/05/2020 18:06:16 ------------- Main -------------
15/05/2020 18:06:16 Try to connect to serial port COM3 at rate 9600 from settings.
15/05/2020 18:06:16 ------------- Open -------------
15/05/2020 18:06:16 Create serial port. Port=COM3, Rate=9600
15/05/2020 18:06:16 Open the port now.
15/05/2020 18:06:16 Compatibility check now.
15/05/2020 18:06:16 ------------- SendCommandInternal -------------
15/05/2020 18:06:16 ------------- Checksum -------------
15/05/2020 18:06:16 The checksum was calculated to be 0xF3.
15/05/2020 18:06:16 Send this payload to microcontroller:
15/05/2020 18:06:16 { 0x07, 0x01, 0x01, 0x00, 0x00, 0x03, 0xF3, 0x04, 0x0A }
15/05/2020 18:06:16 Wait for response now.
15/05/2020 18:06:16 Iteration 0
15/05/2020 18:06:16 Read so far from serial port: 1 bytes. In this round: 1 bytes.
15/05/2020 18:06:16 Read too little to have valid response. Read more.
15/05/2020 18:06:16 Iteration 1
15/05/2020 18:06:16 Read so far from serial port: 3 bytes. In this round: 2 bytes.
15/05/2020 18:06:16 Read too little to have valid response. Read more.
15/05/2020 18:06:16 Iteration 2
15/05/2020 18:06:16 Read so far from serial port: 4 bytes. In this round: 1 bytes.
15/05/2020 18:06:16 Read too little to have valid response. Read more.
15/05/2020 18:06:16 Iteration 3
15/05/2020 18:06:16 Read so far from serial port: 7 bytes. In this round: 3 bytes.
15/05/2020 18:06:16 Length from response: 1 bytes
15/05/2020 18:06:16 Read too little according to length. Read more.
15/05/2020 18:06:16 Iteration 4
15/05/2020 18:06:16 Read so far from serial port: 8 bytes. In this round: 1 bytes.
15/05/2020 18:06:16 Length from response: 1 bytes
15/05/2020 18:06:16 Got response OK!
15/05/2020 18:06:16 ------------- Checksum -------------
15/05/2020 18:06:16 The checksum was calculated to be 0xF1.
15/05/2020 18:06:16 The response from microcontroller was:
15/05/2020 18:06:16 { 0x06, 0x01, 0x01, 0x03, 0x03, 0xF1, 0x04, 0x0A }
15/05/2020 18:06:16 The command response is:
15/05/2020 18:06:16 { 0x03 }
15/05/2020 18:06:16 Serial port is open.
15/05/2020 18:06:16 Main window opening now.
15/05/2020 18:06:17 ------------- SendCommand -------------
15/05/2020 18:06:17 ------------- SendCommandInternal -------------
15/05/2020 18:06:17 ------------- Checksum -------------
15/05/2020 18:06:17 The checksum was calculated to be 0xF1.
15/05/2020 18:06:17 Send this payload to microcontroller:
15/05/2020 18:06:17 { 0x07, 0x02, 0x02, 0x00, 0x00, 0x03, 0xF1, 0x04, 0x0A }
15/05/2020 18:06:17 Wait for response now.
15/05/2020 18:06:17 Iteration 0
15/05/2020 18:06:17 Read so far from serial port: 1 bytes. In this round: 1 bytes.
15/05/2020 18:06:17 Read too little to have valid response. Read more.
15/05/2020 18:06:17 Iteration 1
15/05/2020 18:06:17 Read so far from serial port: 2 bytes. In this round: 1 bytes.
15/05/2020 18:06:17 Read too little to have valid response. Read more.
15/05/2020 18:06:17 Iteration 2
15/05/2020 18:06:17 Read so far from serial port: 5 bytes. In this round: 3 bytes.
15/05/2020 18:06:17 Read too little to have valid response. Read more.
15/05/2020 18:06:17 Iteration 3
15/05/2020 18:06:17 Read so far from serial port: 6 bytes. In this round: 1 bytes.
15/05/2020 18:06:17 Read too little to have valid response. Read more.
15/05/2020 18:06:17 Iteration 4
15/05/2020 18:06:17 Read so far from serial port: 9 bytes. In this round: 3 bytes.
15/05/2020 18:06:17 Length from response: 20 bytes
15/05/2020 18:06:17 Read too little according to length. Read more.
15/05/2020 18:06:17 Iteration 5
15/05/2020 18:06:17 Read so far from serial port: 10 bytes. In this round: 1 bytes.
15/05/2020 18:06:17 Length from response: 20 bytes
15/05/2020 18:06:17 Read too little according to length. Read more.
15/05/2020 18:06:17 Iteration 6
15/05/2020 18:06:17 Read so far from serial port: 13 bytes. In this round: 3 bytes.
15/05/2020 18:06:17 Length from response: 20 bytes
15/05/2020 18:06:17 Read too little according to length. Read more.
15/05/2020 18:06:17 Iteration 7
15/05/2020 18:06:17 Read so far from serial port: 14 bytes. In this round: 1 bytes.
15/05/2020 18:06:17 Length from response: 20 bytes
15/05/2020 18:06:17 Read too little according to length. Read more.
15/05/2020 18:06:17 Iteration 8
15/05/2020 18:06:17 Read so far from serial port: 17 bytes. In this round: 3 bytes.
15/05/2020 18:06:17 Length from response: 20 bytes
15/05/2020 18:06:17 Read too little according to length. Read more.
15/05/2020 18:06:17 Iteration 9
15/05/2020 18:06:17 Read so far from serial port: 18 bytes. In this round: 1 bytes.
15/05/2020 18:06:17 Length from response: 20 bytes
15/05/2020 18:06:17 Read too little according to length. Read more.
15/05/2020 18:06:17 Iteration 10
15/05/2020 18:06:17 Read so far from serial port: 21 bytes. In this round: 3 bytes.
15/05/2020 18:06:17 Length from response: 20 bytes
15/05/2020 18:06:17 Read too little according to length. Read more.
15/05/2020 18:06:17 Iteration 11
15/05/2020 18:06:17 Read so far from serial port: 22 bytes. In this round: 1 bytes.
15/05/2020 18:06:17 Length from response: 20 bytes
15/05/2020 18:06:17 Read too little according to length. Read more.
15/05/2020 18:06:17 Iteration 12
15/05/2020 18:06:17 Read so far from serial port: 25 bytes. In this round: 3 bytes.
15/05/2020 18:06:17 Length from response: 20 bytes
15/05/2020 18:06:17 Read too little according to length. Read more.
15/05/2020 18:06:17 Iteration 13
15/05/2020 18:06:17 Read so far from serial port: 26 bytes. In this round: 1 bytes.
15/05/2020 18:06:17 Length from response: 20 bytes
15/05/2020 18:06:17 Read too little according to length. Read more.
15/05/2020 18:06:17 Iteration 14
15/05/2020 18:06:17 Read so far from serial port: 27 bytes. In this round: 1 bytes.
15/05/2020 18:06:17 Length from response: 20 bytes
15/05/2020 18:06:17 Got response OK!
15/05/2020 18:06:17 ------------- Checksum -------------
15/05/2020 18:06:17 The checksum was calculated to be 0xE1.
15/05/2020 18:06:17 The response from microcontroller was:
15/05/2020 18:06:17 { 0x06, 0x02, 0x14, 0xFE, 0x93, 0x93, 0x8F, 0x80, 0x80, 0x78, 0xB0, 0xF0, 0x4D, 0x9A, 0x9B, 0xCB, 0x19, 0x7B, 0xC6, 0x7B, 0x0A, 0x42, 0xC6, 0x03, 0xE1, 0x04, 0x0A }
15/05/2020 18:06:17 The command response is:
15/05/2020 18:06:17 { 0xFE, 0x93, 0x93, 0x8F, 0x80, 0x80, 0x78, 0xB0, 0xF0, 0x4D, 0x9A, 0x9B, 0xCB, 0x19, 0x7B, 0xC6, 0x7B, 0x0A, 0x42, 0xC6 }