Internet of Things has revolutionized the way services are distributed in smart environments, approaching the computation where data are generated. However, IoT devices have limited resources and reconfiguring them can be very difficult. In these cases, Edge computing represents a challenging solution supporting IoT with flexible management of resources. We investigate how pushing computation activities from Edge to IoT, changing the behavior of IoT nodes according to application or system requirements. We adopted the Multi-Hop-Over-The-Air update technology enabling the auto-configuration of IoT devices based on MicroController Units. Considering IoT nodes connected in a mesh network, we developed a distributed and collaborative ecosystem performing on-fly injection of code in IoT nodes, thus automatically deploying new services whenever necessary. We implemented a prototype of the …