Ik heb je toch al verteld dat het een speciaal IB loconet is.
Staat in de specificaties van Uhlenbrock.
Met &H1 vraag je informatie op uit de KPU van de IB.
49 4B geeft aan dat de informatie uit de KPU komt, de users interface van de IB is dat.
*** IB-related LocoNet messages:
There are a few LocoNet messages which have been defined by us (Uhlenbrock
Elektronik GmbH) for use with our devices. The IB uses these messages for
various purposes. We document here their general structure as well as the
content in case of messages which pertain to the control of LN-mode.
The general structure is:
Opcode OPC_PEER_XFER (0E5h) - for replies (or 'spontaneous messages')
OPC_IMM_PACKET (0EDh) - for messages which expect a reply
length 15 bytes (0Fh)
12 message data bytes
Checksum
format of data bytes:
SRC, DSTL, DSTH,
ReqId,
PXCT1, D1, D2, D3, D4, D5, D6, D7
SRC 0 = master, 1 = KPU, 2 = DAISY, 3 = TB or FRED
4 = IB-Switch, 5 = LocoNet modules
70h..7Eh = reserved
DSTL/H destination (addressed) device, 0/0 = broadcast
"I"/"B" = Intellibox (SPU: the 'main' CPU of the Intellibox)
"I"/"K" = Intellibox (KPU: the 'user interface' CPU of the Intellibox)
0..15/"T" = Twin-Box
"I"/"S" = IB-Switch
"D"/"Y" = DAISY throttle
PXCT1 0, D7.7, D6.7, D5.7, D4.7, D3.7, D2.7, D1.7
ReqId this byte is used in order to tell the type of the message, hence
also to tell what D1..D7 do hold.
In case of LN-mode related messages, ReqId has the decimal value 46 (2Eh):
46 = used for configuring/terminating PC access to LocoNet through the
RS-232 interface of the IB.
This msg is sent by a non-SPU device with 0EDh header and SRC=1.
The reply to this msg is an OPC_LONG_ACK msg (LACK).
The SPU automatically sends this msg with 0E5h header and SRC=0
when the RS-232 LocoNet mode is activated by P50Xa cmd.
DSTL/H always hold the value 'I'/'B'.
D1 holds the cmd. Currently defined cmds are:
0: ask RS-232 'LocoNet' mode driver version #
The version # is reported as LACK code, the 1st sw release
featuring LN-mode (SPU vers. 1.500) reports a LACK code of 01h.
1: set value of 'tx flags'
D2 the value of the 'tx flags':
Bit #0: set (1) if the SPU will also "see" this msg
(local echo), reset (0) if the SPU will
not "see" this msg: it will "only" be
seen by LocoNet devices other than the SPU.
Bit #1: set (1) if normal priority (non sensor),
reset (0) if high priority (sensor)
These two flags default to the 'set' status.
Bits #2..7: please do not use (leave them at 0)
D3..D7 (not currently used)
2: terminate 'LocoNet mode' of the IB RS-232 interface and
start mixed P50+P50X mode
D2 must hold the value 'P' (50h)
D3..D7 (not currently used)
After sending the 'LACK Ok' reply, the IB shall also
send <CR> + ']' (0Dh, 5Dh) to the RS-232/PC (i.e., the
typical 'end of cmd reply' for P50Xa cmd replies.
3: set # of stop bits
D2 1 or 2 stop bits
D3..D7 (not currently used)
N.B.: this is a _temporary_ change to the IB RS-232
configuration. The # of stop bits shall revert
to the value specified by SO #5 at the next IB
reset or at the next RS-232 configuration change
(per menus, i.e. per SO's).
The reply is either 'LACK Ok' or 'LACK fail' (except for
the 0 and 2 cmds, of course).
Mvg
Wim.