Jump to content

DCS Bios - Windows 10 UDP communication


Regnad517

Recommended Posts

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

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.

Link to comment
Share on other sites

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

  • 3 weeks later...

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

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.

Link to comment
Share on other sites

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

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 by Regnad517
Link to comment
Share on other sites

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)?

Link to comment
Share on other sites

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

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

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

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

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.

Link to comment
Share on other sites

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

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.

Link to comment
Share on other sites

  • 11 months later...

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

2.thumb.png.de2225c3094068a0a62845a70a35542d.png

812020201_Sanstitre.thumb.png.9e6bb90c6fc67a0dfcd72d67da5cc8fb.png

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...