Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Became flame-war

???
04/24/08 07:58
Read: times


 
#153935 - Reading Erik's mind
Responding to: ???'s previous message
I'll stick my neck out here and explain my guess about what Erik is suggesting. If my guess is correct, the trick is to stop thinking about searching the space containing billions and billions of addresses and instead think about searching through the much less daunting space that contains 48 address bits.

Here's one way to do that. First make the following assumptions:
  • Each slave has a unique 48-bit address.
  • At each enumeration step, the master sends out two 48-bit strings. One of these is a test address. The other is a mask that tells the slaves which of the test address bits to consider during the current enumeration step. Let's say that a '1' bit in the mask means that the slave should consider the corresponding bit in the test address, and that a '0' bit in the mask means that the slave should ignore the corresponding bit in the test address.
  • When a slave receives an address/mask pair, it immediately compares the test address sent by the master with its own address, but considering only the address bits corresponding to '1' bits in the current mask. If there is a match and the slave has not already been identified by the master, then the slave transmits its entire address. Otherwise, it remains silent.
  • After the master sends an address/mask pair, it listens for the slaves' responses. The master can distinguish among these possibilities:
    1. No slaves respond
    2. Exactly one slave responds
    3. More than one slave responds
Now consider the following diagram, which represents the slave addresses. I've drawn it as though though the addresses were only 3 bits wide. (If you want to draw the diagram for 48-bit addresses, go ahead!)

The master starts the enumeration process by commanding all the slaves to mark themselves as not yet having been identified.

The master then traverses the address tree in left-first order, starting at the top node. At each node, the master creates the test address by replacing the each X shown for that node with a 0 or a 1 (it doesn't matter which). It creates the mask by placing a 1 in each position where a 1 or 0 is shown in the diagram, and a 0 in each position where an X appears in the diagram.

Then, after sending the address/mask pair and receiving the slaves' responses, the master behaves as follows:
  • If a single slave responds, that means that it is the only slave having an address within the subtree whose root is at the current node. In this case, the master records that slave's address and commands the slave to mark itself as having been identified. The master then abandons the search of that subtree and continues the tree traversal as though the subtree had been traversed.
  • If no slaves respond, that means that no slave has an address within the subtree whose root is at the current node. In this case, the master abandons the search of that subtree and continues the tree traversal as though the subtree had been traversed.
  • If multiple slaves respond, that means that multiple slaves have addresses within the subtree whose root is at the current node. In this case, the master continues to traverse the tree normally.
The algorithm ends when the tree traversal is complete. With any reasonable number of slaves, it will be very quick because huge portions of the tree will be pruned as explained above.

See here for the Maxim/Dallas app note that Michael mentioned. It describes a similar scheme for enumerating slaves on a 1-Wire network.

-- Russ


List of 115 messages in thread
TopicAuthorDate
Wireless network            01/01/70 00:00      
   assign address to each slave?(with "jumpers")            01/01/70 00:00      
      Still you wont know which is which?            01/01/70 00:00      
         pay with time            01/01/70 00:00      
            not easy            01/01/70 00:00      
            or pay with money            01/01/70 00:00      
               or pay with money - not a solution            01/01/70 00:00      
                  Inherently not simple!            01/01/70 00:00      
         you cant poll for N number of slaves            01/01/70 00:00      
             automatic            01/01/70 00:00      
               N?            01/01/70 00:00      
                  N? - any            01/01/70 00:00      
         Ho about this ...            01/01/70 00:00      
            how do you propose to do that?            01/01/70 00:00      
               have a look at the picture on the website            01/01/70 00:00      
                  Obviously missing something here...            01/01/70 00:00      
                  dipswitch my butt            01/01/70 00:00      
                     it\'s pretty obvious, isn\'t it?            01/01/70 00:00      
                        first - then            01/01/70 00:00      
                           Once again you're assuming facts not in evidence            01/01/70 00:00      
                              The sample is much larger now            01/01/70 00:00      
                                 example            01/01/70 00:00      
                                    Yes, it is            01/01/70 00:00      
                                 I like that ...            01/01/70 00:00      
            I Don't get it either.            01/01/70 00:00      
               It's reall not that complicated ... but ...            01/01/70 00:00      
                  Still not with you            01/01/70 00:00      
                  Slaves to broadcast their presence HOW?            01/01/70 00:00      
                     Not that difficult            01/01/70 00:00      
                        Thats fine but what if we have            01/01/70 00:00      
                           Then you really do need a database!            01/01/70 00:00      
                              you WILL get in big doo-doo            01/01/70 00:00      
                                 this is absolutely true!            01/01/70 00:00      
                           You\'ll need lots of switches and lots of ports            01/01/70 00:00      
                              totally off the rocker            01/01/70 00:00      
                                 How long, at 8kbps            01/01/70 00:00      
                                    Who on Earth wants to do that            01/01/70 00:00      
                                       One has to set limits            01/01/70 00:00      
                                          It does not have to be manual            01/01/70 00:00      
                                             It has its "baggage"            01/01/70 00:00      
                                                no "significant burden" who cares about 'simpler'            01/01/70 00:00      
                                                   Maybe we need to bring the O/P back to reality            01/01/70 00:00      
                                                      I can't tell            01/01/70 00:00      
                                                         I may be slow today....            01/01/70 00:00      
                                                   ARP possiblities            01/01/70 00:00      
                                                Overhead - but possibly not too serious?            01/01/70 00:00      
                                                   You may be onto something ...            01/01/70 00:00      
                                                      you don't get it            01/01/70 00:00      
                                                         How long would it take?            01/01/70 00:00      
                                                            quicker than what?            01/01/70 00:00      
                                                               Obviously there's a trick involved            01/01/70 00:00      
                                                                  or ...            01/01/70 00:00      
                                                                     no patent ...            01/01/70 00:00      
                                                                        With that scheme you have to skip some            01/01/70 00:00      
                                                                           easy            01/01/70 00:00      
                                                                              No ... it means there's nobody at that one address            01/01/70 00:00      
                                                                                 Not an address, an address mask            01/01/70 00:00      
                                                                                    not likely on low-cost RF            01/01/70 00:00      
                                                                                       of course, but nobody woud dream of sending RF w/o            01/01/70 00:00      
                                                                                          Miracle ? , I differ            01/01/70 00:00      
                                                                                 confound it reat the stuff            01/01/70 00:00      
                                                                        no patent ... And after slaves colliding            01/01/70 00:00      
                                                                           after each 'find' it get faster            01/01/70 00:00      
                                                                              the cheap RF links are typically            01/01/70 00:00      
                                                               Erik, please clarify one point            01/01/70 00:00      
                                                                  If one could devise a suitable RF protocol...            01/01/70 00:00      
                                                                     the key is to know more than is known here            01/01/70 00:00      
                                                                        confound it can't you read            01/01/70 00:00      
                                                                           You're assuming facts not in evidence.            01/01/70 00:00      
                                                                              if a response comes, your code is faulty            01/01/70 00:00      
                                                                                 So ... how does that differ from not transmitting?            01/01/70 00:00      
                                                                                    Richard, Richard            01/01/70 00:00      
                                                                                       Yes, but what SHOULD happen?            01/01/70 00:00      
                                                                                       with a mask of zero any unassigned sign sho            01/01/70 00:00      
                                                                                          What is it you are recommending, Erik?            01/01/70 00:00      
                                                                                             Nothing I feel            01/01/70 00:00      
                                                                                             Reading Erik's mind            01/01/70 00:00      
                                                                                                Address+Mask - an RF twist            01/01/70 00:00      
                                                                                                   let me clarify            01/01/70 00:00      
                                                                                                Russ, I admire your "psychic abilities'            01/01/70 00:00      
                                                                                                   A refinement            01/01/70 00:00      
                                                                                                      yes            01/01/70 00:00      
                                                                                                         Starting over            01/01/70 00:00      
                                                                                                            Russ, you may very well be right            01/01/70 00:00      
                                                                                                   Erik, that is not what was asked for!            01/01/70 00:00      
                                                                                                      whic i would have done ...            01/01/70 00:00      
                                                                                                         Perhaps you\'re not aware ...            01/01/70 00:00      
                                                                                                            1) abd 2)            01/01/70 00:00      
                                                                                             NOT "mask address" but "mask AND address"            01/01/70 00:00      
                                                                        some things you can do on the one-wire channel            01/01/70 00:00      
                                                                           Very tricky indeed            01/01/70 00:00      
                                                                              I do not ASS U ME diddlysquat            01/01/70 00:00      
                                                                           It is absolutly required for my scheme            01/01/70 00:00      
                                                                              That is a non-starter with low-cost RF.            01/01/70 00:00      
                                                                  sorry            01/01/70 00:00      
   OK, here's an idea            01/01/70 00:00      
      collisions avoidance ?            01/01/70 00:00      
         Surely the master needs to know its slaves?!            01/01/70 00:00      
            identifying slaves            01/01/70 00:00      
         I can not help with collisions but..            01/01/70 00:00      
   multimaster via RF            01/01/70 00:00      
      collision recovery            01/01/70 00:00      
         Not a few seconds            01/01/70 00:00      
         Listen Before Xmit            01/01/70 00:00      
            not that urban legend again            01/01/70 00:00      
               Accepted terminology            01/01/70 00:00      
            Collisions will still happen            01/01/70 00:00      
               Yes, but how will the system respond?            01/01/70 00:00      
            Listen Before Xmit ......            01/01/70 00:00      
               if slaves can "speak without being spoken to"            01/01/70 00:00      
   Perhaps you should read this article            01/01/70 00:00      
    A Better Way             01/01/70 00:00      
      There are some internal issues too            01/01/70 00:00      
         frequency hopping            01/01/70 00:00      
            frequency hopping , I have DSSS            01/01/70 00:00      

Back to Subject List