Jump to content

Can we get a SOCAT / open multiple com port guide?


Recommended Posts

Posted

Now I have to open 6 com ports for the ESP32 and Megas each time, I really need to be able automate it as it's a pain to have to do every time.

There was an earlier iteration of DCS Bios that actually had a Web based interface that did this, but the Flightpanels fork seems to have dropped it, which is a shame as it was very convenient. Is there any way that this can be used?

If not, then a guide on setting up the SOCAT thing would be helpful, as what comes with it is not very easy to understand. It's probably quite simple but the way it is written is clearly for people who have some prior knowledge, so a 'SOCAT for Dummies' would be appreciated 

Cheers 

Les

Posted (edited)

Yes, in theory you only have to adjust one line within the multiple-com-ports.cmd script with a text editor.

Just add your com ports, separated by a space, like below for ports 8 and 16:

@echo off
REM The COMPORTS variable should be set to a space-separated list of COM port numbers:

set COMPORTS=8 16

for %%i in (%COMPORTS%) do start /b cmd /c connect-serial-port.cmd /Q %%i

But practically, it doesn't work reliable for me either.

Regards, Vinc

Edited by Vinc_Vega
  • Like 1

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Posted

The script should be in the C:\Users\...\Saved Games\DCS.openbeta\Scripts\Programs folder, where you also can find the connect-serial-port.cmd file.

After editing the cmd-file just make a shortcut to your desktop to open (not edit) it for the start.

 

Regards, Vinc

  • Like 1

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Posted

It seems to work for me, I have all six com ports and in the testing I did today I only had it 'fail' once, when I got a message that one of the com ports was denying access. All the other times it seems to run nicely. I edited it using Notepad++ in case anyone is interested

Cheers

Les

Posted

Not sure why, but today four of the six com ports have changed numbers. Obviously not devastating, as I just need to edit to correct it, however it would be good to be able to maintain the same com ports. I can see that there is a way of manually assigning the number but this appears to be only while the PC is powered and reverts when depowered - am I reading that right?

Cheers 

Les

Posted

Thanks... I think! I am just imagining how many more posts that I will be writing trying to get this to work, and my wife in the background saying 'but I thought you said that you'd finished that....'

Having said that, I have to say that it is working pretty well now despite all the prior issues, and I'll probably just stick with what I have on the basis that if it ain't broke, don't fix it (and don't piss off the wife...)

The guys developing their stuff will appreciate all the input, so I know your help won't be wasted

Les

Posted (edited)

I have also have had problems with usb hubs when adding a second in serial with an other. The communication via the second was very unreliable, stopping suddenly with socat reporting "no permission". The work around was to remove the second usb hub and connect all Arduinos to the first usb hub via 5 meter long usb cables. I don't know why the second hub caused the errors. It's a cheap no-name hub without power connection, but it's specified for USB 3.0. Maybe a more quality brand hub would solve the problem, but these are expensive.

Edited by Msiipola
Posted

My hubs are mostly good quality powered ones, as I think I had some issues with cheaper ones way back that made me go for the higher quality ones. Having said that I do have a couple of 'sub-hubs' in there that are primarily for the ESP32 devices used for the digital clock and Standby ADI. I didn't log which one of the devices was on the com port that was affected, but it hasn't repeated itself since. 

Cheers

 

Les

Posted

Thanks for all of the posts.  I have had similar issues after getting moved over to FP Fork.  I had an issue with Malware Bytes picking up the .cmd window as a PUP and quarantined it.    I reloaded the FP Fork stuff and it is back working once again.  I do have one board (F18 Brain Controller from TekCreations) that doesn't want to work on the Fork version yet works good on the HUB version.  The F18 Brain Controller is where my HOOK, WING FOLD, and MASTER ARM panel are connected to.  I plan on connecting more of their devices to it in the future.  Any suggestions?

Wayne

Wayne Wilson

AKA: hrnet940

Alienware Aurora R3, i7 3820 3.5GHz(4.2GHz setting) processor, EVGA Nvidia RTX 2070 8GB Graphics, 16GB Ram, 1TB SSD.

  • 3 months later...
  • Recently Browsing   0 members

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