Jump to content

DCS-BIOS - Arduino MasterCaution Example: Can send to but not receive from DCSWorld.


BrassEm

Recommended Posts

G'day [FSF]Ian,

 

I have double checked the install process many times.

 

Following the guide "out of the box" I can send keyswitch commands to DCSW no problems with using the example with an UNO R3. I do not receive any data from DCSW. The connect-serial-port.cmd displays the UDP sendto but there is no receive display as per your you-tube examples. It also hangs DCSW on exit. This is following "out of the box" instructions for the arduino.

 

My UDPClient software works okay with multicast-console.cmd, and DCSW exits okay. But again there is no UDP recfrom traffic.

 

Being multicast UDP I would think that HELIOS and TacView should not be a problem?

 

Netstat;

On DCSW startup there is 0.0.0.0:7778 TCP/UDP

On connect-serial-port.cmd there is 0.0.0.0:5010 *:*

 

I have slowed the serial from 500000 to 100000 for no effect.

 

Would you please confirm the correct address ports to open.

 

Thanks,

 

BrassEm.

 

P.S. OS is Win7 64.

Link to comment
Share on other sites

DCS-BIOS will:

- listen on UDP 7778 for input commands

- listen on TCP 7778 for TCP connections

- send export data to via UDP to 239.255.50.10:5010 (multicast address)

 

connect-serial-port.cmd will:

- read data from the serial port and send it to localhost:7778 (UDP)

- listen to UDP port 5010 on multicast address 239.255.50.10 and send that data to the serial port

 

Are you using any firewall (other than the one built into Windows)?

Anything error in dcs.log?

 

Can you try the

That uses TCP instead of UDP -- if that works, we know that the export data is produced but something is blocking it.

 

Alternatively, try this connect-serial-port script instead:

REM Specify the number of the COM port your Arduino is connected to:

set COMPORT=5



set /A TTYNUM=%COMPORT%-1
mode COM%COMPORT% BAUD=500000 PARITY=N DATA=8 STOP=1 TO=off DTR=on
socat\socat -v TCP4:localhost:7778 /dev/ttyS%TTYNUM%

pause

 

EDIT: Also, both Helios and TacView should not be a problem.


Edited by [FSF]Ian
Link to comment
Share on other sites

The good news is that the interactive control reference and the TCP connect-serial-port script works well. The Arduino worked as intended.

 

Windows firewall allows socat.exe open TCP/UDP all ports

 

Still a problem with getting the UDP 239.255.50.10:5010 to work.

Is that fixed or can I change that IP to my local network IP xxx.xxx.xxx.xxx:5010 ?

 

I will program up a UDP server with that IP and see how that behaves.

 

The UDP problem is reflected in the dcs.log file because its not happening.

 

00149.037 ERROR Lua::Config: Call error LuaExportAfterNextFrame:<LUA_TTABLE>

stack traceback:

[C]: ?

[C]: in function 'try'

[string "C:\Users\Dave\Saved Games\DCS\Scripts\DCS-BIOS\lib\ProtocolIO.lua"]:98: in function 'send'

[string "C:\Users\Dave\Saved Games\DCS\Scripts\DCS-BIOS\lib\ProtocolIO.lua"]:170: in function 'flush'

[string "C:\Users\Dave\Saved Games\DCS\Scripts\DCS-BIOS\BIOS.lua"]:69: in function <[string "C:\Users\Dave\Saved Games\DCS\Scripts\DCS-BIOS\BIOS.lua"]:66>.

00151.118 WARNING LOG: 89 duplicate message(s) skipped.

00151.118 ERROR Lua::Config: Call error LuaExportAfterNextFrame:<LUA_TTABLE>

stack traceback:

[C]: ?

[C]: in function 'try'

[string "C:\Users\Dave\Saved Games\DCS\Scripts\DCS-BIOS\lib\ProtocolIO.lua"]:98: in function 'send'

[string "C:\Users\Dave\Saved Games\DCS\Scripts\DCS-BIOS\lib\ProtocolIO.lua"]:162: in function 'flush'

[string "C:\Users\Dave\Saved Games\DCS\Scripts\DCS-BIOS\BIOS.lua"]:69: in function <[string "C:\Users\Dave\Saved Games\DCS\Scripts\DCS-BIOS\BIOS.lua"]:66>.

Link to comment
Share on other sites

So this line is failing:

socket.try(self.conn:sendto(msg, "239.255.50.10", 5010))

 

I didn't know sending a UDP packet could fail at all. Of course there might be nobody listening for the message, but that should not prevent one from sending it.

 

It looks like something prevents DCS.exe from sending UDP multicast traffic.

 

Are you running any kind of third-party firewall or antivirus?

 

Anyway, you can tell DCS-BIOS to send a copy of the export data stream to a UDP unicast address of your choice by editing BIOSConfig.lua (it already has a commented-out example).

Link to comment
Share on other sites

[FIXED] Remote Access firewall rules shutting down UDP, not TCP?

 

The connect-serial-port.cmd multicast UDP is now working as it should.

 

Only by enabling some Remote Access Rules did the firewall allow UDP multicast. :doh:

Funny thing is that disabling the firewall full stop, did not work. Only by changing the rules did it work.

 

Many thanks for your guidance.

Link to comment
Share on other sites

  • 2 years later...

Hi Holycat (IIAF),

 

I am pretty sure I get the same warning everytime I start connect-serial-port without DCSW running. Just leave it and start DCSW. As soon as you unpause DCSW then you should see a lot of informations in the command prompt window.

 

Cheers

Hans

Link to comment
Share on other sites

  • Recently Browsing   0 members

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