Uniquely identifying a M5stack with a physical connection



  • I am working on a project where i would like to plug in an m5 stack to a physical connection (RJ45 or Serial), have some kind of config file that uniquely identifies that particular m5stack, and be able to report it back where it's been connected to.

    Imagine there are 20 M5Stacks in positions 1-20, i would basically like to be able to know exactly which M5stack is in which position. Is this possible?



  • @sofortune multi serial device commuication , you could use “Modbus” function.

    in this page bottom, have UIFlow modbus use tutorial.
    https://docs.m5stack.com/#/en/uiflow/advanced?id=modbus-master



  • Thanks, but i should have mentioned the idea is that if i move one of the m5stacks around, connecting it into a different position 1-20 it would be able to report back its position.

    Modbus concept actually is realy close, but seems that when one of the devices is detached the others become undetectable.

    Anything else similar to this?

    At one point i considered using a 2 layer switch with associationg each position with a port on the switch, but was wondering if there's a more cost effective method using serial.