Regnad517 Posted August 25, 2017 Share Posted August 25, 2017 First off let me say Thanks Ian for the work you do! I have read various threads on this but have not seen a solution that works for me yet. I have a windows 7 machine that everything runs fine on but I am building a new windows 10 A10C cockpit on and cannot get the UDP traffic to communicate. I have no anti-virus running, I have disabled, applied all rules, disabled all rules on my firewall. TCP works great via developers mode on Chrome but cannot get communication via the CMD file. Data flows on it, telling me its reading from DCS, but button pushes do not reflect. Any insight would be greatly appreciated. Thanks Link to comment Share on other sites More sharing options...
Ranma13 Posted August 25, 2017 Share Posted August 25, 2017 Are you using an Arduino? If so, can you look at the serial output using the Arduino software to see if it's outputting the proper messages? Link to comment Share on other sites More sharing options...
FSFIan Posted August 26, 2017 Share Posted August 26, 2017 If you cannot get UDP to work, you can also edit connect-serial-port.cmd to sue TCP instead ("set PROTOCOL=TCP") as a workaround. If you do that, you will have to wait until the mission is loaded and unpaused until you start the script. If connect-serial-port.cmd works with TCP but not with UDP, you have a known workaround and can continue to look for the problem that prevents UDP from working. If it does not work with TCP either, the problem is probably not with the network communication towards DCS but with the serial communication towards the Arduino. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Regnad517 Posted August 28, 2017 Author Share Posted August 28, 2017 OK, so yes, I am running an Ardiuno Mega 256 for this particular one. If I am correct, if it works in Developers mode via Chrome, that means it is working TCP. And it is indeed working in developers mode. I will not be home until Friday to test changing to TCP, but would much rather get UDP working if possible. I will post results on editing the .cmd file for TCP after Friday when I get home. Thanks for replies Link to comment Share on other sites More sharing options...
Regnad517 Posted September 13, 2017 Author Share Posted September 13, 2017 So I guess I was wrong, TCP is not working either. Chrome develop page works but the arduino does not communicate with DCS, even starting cmd during gameplay like suggested. Button pushes register in the command window but there is no dcs communication either udp or tcp. Link to comment Share on other sites More sharing options...
FSFIan Posted September 14, 2017 Share Posted September 14, 2017 Sorry, I am out of ideas. From your description, I would guess that something is blocking socat from connecting with DCS, but not Chrome, so it sounds like a firewall issue. But you already disabled that for testing. The Arduino sketch must be correct because it works on the Windows 7 machine. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Dropship Pilot Posted September 14, 2017 Share Posted September 14, 2017 Regnad, are you using a 3rd party firewall (like something from a security package)? If that's the case, be aware that disabling the 3rd party firewall may automatically enable the Windows firewall. This may be old news, but I thought it might be worth to mention. Cheers, Stefan Link to comment Share on other sites More sharing options...
Regnad517 Posted September 14, 2017 Author Share Posted September 14, 2017 Yeah its frustrating me badly. No 3rd party firewalls or virus protection here. Its a machine I built strictly for DCS. I'm actually unsure if I am describing my issue correctly so gonna break it down again better. So, for testing purposes, I have a simply uno with 1 button for Tacan test. When I run cmd at the desktop, and push the button, I get feedback ie. date, numbers, length from x to x, etc.. when I then run dcs bios, the cmd window goes to town like it is supposed to, number flying everywhere. But when I push the button, it does not reflect within DCS. As I stated, works great on my windows 7 machine. Either way, thanks for all the help. Link to comment Share on other sites More sharing options...
Ranma13 Posted September 15, 2017 Share Posted September 15, 2017 Use the Arduino app and view the serial output: http://www.toptechboy.com/wp-content/uploads/2014/06/arduino-serial-port-example.jpg Tell us what it's outputting when you press buttons. Link to comment Share on other sites More sharing options...
Regnad517 Posted September 15, 2017 Author Share Posted September 15, 2017 (edited) Interesting, I get backwards question marks Is that a baud issue and if so how do I rectify. All the settings I can find are at 9600 I did have a hell of a time getting a driver for the Uno on Windows 10 Edit: So when I change the baud in serial monitor to 250000 i get the proper output, not sure how to modify it on system though? Edited September 15, 2017 by Regnad517 Link to comment Share on other sites More sharing options...
FSFIan Posted September 15, 2017 Share Posted September 15, 2017 When I run cmd at the desktop, and push the button, I get feedback ie. date, numbers, length from x to x, etc.. You should also get a readable command, such as "TACAN_TEST". Can you post a screenshot of that situation (connect-serial-port.cmd window after button press on the Arduino, without DCS running)? DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Regnad517 Posted September 15, 2017 Author Share Posted September 15, 2017 Here they are. Setting up Windows 10 on another machine as well just as a test to try and see if it happens there too Link to comment Share on other sites More sharing options...
draken152 Posted September 16, 2017 Share Posted September 16, 2017 Maybe stupid question but it is DCS running and unpaused when you are starting connect-serial-port.cmd(my painful experience :doh:)??? I am currently testing my panels also on machine with windows 10 without problems, there was no need to touch firewall setup. [sIGPIC][/sIGPIC] Building FW190D pit ,,To Dora with love" http://forums.eagle.ru/showthread.php?t=132743 Link to comment Share on other sites More sharing options...
Regnad517 Posted September 16, 2017 Author Share Posted September 16, 2017 Maybe stupid question but it is DCS running and unpaused when you are starting connect-serial-port.cmd(my painful experience :doh:)??? I am currently testing my panels also on machine with windows 10 without problems, there was no need to touch firewall setup. Actually no, I was under the impression that only needed to be done when running tcp rather than Udp. Will try that soon Link to comment Share on other sites More sharing options...
Regnad517 Posted September 16, 2017 Author Share Posted September 16, 2017 Well now I don't know if I'm upset or relieved. I tried running cmd after dcs started and unpaused but no luck, that only needs to be down when using TCP I'm pretty sure. I did notice all of a sudden that cmd was laggy. So I reuploaded to the arduino double checking all of my settings, then ran again starting cmd before DCS and it works perfectly. I'm one of those people that wants to know how I fixed it, and here I have no clue but guess I will run with it. Thanks for all the help to anyone that viewed this thread. Keep doing what you're doing, great stuff!! Link to comment Share on other sites More sharing options...
Regnad517 Posted September 24, 2017 Author Share Posted September 24, 2017 Well I guess I spoke a little too soon but I did find out EXACTLY what to ask this time. Might make a new thread in case this one gets overlooked thinking it is resolved. So here is what is happenning. If I boot up, run the cmd file - doesn't work BUT If I open arduino, run the serial monitor, set baud to 250000 and test, then run cmd, works great. So what can I alter to let it run without having to monitor the serial every time? Thanks Link to comment Share on other sites More sharing options...
FSFIan Posted September 24, 2017 Share Posted September 24, 2017 Well I guess I spoke a little too soon but I did find out EXACTLY what to ask this time. Might make a new thread in case this one gets overlooked thinking it is resolved. So here is what is happenning. If I boot up, run the cmd file - doesn't work BUT If I open arduino, run the serial monitor, set baud to 250000 and test, then run cmd, works great. So what can I alter to let it run without having to monitor the serial every time? Thanks Open a command prompt, execute the following command (replacing COM1 with some COM port that exists on your system) and post the result: mode COM1 BAUD=250000 PARITY=N DATA=8 STOP=1 TO=off DTR=off That command is used by connect-serial-port.cmd to set the baud rate. It's probably failing for some reason. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Regnad517 Posted September 25, 2017 Author Share Posted September 25, 2017 (edited) OK - So running the mode command made it work but after a reboot it wouldn't work again so I added it to the .cmd file and now all is great Thanks Ian Edited September 25, 2017 by Regnad517 Link to comment Share on other sites More sharing options...
FSFIan Posted September 26, 2017 Share Posted September 26, 2017 so I added it to the .cmd file and now all is great Thanks Ian Ok, now I am confused. It's supposed to be in that file to begin with, right before the socat command... DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Regnad517 Posted October 4, 2017 Author Share Posted October 4, 2017 well now Im wondering if I am an idiot and was supposed to edit that line for the com port? this is the text from the original @echo off REM Specify the COM port number to connect to in the following line. REM If set to the default value of ASK, the script will ask you to type it in each time. set COMPORT=6 REM Set PROTOCOL to "TCP" if UDP does not work for you. When using TCP, REM you have to start the script after you have started the mission and the simulation REM has been unpaused, otherwise the connection will fail ("Connection refused"). set PROTOCOL=UDP set VERBOSE=-v set MODE_OUTPUT_REDIR=CON if "%1" == "/Q" ( set VERBOSE= set MODE_OUTPUT_REDIR=NUL shift ) if not "%1" == "" set COMPORT=%1 if "%COMPORT%" == "ASK" set /p COMPORT=Enter a COM Port Number: set /A TTYNUM=%COMPORT%-1 if "%MODE_OUTPUT_REDIR%" == "NUL" echo Connecting to COM port %COMPORT% mode COM%COMPORT% BAUD=250000 PARITY=N DATA=8 STOP=1 TO=off DTR=off > %MODE_OUTPUT_REDIR% timeout 2 if "%PROTOCOL%" == "UDP" socat\socat %VERBOSE% UDP4-RECV:5010,ip-add-membership=239.255.50.10:0.0.0.0,reuseaddr!!udp-sendto:localhost:7778 /dev/ttyS%TTYNUM% if "%PROTOCOL%" == "TCP" socat\socat %VERBOSE% TCP4-CONNECT:127.0.0.1:7778 /dev/ttyS%TTYNUM% pause Doesnt work with that BUT works with this @echo off REM Specify the COM port number to connect to in the following line. REM If set to the default value of ASK, the script will ask you to type it in each time. set COMPORT=6 mode COM6 BAUD=250000 PARITY=N DATA=8 STOP=1 TO=off DTR=off REM Set PROTOCOL to "TCP" if UDP does not work for you. When using TCP, REM you have to start the script after you have started the mission and the simulation REM has been unpaused, otherwise the connection will fail ("Connection refused"). set PROTOCOL=UDP set VERBOSE=-v set MODE_OUTPUT_REDIR=CON if "%1" == "/Q" ( set VERBOSE= set MODE_OUTPUT_REDIR=NUL shift ) if not "%1" == "" set COMPORT=%1 if "%COMPORT%" == "ASK" set /p COMPORT=Enter a COM Port Number: set /A TTYNUM=%COMPORT%-1 if "%MODE_OUTPUT_REDIR%" == "NUL" echo Connecting to COM port %COMPORT% mode COM%COMPORT% BAUD=250000 PARITY=N DATA=8 STOP=1 TO=off DTR=off > %MODE_OUTPUT_REDIR% timeout 2 if "%PROTOCOL%" == "UDP" socat\socat %VERBOSE% UDP4-RECV:5010,ip-add-membership=239.255.50.10:0.0.0.0,reuseaddr!!udp-sendto:localhost:7778 /dev/ttyS%TTYNUM% if "%PROTOCOL%" == "TCP" socat\socat %VERBOSE% TCP4-CONNECT:127.0.0.1:7778 /dev/ttyS%TTYNUM% pause Note the addition of the line at top after SET Link to comment Share on other sites More sharing options...
Ganeshka Posted October 4, 2017 Share Posted October 4, 2017 Hi guys ! Can some one help me with TM1637 6 digital display 7 segments ... i need some example of code for ILS or RADIO ... Link to comment Share on other sites More sharing options...
FSFIan Posted October 5, 2017 Share Posted October 5, 2017 Ok, that's really weird. You shouldn't have to edit anything -- the %COMPORT% will be replaced by the value in the COMPORT variable, which is 6. Maybe it makes a difference that the mode command is now called twice? Maybe the second mode command acts as a delay and prevents some kind of race condition? I can only guess at the reason why this works, but I am glad you found a workaround. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua Link to comment Share on other sites More sharing options...
Regnad517 Posted October 5, 2017 Author Share Posted October 5, 2017 Yeah works great. I even now have the multiple cmd script running working 2 panels currently. Thanks again. I’m sure this isn’t the last question I will have for this is all new to me but fascinated me. Link to comment Share on other sites More sharing options...
aymen007 Posted October 1, 2018 Share Posted October 1, 2018 WHEN I TRY TO CONNECT DCS WITH DCS BIOS REFERANCE "Unchecked runtime.lastError while running sockets.tcp.connect: net::ERR_CONNECTION_REFUSED" "chrome.sockets.tcp.connect(socketId, peerAddress, peerPort, function(result) {" AS SHOW THE PICTURE ATTACEHS I USE WINDOWS 10 Link to comment Share on other sites More sharing options...
Recommended Posts