Jump to content

FreakPsych

Members
  • Posts

    12
  • Joined

  • Last visited

Reputation

0 Neutral

Contact Methods

Profile Information

  • About me
    Twitch.tv: TrollDIVA
  • Location
    Bremerhaven / Germany
  1. Ok, i have tried both, but none of them worked. While spamming the handshake i can see the data on the serial port incomming into win10, but somehow it does not come into the addon. Strange... Maybe microsoft has something changed or forgotten in the serial librarys ? I will play on win7 the next days. so no problem.
  2. Will try it this evening. Just 3 more hours work to do, then the fun goes on. --- So i put a LED behind the Handshake and it flashes every time it should. --- Ok, i have just tried to hook up between the serial handshake and copied all data to my lcd. void KSPBoardSendData(uint8_t * address, uint8_t len){ uint8_t CS = len; lcd.clear(); Serial.write(0xBE); lcd.setCursor(0, 0); lcd.print(0xBE); Serial.write(0xEF); lcd.setCursor(4, 0); lcd.print(0xEF); Serial.write(len); lcd.setCursor(8, 0); lcd.print(len); lcd.setCursor(0, 1); for(int i = 0; i<len; i++){ CS^=*(address+i); Serial.write(*(address+i)); lcd.print(*(address+i)); lcd.print(" "); delay(750); } Serial.write(CS); lcd.setCursor(13, 1); lcd.print(CS); } The Display shows me: 190 239 4 0 3 1 4, then switches to 190 239 25 <25 Numbers> This runs 2 times, because the Arduini is checked on 2 serialports. If i convert the numbers into hex it will be: BE EF 04 03 01 04 I guess the first number row is the handshake and the second row is some kind of data (maybe button states or something). Also i tried different timeout settings: everyting from 500 and more will give the same result. I have tried 500 - 10000 in 500ms steps.
  3. Yes, i have tried some settings, but with no luck so far. I can play at Win7 so its not a big deal. I just provide much data as i can, because i have fun to debug such problems. [COLOR=#333333]01 00:58:50.143 0.00010129 KSP.exe IRP_MJ_CREATE COM3 SUCCESS Port Opened [/COLOR]75 00:58:50.143 0.00000580 KSP.exe IOCTL_SERIAL_SET_QUEUE_SIZE COM3 SUCCESS InSize: 512, OutSize: 1024 02 00:58:50.143 0.00048550 KSP.exe IOCTL_SERIAL_SET_BAUD_RATE COM3 SUCCESS Baud Rate: 38400 03 00:58:50.144 0.00000535 KSP.exe IOCTL_SERIAL_SET_RTS COM3 SUCCESS 04 00:58:50.144 0.00019188 KSP.exe IOCTL_SERIAL_SET_DTR COM3 SUCCESS 05 00:58:50.144 0.00049264 KSP.exe IOCTL_SERIAL_SET_LINE_CONTROL COM3 SUCCESS StopBits: 1, Parity: No, DataBits: 8 06 00:58:50.144 0.00000491 KSP.exe IOCTL_SERIAL_SET_CHARS COM3 SUCCESS EofChar: 0x4, ErrorChar: 0x15, BreakChar: 0x15, EventChar: 0x0, XonChar: 0x11, XoffChar: 0x13 07 00:58:50.144 0.00000491 KSP.exe IOCTL_SERIAL_SET_HANDFLOW COM3 SUCCESS ControlHandShake: 0x1, FlowReplace: 0x80000040, XonLimit: 51, XoffLimit: 51 08 00:58:50.144 0.00000491 KSP.exe IOCTL_SERIAL_SET_TIMEOUTS COM3 SUCCESS ReadIntervalTimeout: -1, ReadTotalTimeoutMultiplier: 0, ReadTotalTimeoutConstant: 0, WriteTotalTimeoutMultiplier: 0, WriteTotalTimeoutConstant: 5000 09 00:58:50.145 0.00001696 KSP.exe IOCTL_SERIAL_SET_WAIT_MASK COM3 SUCCESS Mask: RXCHAR RXFLAG TXEMPTY CTS DSR RLSD BREAK ERR RING 10 00:58:50.145 2.50050692 KSP.exe IOCTL_SERIAL_WAIT_ON_MASK COM3 SUCCESS 11 00:58:52.646 0.00028737 KSP.exe IRP_MJ_WRITE COM3 SUCCESS Length: 8, Data: BE EF 04 00 01 02 03 04 12 00:58:52.646 0.00006649 KSP.exe IOCTL_SERIAL_SET_WAIT_MASK COM3 SUCCESS Mask: RXCHAR RXFLAG TXEMPTY CTS DSR RLSD BREAK ERR RING 13 00:58:52.646 1.53899197 KSP.exe IOCTL_SERIAL_WAIT_ON_MASK COM3 CANCELLED [COLOR=#333333]14 00:58:54.185 0.00047880 System IRP_MJ_CLOSE COM3 SUCCESS Port Closed[/COLOR] I still try to understand the way of communication: Step 01: The PC opens the Serial-Port and does his setup of parameters (Line 01-08) Step 02: The PC starts listening on the Port for 2.5 seconds for incomming Handshakes. (Line 09-10) Step 03: The PC sends a Handshake to the Arduino and starts waiting for a reply. (Line 11-12) Step 04: The PC stops listening for a repy after 1.5 seconds. (Line 13+14) Is this right? In the config.xml i can find a HandshakeDelay setting (Tried some values up to 10 seconds. It seems to control the Step 02 above.), but no setting "for the waiting for response"-time (Which is Step 04 above, i guess). BTW: Have fun at the makers fair.
  4. I have tested it: Does not work. But thanks for trying. I think its at the point where the Addon is searching for the com-port. I can see that there is RX once for a splitsecond on the arduino and then about 1-2 seconds TX sending while the addon is trying "COM3". Then the arduino reboots and the second com-port "\Device\USBSER000 - COM3" is beeing tested with the same routine. Both times the return message is "KSP Display not found". I have posted the serial log from my port a few postings before: As we can see there, there is somehow data transmitted. My C#-skills are very low, so i cant tell whats wrong at this point, but i think its somehow the waiting for the "KSP Display Check"-check. Maybe we got wrong data (see log) or the time the addon is waiting for response is too low / skipped. Tomorrow i will try to make a portlog of my win7 device to compaire it with the win10 log.
  5. I think i have found something: The SerialPort.dll (http://sourceforge.net/projects/serialportnet/) used in the plugin is written in c# and implements complete .NET 2.0 specifications. In Windows 10 there seems to be only .NET 3.5 and higher. No .NET 2.0 support anymore. So we need to find a way to a) run .NET 2.0 on Win10 or get a "new" SerialPort.dll for a higher .NET version.
  6. The game runs pretty smooth on Win 10. Even as normal user. (Yes, i tried Run as Admin and also compatible mode.) Also i changed the usb-cable. The Arduino IDE runs normal and the Arduino is programable under Win 10. 74 00:58:50.143 0.00010129 KSP.exe IRP_MJ_CREATE COM3 SUCCESS Port Opened 75 00:58:50.143 0.00000580 KSP.exe IOCTL_SERIAL_SET_QUEUE_SIZE COM3 SUCCESS InSize: 512, OutSize: 1024 76 00:58:50.143 0.00048550 KSP.exe IOCTL_SERIAL_SET_BAUD_RATE COM3 SUCCESS Baud Rate: 38400 77 00:58:50.144 0.00000535 KSP.exe IOCTL_SERIAL_SET_RTS COM3 SUCCESS 78 00:58:50.144 0.00019188 KSP.exe IOCTL_SERIAL_SET_DTR COM3 SUCCESS 79 00:58:50.144 0.00049264 KSP.exe IOCTL_SERIAL_SET_LINE_CONTROL COM3 SUCCESS StopBits: 1, Parity: No, DataBits: 8 80 00:58:50.144 0.00000491 KSP.exe IOCTL_SERIAL_SET_CHARS COM3 SUCCESS EofChar: 0x4, ErrorChar: 0x15, BreakChar: 0x15, EventChar: 0x0, XonChar: 0x11, XoffChar: 0x13 81 00:58:50.144 0.00000491 KSP.exe IOCTL_SERIAL_SET_HANDFLOW COM3 SUCCESS ControlHandShake: 0x1, FlowReplace: 0x80000040, XonLimit: 51, XoffLimit: 51 82 00:58:50.144 0.00000491 KSP.exe IOCTL_SERIAL_SET_TIMEOUTS COM3 SUCCESS ReadIntervalTimeout: -1, ReadTotalTimeoutMultiplier: 0, ReadTotalTimeoutConstant: 0, WriteTotalTimeoutMultiplier: 0, WriteTotalTimeoutConstant: 5000 83 00:58:50.145 0.00001696 KSP.exe IOCTL_SERIAL_SET_WAIT_MASK COM3 SUCCESS Mask: RXCHAR RXFLAG TXEMPTY CTS DSR RLSD BREAK ERR RING 84 00:58:50.145 2.50050692 KSP.exe IOCTL_SERIAL_WAIT_ON_MASK COM3 SUCCESS 85 00:58:52.646 0.00028737 KSP.exe IRP_MJ_WRITE COM3 SUCCESS Length: 8, Data: BE EF 04 00 01 02 03 04 86 00:58:52.646 0.00006649 KSP.exe IOCTL_SERIAL_SET_WAIT_MASK COM3 SUCCESS Mask: RXCHAR RXFLAG TXEMPTY CTS DSR RLSD BREAK ERR RING 87 00:58:52.646 1.53899197 KSP.exe IOCTL_SERIAL_WAIT_ON_MASK COM3 CANCELLED 88 00:58:54.185 0.00047880 System IRP_MJ_CLOSE COM3 SUCCESS Port Closed This is what the serial ports data is. The code above run 2 times and then stops trying to connect. I have checked my sketch multiple times and even tried the last 3 versions of the plugin and democode. (All runs on Win7 without any problem!) If i noticed right: On the Arduino only the RX-LED blinks on the connection try. The TX-LED does nothing at all. I guess its something in Win 10. Maybe there is a Runtime change or something... I dont know. ^^
  7. I work as a freelancer. So basically i can do what i want, as far as i get the jobs done in time.
  8. Has anyone tried to use the 17.3 with Demo12 on Windows 10? ... [WRN 18:56:02.389] [HighLogic]: =========================== Scene Change : From LOADING to MAINMENU ===================== [LOG 18:56:04.459] AddonLoader: Instantiating addon 'SettingsNStuff' from assembly 'KSPSerialIO' [LOG 18:56:04.468] KSPSerialIO: Loading settings... KSPSerialIO: Loading settings... ... [LOG 18:56:04.480] KSPSerialIO: Default Port = COM3 [LOG 18:56:04.481] KSPSerialIO: Refreshrate = 0.2 [LOG 18:56:04.482] KSPSerialIO: BaudRate = 38400 [LOG 18:56:04.482] KSPSerialIO: Handshake Delay = 2500 [LOG 18:56:04.482] KSPSerialIO: Pitch Enable = 2 [LOG 18:56:04.482] KSPSerialIO: Roll Enable = 2 [LOG 18:56:04.482] KSPSerialIO: Yaw Enable = 2 [LOG 18:56:04.482] KSPSerialIO: Translate X Enable = 2 [LOG 18:56:04.482] KSPSerialIO: Translate Y Enable = 2 [LOG 18:56:04.482] KSPSerialIO: Translate Z Enable = 2 [LOG 18:56:04.482] KSPSerialIO: Wheel Steering Enable = 2 [LOG 18:56:04.482] KSPSerialIO: Throttle Enable = 2 [LOG 18:56:04.482] KSPSerialIO: Wheel Throttle Enable = 2 [LOG 18:56:04.482] KSPSerialIO: SAS Tol = 0.1 ... [WRN 18:58:13.649] [HighLogic]: =========================== Scene Change : From TRACKSTATION to FLIGHT (Async) ===================== ... [LOG 18:58:15.159] AddonLoader: Instantiating addon 'KSPSerialPort' from assembly 'KSPSerialIO' [LOG 18:58:15.159] KSPSerialIO: Version 0.17.3 [LOG 18:58:15.159] KSPSerialIO: Getting serial ports... [LOG 18:58:15.159] KSPSerialIO: Output packet size: 189/255 [LOG 18:58:15.159] KSPSerialIO: Found 2 serial ports [LOG 18:58:15.159] KSPSerialIO: trying default port COM3 [LOG 18:58:19.184] KSPSerialIO: KSP Display not found [LOG 18:58:19.184] KSPSerialIO: trying port \Device\USBSER000 - COM3 [LOG 18:58:23.214] KSPSerialIO: KSP Display not found [LOG 18:58:23.214] AddonLoader: Instantiating addon 'KSPSerialIO' from assembly 'KSPSerialIO' [LOG 18:58:23.244] ------------------- initializing flight mode... ------------------ ... Could this be a Win10-problem? This afternoon on my Win7 pc at the office all worked without any problem.
  9. Ok... Today at the office all went right. (Win 7 Professional). Now at my homelaptop (Windows 10 Pro) it seems, that the handshare is initialising, but somehow crashes. I can see, that the Arduino is rebooting twice when i connect to flightmode. The strange part: Yesterday i tried the basic connection with the 3 LEDs and i thing it worked ... Anyone has tried to use 17.3 and Demo12 on Win 10?
  10. Thanks @Freshmeat. That is just the joystick i have ordered. ^^ 4-axis, 1 button and 10k resistance. Got mine from aliexpress for 18$. Today i got the pins resorted and some changes on the sketch-code to fit my ideas. Got a working LCD with live gamedata and some LEDs running.
  11. Hey Zitronen, at first i want really to say "Thank you!" for your work at http://forum.kerbalspaceprogram.com/threads/66393-Hardware-Plugin-Arduino-based-physical-display-serial-port-io-tutorial-%2806-Jun%29. This thread is so awesome! I started to explore KSP just a week ago and already got a small multiplayer-server with 4 friends running. But now i want to explore more. So i just started researching on the web and found the interesting things about "Build your own spaceship with KSP and Arduino". Just a small idea, but i really got addicted to this building-thing. I went to the webstore and bought an Arduino MEGA 2560 R3, a LCD-Shield (2x20, 5 Buttons) and a 4-axis-analog Joystick. After the stuff got mailed i just had to realize that the Arduino MEGA 2560 R3 cant be used as a HID without flashing the bootloader. But then after a couple of hours i found the thread of Zitronen, which got me some hope back. Now i just try to make my stuff with a serial-connection instead of using it as a HID. Things i have done so far: - I have uploaded your KSPIODemo12 to my Arduino MEGA 2560. It has compiled without any problem. - I have installed the KSPSerialIO_017_3-addon to my KSP (Version 1.0.4) and edited the config.xml to fit my serial-port (COM3). - I have started the game and everytime i get to the launchpad or a spacecraft i can see, that the Arduino reboots. Looks like the connection just works, am i right? What i will have to do: - Reorder the pin-setup, because i have a LCD-Shield, which uses the pins allready. But i got many more pins on the MEGA, so i basically just have to go over the Arduino-Sketch. - Use the LCD-Shield to display some data. - I have oredered a 4 axis-joystick. Maybe i can get this monster to work with KSP over Serial. Here are the Questions: - Is there a way to "test" the Arduino-sketch in the IDE-Serial-Monitor? Maybe with some command or data i could send manually? - Is there an ingame "menu" or something to the addon? - Sometimes my serial-connection just stops working and i have to reconnect the Arduino to the ubs-port (USB 2.0). Is this normal? Greetings Steve
×
×
  • Create New...