Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Home Forums Product Discussion & Questions BeoMaster Understanding Datalink 86

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #73175
    Storck
    BRONZE Member

    Ok, I need some help understanding the datalink 86 protocol!

    I will try and update this post with my findings, so it can work as a reference for future hobbyists!

    I want to build a device for Home Assistant so I can take control of my Beomaster 6500. I want to be able to automatically turn it on and off when the TV goes on and off, and use my phone or the TV remote to control the volume etc. Nothing fancy. I’ve read about some similar projects here on the forum, but not exactly what I want.

    I’ve hooked up a esp32 to a logic level shifter and wrote some software that sends the data I input, so far so good.

    I’ve followed the documentation here: https://www.mikrocontroller.net/attachment/33137/datalink.pdf

    Start: 3 bits
    In the documentation it says “four pulses”, but in the example diagram (2045-4) I only see three, this is also what the datalink sends out when I use the remote.

    t1 t1 t5

    Format (local/2adresses): 4 bits
    This Is a bit of a mystery for me. From the signals I gathered I get 0000 for “short” remote signals, and 0011 for the much longer messages. Is there any documentation about this?

    Address (to): 5 bits

    I suppose this is the device/source you want to control, so “0 0000” for TV, “0 0001” for Radio etc?

    Address (from): 5 bits

    I haven’t sent this part, from what I read on other posts this isn’t included in the “short” message system.

    Data: 8 bits

    The actual message, this is pretty well documented as well:
    https://github.com/toresbe/datalink/blob/main/datalink86-captures-new.txt

    https://github.com/christianlykke9/Beomote/blob/master/Commands.h

    for example I get “1010 1100” when pressing standby. “1000 0000” when pressing the “TV” source button.

    Stop: 1bit

    T4 + tailing pulse.

    With this logic a message like this should work.
    Start | Format | Address (to) | Data | Stop

    STX | 0000 | 00000 | 1010 1100 | ETX

    I can’t get this code to work, even though it’s the same as I’m receiving when I press the remote.
    On the other hand some codes work. This code for example works, and changes the radio to channel 2.

    STX | 0000 | 00001 | 0000 0010 | ETX

     

    The full/long messages

    For a lot of button presses on the remote I get the long message type. These seem to consist of 40 bits, much longer than the datalink 86 documentation I linked above.

    Example from Toresbe github:

    STX 0011 1011 1100 0001 0100 0000 0000 0010 0000 0000  ETX # Power off

    How are these codes structured? Format, Address (to), Address (from), Data? How many bits for each?

    From right to left the data seems to be 8bits data, 16 bits display settings (?), 5 bits source(Adress(to)). I cant figure out the first 11 bits, I suppose that the four first is the mysterious “Format”. I read somewhere that 0011 is “Local format”.

    Start | Format | ????? | Address(to) | data (display) | data (command) | Stop

    STX 0011 | 1011 110 | 1 0010 | 0100 0000 0000 0000 | 0000 0000  ETX # CD

    STX 0011 | 1011 110 | 0 0001 | 0100 0000 0000 0000 | 0000 0000  ETX # RADIO

    Are you supposed to include all the display data when you send commands? Or is this just used to broadcast information to other units about which track your listening to etc?

    Does this have anything to do with the different “Beolink options” you can choose in settings? 1 for same room, 2 for TV in another room, 3-4 for different MCL2 units. Or does this only impact the remote?

    All input will be much appreciated.

    • This topic was modified 23 hours, 42 minutes ago by Storck.
    #73190
    TK
    BRONZE Member

    Sounds like a great project.  Datalink ’86 is a very extendable protocol for its time, that is intended to handle multi-component 2-way communications.  If all you are looking to accomplish is emulate the function of a Beo4 (sending one-way commands using MCL2 over the Aux port), then you need not worry too much about the various message formats and permutations of MCL2.

    A standard Beo4 command is implemented via an MCL2 ‘AAC’ command (Address-To, Address-From, Command) through the MCL network. [EDIT: whoops, no it’s not, but the illustrated command structure will still work. See next post for a clarification] This is accomplished by sending a fixed-length command of 22 bits, and looks as follows:

    :STX:00:10:ToADR:FrADR:DATA_CMD:ETX:

    In this message, the preceding ’00’ is what you will usually send to start message for what you are doing, and the ’10’ tells the listening component the structure of the message.  Namely, that the following message contains a 5-bit destination address, a 5-bit sender address, and an 8-bit single instruction. There are many other message formats and combinations, which allow for messages of different structures and lengths. However, since you are not doing anything overly complicated, you’ll likely only need to use the AAC format of ’10’ and most of your commands will look like this:

    :STX:00:10:00001:00001:DATA_CMD:ETX:

    This is basically sending an 8-bit command from the “Radio” (00001) to itself “Radio” (00001).  DATA_CMD is a number from 0 to 255, and is a singular function, such as “STANDBY” ( 00001100 ) or “UNMUTE” ( 00011100), for example.   You can use the already published list of commands, which has many of the most commonly-used ones, to have the 6500 do your bidding.

    Here are some commands you will likely need:

    :STX:00:10:00001:00001:10000011:ETX: -> Set source to A-Aux (Powers on)

    :STX:00:10:00001:00001:00011100:ETX: -> UnMute (needed when sending MCL)

    :STX:00:10:00001:00001:00001100:ETX: -> Standby

    Some of the data you are looking at from your example from Toresbe is Beomaster OUTPUT – i.e. what the Beomaster is updating the other components on the system on. These longer messages contain things like system volume, track number, RDS data, etc.  Once you are ready to start listening for status updates, you can begin to process and act on Beomaster messages as well.  I’ll refrain from posting more about that protocol so as not to confuse you. The entire protocol is very rich, and has many quirks.  Much of the protocol basics are defined in the TJE 1985 document, but the entire protocol syntax has advanced well beyond that point until its final iteration in the mid 90’s.

    Feel free to ask any follow-up questions you may have.

    • This reply was modified 9 hours, 25 minutes ago by TK.
    #73193
    TK
    BRONZE Member

    Whoops, I just realized that a Beo4 command is an ‘AC’ command (Address-To, Command), and is formatted like this:

    :STX:00:00:ToADR:DATA_CMD:ETX:

    Examples of both styles of command —

    :STX:00:00:00001:00001100:ETX -> ‘AC’ “Send the Radio a Standby command”

    :STX:00:10:00001:00001:00001100:ETX -> ‘AAC’ “Send the Radio from the Radio a Standby command”

    Both AC and AAC commands will work for your implementation, and should yield the same result.  But there’s no need to complicate matters, so you might as well stick with the slightly simpler ‘AC’ protocol.  But since I made the error, now is a good time to point out some of the nuances.  An AC command is ’00’, which tells the receiver that a 5-bit address and an 8-bit command follow.  if the receiver sees ’10’, it knows to expect a 5-bit address, followed by another 5-bit address, followed by an 8-bit command.

    • This reply was modified 9 hours, 29 minutes ago by TK.
    • This reply was modified 9 hours, 27 minutes ago by TK.
    #73214
    Storck
    BRONZE Member

    Thank you for taking the time TK. It’s your answers to other forum posts that have helped me to get this far 🙂

    I figured out the logic with AC and ACC commands. I only have a stand alone Beosystem, no other linked devices, so the AC commands works plenty. I was able to figure out all commands except turning off the device. The code you provided above works though, thank you. I’m using TV 0x80 as source instead of A.Aux 0x83, but it seems to work the same. This is just because i usually use the “TV” button on the Beolink 1000 that sends 0x80.

    I do have a question about the ToADR. The Beomote github I linked to references these adresses:

    SOURCE_VIDEO = 0x00,
    SOURCE_AUDIO = 0x01,
    SOURCE_VIDEOTAPE = 0x05,
    SOURCE_ALL = 0x0F,
    SOURCE_SPDEMO = 0x1D,
    SOURCE_LIGHT = 0x1B

    They seem to match better than the code for the selected source (radio, tape, cd etc.). It seems like the commands only works if I use 0x01 (Audio) or 0x0F (All) as ToADR. If I use 0x00 which is referenced as TV by Toresbos github it doesn’t work. Does this matter, or can I just stick with 0x01?

     

    I don’t need to fully understand the OUTPUT data, but I would like my device to be able to read the Volume level and selected Source. I have set up RX functionality in my software, but I don’t know which bits to listen for. Would much appreciate some help 🙂

    That way I can add a volume slider that takes the current setting into account instead of having to repeatedly press the “volume up” command. Also, I can set the software not to change to the TV source if I start the tv while playing music from the Beogram or something.

     

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.