Skip to content
Anonim17PL edited this page Dec 17, 2021 · 7 revisions

Welcome to the BBI2 wiki!

Bus Board Interface 2 is a plugin that allows you to operate the vehicle in OMSI 2 using an external serial device.

Communication with the control panel (Sent by the plugin when the value of a variable is changed):

xx:yy:zz\n
xx - Data type (LV - local variable, $V - String variable, SV - system variable)
yy - variable index (zero-based!) from opl file
zz - The value of the variable
\n - New line ASCII code

Example:

LV:0:0.67\n
SV:3:65.0\n
$V:1:IBIS 2.0\n

Communication with the plug-in (sent on request by the control panel):

xx:yy:zz
xx - Data type (LV - local variable,TV - Trigger)
yy - variable / trigger index (zero-based!) from opl file
zz - The value of the variable / trigger state (on/off)

Example:

LV:3:5.0
TV:0:1
TV:3:0

Get system variable

SL:xx
xx - system variable index (zero-based!) from opl file

Additional remarks

Set serial port timeout to low! (< 50ms)
Arduino: Serial.setTimeout(25)

Example .opl file:

[dll]
BBI2.dll

[varlist]
6
lights_blinkgeber
door_light_1
door_light_2
haltewunschlampe
lights_fern
cp_klimator_sw

[triggers]
4
bus_dooraft
bus_doorfront0
bus_doorfront1
kw_fernlicht_toggle

[stringvarlist]
1
IBIS_cabindisplay

[systemvarlist]
1
Time

[BBI]
COMx=10
BAUD_RATE=57600

COMx - Serial port number
BAUD_RATE - Serial port baud rate