Extended MMI messages from the far side.

Discussion in 'C-Bus Serial Protocols' started by rhamer, Aug 24, 2012.

  1. rhamer

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    If I send the following command \05FF00730738004Ag I get extended MMI information (beginning at group address 0) pertaining to the network that I am currently connected to.

    Is there a way to get this same information from the far side of a bridge?

    Cheers

    Rohan
     
    rhamer, Aug 24, 2012
    #1
  2. rhamer

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    Yep. Send a routed message to the unit address of the far side of the bridge you are interested in.

    For simple networks (network A = local, network B = the remote side) then send the message as a routed message to the bridge unit address of your local side (ie the unit address of the bridge in network A... by convention this is normally the network number for network B).

    Make sure your routing count is set to 1, and then the final routed unit address is the unit address of the bridge in network B (by convention this is normally the network number for network A).
     
    ashleigh, Aug 24, 2012
    #2
  3. rhamer

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Thanks Ashleigh, I knew there would be a clever way of doing it.

    However this does complicate things a little for me, in that I now have to have knowledge of what bridges are on the network and their addresses and so forth.

    I was thinking of reading this information out of the toolkit XML file, but can I learn it by querying the network?

    I know my questions seem a little odd, but what i'm doing is creating a product that I would like to be as easy as I can to setup and install on any sort of network, so if the device can figure out things for it's self then it takes the load off the installer.

    Cheers

    Rohan
     
    rhamer, Aug 24, 2012
    #3
  4. rhamer

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    Dsicovering bridges on a network is not especially easy.

    If you were to use the C-Bus module, then you can use the discovery services to find the units, and then do some matching by unit type.

    I'm not sure (its been a while), so I can't remember if Discovery works on remote networks or not.

    If you parse the Toolkit XML file, just be aware that the file format (the schema) can change without notice at any time when a new C-Gate or Toolkit is released, and your application will then break. The likelihood of this (a schema change) is small, but thats irrelevant. It can, and will happen, and because you are using an internal database with no published interfaces, there is no obligation on anyone to inform anyone else of changes. Buyer beware. It's probably the least sucky solution, unless you can query a running C-Gate, which would be the most robust long term solution.
     
    ashleigh, Aug 24, 2012
    #4
  5. rhamer

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The discovery process only works on the connected network.
     
    Darren, Aug 25, 2012
    #5
  6. rhamer

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    Of course you could use the source code and figure out how to extend it to handle remote networks too. There's nothing preventing it, in principle, it just needs a bit of hard grind to actually implement it.
     
    ashleigh, Aug 26, 2012
    #6
  7. rhamer

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    All good ideas, except i'm not running on a PC, but embedded hardware and a C-Bus SIM.

    I think the XML file is the best way right now, and whilst I understand and appreciate the warnings about "change without notice" I'm prepared to take that risk, and fix it down the track if needed. XML by its very structure is pretty good at maintaining backward compatibility when expanded only.

    One question I do need to know. Is the wireless bridge exactly the same as a wired bridge from a C-Bus message handling perspective? I want to be sure my code will work with both, and right now I dont have any wireless stuff.

    Cheers

    Rohan
     
    rhamer, Aug 27, 2012
    #7
  8. rhamer

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    Wireless bridge is the same.

    If it works for wired, it works for wireless.

    EXCEPT: remote MMIs are faked in the wireless side of the wireless bridge. There are no MMI's as such in wireless, there is a nearly-equivalent, which gets the same outcome but builds the picture up over a period of several seconds. The bridge can kick that off, and units run that process autonomously. The bridge watches and builds up the picture of what units are present, and what the states and levels are. This allows the wireless bridge (gateway) to return a remote MMI result by looking it up in its tables rather than live-query the units.

    As far as you are concerned from the outside looking in, its the same.
     
    ashleigh, Aug 27, 2012
    #8
  9. rhamer

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Ok, that will work for me, with the only difference being the extended MMI messages will be a bit slower to arrive than the wired conterpart.

    I am already handling the replies asynchronously, so it should just work.

    BTW I assume you still need to send the full 8 messages to get all 256 addresses back? (I know you said its the same, but just triple checking :))

    Thanks again for your help.

    Cheers

    Rohan
     
    rhamer, Aug 27, 2012
    #9
  10. rhamer

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    Replies from wireless gateway come back very quickly (because its returning the view of its internal model).

    The building up of the model takes a little while.

    And yes for Level MMI you need to issue 8 commands and pick the answers up for each. Just like a bridge, or any other device where you do these queries.
     
    ashleigh, Aug 28, 2012
    #10
  11. rhamer

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Ashleigh, I'm having some difficulty constructing this command. would you be able to give me the first of the 8 given a bridge with a local network of 254 $FE and a far side of 253 $FD. and programmed with the local side unit address of 253 $FD and a far side unit address of 254 $FE

    BTW I'm assuming by a routed mesage, you mean an 06 point to point?

    Cheers

    Rohan
     
    rhamer, Oct 17, 2012
    #11
  12. rhamer

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Actually looking harder, I think you actually mean an 03 point to point to multi point?

    I could still use an example though.

    Cheers

    Rohan
     
    rhamer, Oct 17, 2012
    #12
  13. rhamer

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    ok this is what I have come up with;

    \03FD12FEFF730738003Fg

    I get a positive ack g. but nothing else.

    Cheers

    Rohan
     
    rhamer, Oct 17, 2012
    #13
  14. rhamer

    Don

    Joined:
    Aug 4, 2004
    Messages:
    429
    Likes Received:
    0
    Location:
    Townsville, Australia
    That command has routing to pass through two bridges. You saw the positive ACK because unit $FD must exist on your local network, but you say your bridge local side address is $FE, so I'm not quite sure about that either.

    try \03FE09FF73073800 to initiate the first segment of a level MMI on the far side of a bridge with local address $FE.
     
    Don, Oct 17, 2012
    #14
  15. rhamer

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    ok that command \03FE09FF7307380045g returns me a g#

    so no go.

    but \03FD09FF7307380046g looks like it is working. I had to target the bridge local unit address which is the app address of the far side.

    Cheers

    Rohan
     
    rhamer, Oct 17, 2012
    #15
  16. rhamer

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    I think there are examples in the Serial Interface Users Guide.
     
    ashleigh, Oct 17, 2012
    #16
  17. rhamer

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Yeah there is, but not specifically the combination I was after and I couldn't quite get it.

    But I think I've got it nailed now.

    Cheers

    Rohan
     
    rhamer, Oct 17, 2012
    #17
  18. rhamer

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    A further question on this topic.

    Take the following command \03FD09FF7307380046g

    This command is addressed to Unit $FD which is a Bridge.

    Now by convention $FD happens to be the network address of the far side of the Bridge.

    If I encounter a site where convention is not followed and some other network address (say $FC) is used as the far side network address, but the local side Bridge unit address is still $FD will that command still work? I think yes.

    In other words am I targeting the bridge local side unit address, regardless of what the far side network address actually is? I think yes also.

    Cheers

    Rohan
     
    rhamer, Oct 19, 2012
    #18
  19. rhamer

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    Yes.

    However, the reverse route would be incorrect. For some messages, that won't matter, for others it will.

    Misconfigured networks will lead to unexpected results.
     
    ashleigh, Oct 19, 2012
    #19
  20. rhamer

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Ah, so it's not just a convention, it's a requirement. I wonder if that is realised by everybody.

    Cheers

    Rohan
     
    rhamer, Oct 19, 2012
    #20
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.