Jump to content
The simFlight Network Forums

Lua Socket 64 FSUIPC 5


Recommended Posts

Although I no longer use LUA to interface with my cockpit modules, I still have it set up from when I did and it works.  The only confusion I have is that I have a core.dll *size 102,912) in the Modules root and I have one in the Modules\lua\socket folder and they appear to be the same. 

Make sure you have this at the top of the lua file.

local socket = require("socket")

Also, I noticed that you have to have a socket.lua and a socket_core.dll that may actually be the 64 bit DLL(?).  These go in the Modules root.

 

socket_core.dll

socket.lua

Edited by budman9mm
Additional Files
Link to comment
Share on other sites

I got it working.

Thank you!

Quote

Also, I noticed that you have to have a socket.lua and a socket_core.dll that may actually be the 64 bit DLL(?).  These go in the Modules root.

But all I seem to need are socket.lua and a socket_core.dll in the modules folder (or the lua folder). At least as long as I only need Socket core, UDP and TCP.

Link to comment
Share on other sites

1 minute ago, Pete Dowson said:

Could you explain how, please? That "socket_core.dll" is definitely the 32-bit version. Are you using P3D4 and FSUIPC5?

Yes, I am using P3D4 and FSUIPC5

I just put socket.lua and a socket_core.dll in the modules folder.

Required it with:

local socket = require("socket")

Have successfully tested to send UDP data

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Bleedin said:

Yes, I am using P3D4 and FSUIPC5

I just put socket.lua and a socket_core.dll in the modules folder.

Required it with:

local socket = require("socket")

Have successfully tested to send UDP data

And the Lua file doing your UDP exchange is running in FSUIPC5?

If so, that is weird. I certainly don't think a 32-bit DLL can run in a 64-bit process.

I see that the "socket.lua" file uses a DLL called "socket.dll", not "socket_core.dll", though I suspect that the socket.dll needs socket_code. Do you have a socket.dll there?

Pete

 

Link to comment
Share on other sites

5 hours ago, Pete Dowson said:

And the Lua file doing your UDP exchange is running in FSUIPC5?

If so, that is weird. I certainly don't think a 32-bit DLL can run in a 64-bit process.

And things are getting weirder...
Removed socket_core.dll and it still works.
I have no other dll:s i the modules folder or its subfolders.
I execute the script with a fsuipc "key press" so everything runs in FSUIPC 5.14.

Link to comment
Share on other sites

16 hours ago, Bleedin said:

Removed socket_core.dll and it still works.
I have no other dll:s i the modules folder or its subfolders.
I execute the script with a fsuipc "key press" so everything runs in FSUIPC 5.14.

Hmmm. I don't understand how that's working.

If you have time and the inclination, do you think you could download Process Explorer and run it when P3D is running and check what DLLs are in use by the process. It will be an almighty long list though, so don't bother if it looks too daunting.

https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer

Pete

 

Link to comment
Share on other sites

1 hour ago, Pete Dowson said:

If you have time and the inclination, do you think you could download Process Explorer and run it when P3D is running and check what DLLs are in use by the process. It will be an almighty long list though, so don't bother if it looks too daunting.

Ok. I'll have a go at it tonight.

Link to comment
Share on other sites

32 minutes ago, Bleedin said:

Here is the list of DLLs used by the P3D-process.

The luascript with the socket operations was running when the list was made.

Thanks.

Very strange. No sign of anything specific to Lua or sockets. There wasn't a list expansion against the FSUIPC.DLL entry, was ther?. It something got loaded by FSUIPC (effectivel), then it might be there, like a subfolder entry.

I'm going to have to set up to PCs running P3D4 with  my LuaSockets example (from the Lua Examples ZIP) -- a Master-Slave link to make one sim follow the other. Not sure when I can fit that in though.

Pete

 

Link to comment
Share on other sites

  • 6 months later...
On 4/28/2019 at 8:47 AM, Fscats said:

Was any progress made on getting Lua sockets to work with Fsuipc V5.  I would really like to be able to leverage this.

Thanks much

Evan

As I reported in the thread: I have gotten socket (UDP, TCP) to work. Have successfully run code with UDP in two separate environments. Both with Fsuipc V5 and P3D V4.3 on win7.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.