budman9mm Posted September 10, 2017 Author Report Share Posted September 10, 2017 That's correct. It does not currently work from FSUIPC 5. It will work with some slight modifications within WideFS since it is 32 bit. Pete was unable to get sockets to compile correctly as 64 bit last I heard. Dustin Link to comment Share on other sites More sharing options...
brian60 Posted September 10, 2017 Report Share Posted September 10, 2017 but widefs doesnt support event.control and other things i need. Pete are there plans to update this to 64bit when back from your holiday? Link to comment Share on other sites More sharing options...
shortspecialbus Posted September 10, 2017 Report Share Posted September 10, 2017 I think he's waiting on Lua to fix something, it didn't sound like anything he had control over. Needs a fix from upstream. -stefan Link to comment Share on other sites More sharing options...
Pete Dowson Posted September 12, 2017 Report Share Posted September 12, 2017 On 9/10/2017 at 2:08 PM, brian60 said: widefs doesnt support event.control and other things i need event.control is triggered by FSUIPC detecting a control event being passed via the Sim's Windows message queue -- or, in some cases by using a Simconnect intercept function. Whilst I cannot implement this in WideClient, it would be possible for a Sim-based plug-in the use the events to set flags orwhatever in user offsets so that the WideClient plug-in can use event.offset or event.offsetmask. On the Lua sockets code, I'm afraid I really have no idea how to fix it. I need assistance on that. Any network experts out there who can also get to grips with rather convoluted Lua code? Pete Link to comment Share on other sites More sharing options...
brian60 Posted September 22, 2017 Report Share Posted September 22, 2017 Thanks, i have it working for now using an app that receives udp and sends it to a virtual serial port Link to comment Share on other sites More sharing options...
Pete Dowson Posted September 22, 2017 Report Share Posted September 22, 2017 3 hours ago, brian60 said: Thanks, i have it working for now using an app that receives udp and sends it to a virtual serial port Care to share more details so others can do this, please? Pete Link to comment Share on other sites More sharing options...
brian60 Posted October 9, 2017 Report Share Posted October 9, 2017 First I created two virtual serial ports with this free app com0com - https://sourceforge.net/p/com0com/news/2012/06/com0com-v3000-released/ it creates two virtual serial ports and links them together. One port is connected to a LUA script with com read and write and the other is connected to this free app CommTunnel - http://www.serialporttool.com/CommTunnel.htm. this app even has a window so you can see whats being sent and received. I use esp8266 12f wifi chips with mcp23017 gpio expanders(I2C version) with adafruit library(for mcp23017) and arduino IDE for programming. (ordered in bulk from china they are very cheap and you can chain 8 via I2C for 128 gpio ports on one esp12f). The 8266 is more powerful and has more memory and costs alot less than an arduino and has WIFI. you can get the nodemcu devkit that has a serial interface on board but i am trying to cut out as many wires as possible. Link to comment Share on other sites More sharing options...
Pete Dowson Posted October 9, 2017 Report Share Posted October 9, 2017 14 minutes ago, brian60 said: First I created ... That's very ingenious! Well done! Would you care to post that in the User Contributions subforum, using an appropriately descriptive title? That way it is preserved where folks can find it instead of scrolling off (as this thread will). Thanks! Pete Link to comment Share on other sites More sharing options...
budman9mm Posted October 9, 2017 Author Report Share Posted October 9, 2017 3 hours ago, brian60 said: First I created two virtual serial ports with this free app com0com - https://sourceforge.net/p/com0com/news/2012/06/com0com-v3000-released/ it creates two virtual serial ports and links them together. One port is connected to a LUA script with com read and write and the other is connected to this free app CommTunnel - http://www.serialporttool.com/CommTunnel.htm. this app even has a window so you can see whats being sent and received. I use esp8266 12f wifi chips with mcp23017 gpio expanders(I2C version) with adafruit library(for mcp23017) and arduino IDE for programming. (ordered in bulk from china they are very cheap and you can chain 8 via I2C for 128 gpio ports on one esp12f). The 8266 is more powerful and has more memory and costs alot less than an arduino and has WIFI. you can get the nodemcu devkit that has a serial interface on board but i am trying to cut out as many wires as possible. Interesting work around. The main reason I change to using lua sockets in the first place was due to the fact that I was losing a lot of data using the USB serial ports with the com lib and connecting to my panels which are Arduino Megas. I suspect there are multiple reasons for this, but have you experienced any data loss and/or corruption with this method? Dustin Link to comment Share on other sites More sharing options...
Pete Dowson Posted October 9, 2017 Report Share Posted October 9, 2017 3 hours ago, brian60 said: First I created ... I see you did make a post in User Contributions. Thank you! Pete Link to comment Share on other sites More sharing options...
brian60 Posted October 10, 2017 Report Share Posted October 10, 2017 21 hours ago, budman9mm said: have you experienced any data loss and/or corruption with this method? Its best to send small commands or just one offset or offsetmask at a time from the arduino then let the luascript handle it. I am just using this for switches and indicators now. Link to comment Share on other sites More sharing options...
ldamas Posted November 14, 2017 Report Share Posted November 14, 2017 You an get lua sockets under Fsuipc5.12b by loading the 32 bit luasocket library from http://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2/luasocket-2.0.2-lua-5.1.2-Win32-vc8.zip unpacking it into "modules/Lua" and then replacing "socket/core.dll" with the one from https://download.zerobrane.com/luasocket-win64.zip. Luis Damas Link to comment Share on other sites More sharing options...
Pete Dowson Posted November 15, 2017 Report Share Posted November 15, 2017 On 11/14/2017 at 8:26 AM, ldamas said: You an get lua sockets under Fsuipc5.12b by loading the 32 bit luasocket library from http://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2/luasocket-2.0.2-lua-5.1.2-Win32-vc8.zip unpacking it into "modules/Lua" and then replacing "socket/core.dll" with the one from https://download.zerobrane.com/luasocket-win64.zip. Aha! Excellent! Thank you very much, Luis! So, then, what would the "require" declarations need to be in your Lua code as I'd like to document this in the installed Lua PD). You'd need to provide for the missing 64-bit socket.core, mime.core DLLs which were buillt into 32-bit FSUIPC, and presumably also the ltn12.lua, socket.lua and mime.lua which I also included? Sorry if I appear ignorant about this stuff, but, in fact, I am! :-( Thanks, Pete Link to comment Share on other sites More sharing options...
budman9mm Posted November 15, 2017 Author Report Share Posted November 15, 2017 2 hours ago, Pete Dowson said: So, then, what would the "require" declarations need to be in your Lua code as I'd like to document this in the installed Lua PD). You'd need to provide for the missing 64-bit socket.core, mime.core DLLs which were buillt into 32-bit FSUIPC, and presumably also the ltn12.lua, socket.lua and mime.lua which I also included? I tried what Luis suggests early on into this thread. The require statement was the problem I ran into because Lua kept balking at everything I tried ( I cannot recall right now as to the exact error, I can try again if it will help). Luis, if you figured this out, I will be very happy! Intently awaiting your reply. -Dustin Link to comment Share on other sites More sharing options...
dru5412 Posted November 20, 2017 Report Share Posted November 20, 2017 On 15/11/2017 at 5:21 PM, Pete Dowson said: Aha! Excellent! Thank you very much, Luis! So, then, what would the "require" declarations need to be in your Lua code as I'd like to document this in the installed Lua PD). You'd need to provide for the missing 64-bit socket.core, mime.core DLLs which were buillt into 32-bit FSUIPC, and presumably also the ltn12.lua, socket.lua and mime.lua which I also included? Sorry if I appear ignorant about this stuff, but, in fact, I am! :-( Thanks, Pete I just used local socket = require("socket"); and it seems to be working for me. Link to comment Share on other sites More sharing options...
Pete Dowson Posted November 20, 2017 Report Share Posted November 20, 2017 22 minutes ago, dru5412 said: I just used local socket = require("socket"); and it seems to be working for me. That simple? Thanks! Pete Link to comment Share on other sites More sharing options...
dru5412 Posted November 20, 2017 Report Share Posted November 20, 2017 1 hour ago, Pete Dowson said: That simple? Thanks! Pete Well all i can say is for me, i downloaded the lua and core.dll as described and seemed to work without needing any other change.. When I say worked ( i can open socket and communicate over it) but have the other issue with event.offset, but hopefully totally unrelated. Link to comment Share on other sites More sharing options...
Pete Dowson Posted November 20, 2017 Report Share Posted November 20, 2017 26 minutes ago, dru5412 said: but have the other issue with event.offset, but hopefully totally unrelated. And not even specific to event.offset, but to a misunderstanding aof what infonite loops mean! ;-) Pete Link to comment Share on other sites More sharing options...
dru5412 Posted November 20, 2017 Report Share Posted November 20, 2017 7 minutes ago, Pete Dowson said: And not even specific to event.offset, but to a misunderstanding aof what infonite loops mean! ;-) Pete Yeap, User Error. My fault... Link to comment Share on other sites More sharing options...
budman9mm Posted December 15, 2017 Author Report Share Posted December 15, 2017 On 11/20/2017 at 10:45 AM, dru5412 said: Well all i can say is for me, i downloaded the lua and core.dll as described and seemed to work without needing any other change.. When I say worked ( i can open socket and communicate over it) but have the other issue with event.offset, but hopefully totally unrelated. I was finally get some real time to test this out and I am happy to report that after a few initial tests, sockets is now working! On 11/15/2017 at 12:21 PM, Pete Dowson said: You an get lua sockets under Fsuipc5.12b by loading the 32 bit luasocket library from http://files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2/luasocket-2.0.2-lua-5.1.2-Win32-vc8.zip unpacking it into "modules/Lua" and then replacing "socket/core.dll" with the one from https://download.zerobrane.com/luasocket-win64.zip. It's the first step that, the best I can recall, that I didn't do before. I think I was only overwriting the core.dll in the second step. So many thanks for getting this to work! -Dustin Link to comment Share on other sites More sharing options...
Bleedin Posted October 20, 2018 Report Share Posted October 20, 2018 I ran into this problem also. I need lua sockets for fsuipc 5 in P3D V4.x x64. Found the solution in this thread but unfortunately the link to the x64 ”socket/core.dll” is dead (404) and I can’t find it elsewhere. Does anyone have the file to share or a working link? /Bleedin Link to comment Share on other sites More sharing options...
Pete Dowson Posted October 20, 2018 Report Share Posted October 20, 2018 Google search for "LuaSocket" finds it immediately. Did you try? e.g. http://w3.impa.br/~diego/software/luasocket/ Pete Link to comment Share on other sites More sharing options...
Bleedin Posted October 20, 2018 Report Share Posted October 20, 2018 2 hours ago, Pete Dowson said: Google search for "LuaSocket" finds it immediately. Did you try? Sure did. The problem is that I need a 64-bit version. Can’t find any x64 binaries. Also tried to compile them myself but with no success. Link to comment Share on other sites More sharing options...
Pete Dowson Posted October 20, 2018 Report Share Posted October 20, 2018 48 minutes ago, Bleedin said: The problem is that I need a 64-bit version. Can’t find any x64 binaries. Oh, I thought they were included with the 2.0.2 release. That's a pity. 48 minutes ago, Bleedin said: Also tried to compile them myself but with no success. I had the same problem. The code is dense and sparsely commented. Very complicated with its extensive use of stacks. I wonder what happened to the link posted originally. Perhaps I should have downloaded then and hosted it here, but you don't really expect links to stop working. Maybe you can persuade one of those who did manage to get it to supply it. I could then host it here. Try posting an appeal if you can't PM an existing user. Pete Link to comment Share on other sites More sharing options...
Bleedin Posted October 20, 2018 Report Share Posted October 20, 2018 35 minutes ago, Pete Dowson said: Maybe you can persuade one of those who did manage to get it to supply it. I could then host it here. Try posting an appeal if you can't PM an existing user. Will do Thank you Pete Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now