The online racing simulator
The Insim Gateway Project
(11 posts, started )
The Insim Gateway Project (v3/v4)
Due to some requests in the addon forum and because there may be a lot of discontinued addon projects, I have started developing an insim gateway for conversion between insim v3->v4. I put this thread here in the Programmers Forum because it is more an initial release than a finished software tool. Therefore I also put the source code here, so other programmers would be able to find bugs, continue the project or improve the gateway further.

There are some issues in the current version, only some of them could be solved:
- currently no outsim and outgauge packet translation.
- if there are more than 28 drivers in a race, not all drivers can be reported to a V3 application (NLP packet in v3 can only accomodate 28 structures).
- gateway does not yet translate from car prefixes into car long names.
- gateway does not yet fill NumNodes and FinishLine in some structures.
- ConnNum cannot be filled correcly, using UCID instead (migth be wrong).
- PlyNum cannot be filled correcly, translation from PLID into PlyNum seems to fail somehow.

I have tested with:
- LFS Tv Director -> works, no known issues
- noobTV -> works partially, issues with custom cameras, custom external cams not tested.

with kind regards

Soeren Scharf

InsimGateway.zip ==> compiled executable
InsimGwSrc.zip ==> source code

03.09.07 Update
- removed waiting for 2 sockets with select (crashed on some PCs), use polling now
- fixed size in call to recv
_____________________________
Attached files
InsimGateway.zip - 16.6 KB - 761 views
InsimGwSrc.zip - 18.1 KB - 503 views
so i understand this right, with this application i can get the old insim programs like pitspotter to work as well?

edit: does not work with pitspotter, it looks like it is connected but i get the error message in spotter:
Requesting player data...
...which was invalid :P
...which was invalid :P
...which was invalid :P
...which was invalid :P
...which was invalid :P
...which was invalid :P
...which was invalid :P
...

sorry i was to fast on commenting it as "it works"

it connects, but it does not work in my latest lfscar replay (24 cars on track)... when i pres shift+u it jumps to a camera postion i did not set up and stays there... i can move that camera...

and after a while i get: FATAL INSIM ERROR: CONNRESET
insim closed: UNNAMED

and when i click then on the gateway window, it crashes and want me to send an error message to microsoft...
#


i also got replays with 20+ drivers and there it is working... but then it loses connection after a while...
How does the program work with TVdirector? Some kind of tutorial or step by step readme will do too. when i try to run it with TVdirector the insim says "InSim: first byte in packet does not match size" and it keeps going forever
ok this is what i do and it works when there are not more then 18 people (sometimes it does not ...)


open insim gateway
click on start gateway (left should be 32300, right should be 32301)

open lfs-tv director
click the connect button in lfs-tv director
type in there: 32301
click ok

start lfs
type: insim 32300

it should connect to lfs then and you will see the message in lfs

open up a replay or online game and press shift+u
Quote from MonStarr :How does the program work with TVdirector? Some kind of tutorial or step by step readme will do too. when i try to run it with TVdirector the insim says "InSim: first byte in packet does not match size" and it keeps going forever

look at the attached picture, this should make things clear.

textual description:
1. I suggest to start first the Gateway and LFS. In LFS you need to type the command to enable insim.
2. And last you connect from the insim application (e.g. TV Director). This may require, that you shortly need to switch LFS into windowed mode, after this step you can switch back to fullscreen.

Quote from Fischfix : ...
edit: does not work with pitspotter, it looks like it is connected but i get the error message in spotter:
Requesting player data...
...which was invalid :P
...

This is the reason why I have added the source code

with kind regards

Soeren Scharf
Attached images
insimgw.gif
I give up, i do everything that is described and nothing happens. It's probably just me... i turned off my firewall, tryed different InSim port (my default is 29999) and still nothing... Never mind, i was just curious how does TV Director work and what it does, but i guess i'm not gonna find out.
This Gateway project will become really interesting for a lot of people if it makes Pitspotter work with the new insim version.
Is that a possibility in the near future?
this is working ok for me :-)
I was trying to make LFS Tv Director work but i encoutered some problems. Tv Director connected to LFS throw the gateway (i got the hello message) but when i tryed to watch a race it just crashed. When a try to launch the gateway again it just crash directly. I must reboot my computer in order to get it "work" again.

It's linked to my antivirus (nod32) but this par of the antivirus can't be disabled (it's the kernel nod32, imon). Maybe it's solvable, maybe not. See the attachement files for more details. Hope it help you.

Edit: ho crap, i didn't saw it was in french, sorry about that. I also think there is a lack of information so if you want more tell me.
Attached images
gateway_issue_nod32_0.jpg
gateway_issue_nod32_1.jpg
gateway_issue_nod32_2.jpg
Quote from shadow2kx :I was trying to make LFS Tv Director work but i encoutered some problems. Tv Director connected to LFS throw the gateway (i got the hello message) but when i tryed to watch a race it just crashed. When a try to launch the gateway again it just crash directly. I must reboot my computer in order to get it "work" again.
...

I have updated the gateway, it should now work with your antivirus tool (see first post).


with kind regards

Soeren

The Insim Gateway Project
(11 posts, started )
FGED GREDG RDFGDR GSFDG