A method for managing wireless devices in a wireless medical body area network, MBAN,, comprising: configuring the wireless MBAN, the wireless MBAN comprising wireless devices (10, 12, 14, 20, 22) comprising at least one sensor and at least one hub (20, 22), characterized by: configuring the wireless MBAN, the configuring comprising sharing at least identification data, battery status, and communication performance between all wireless devices of the wireless MBAN; providing a plurality of the wireless devices with at least short range communication and long range communication; configuring a first wireless device of the wireless MBAN as a master of the wireless MBAN depending on the battery status and the communication performance; and thereafter for managing the wireless devices in the wireless MBAN the method comprises: configuring a second wireless device of the wireless MBAN as a new master if the battery status and communication performance of the master drops below a predefined level of the battery status and communication performance of the second wireless device; and routing data transfer within the wireless MBAN depending on the battery status and communication performance of the wireless devices of the wireless MBAN. configuring the wireless MBAN, the wireless MBAN comprising wireless devices (10, 12, 14, 20, 22) comprising at least one sensor and at least one hub (20, 22), characterized by: configuring the wireless MBAN, the configuring comprising sharing at least identification data, battery status, and communication performance between all wireless devices of the wireless MBAN; providing a plurality of the wireless devices with at least short range communication and long range communication; configuring a first wireless device of the wireless MBAN as a master of the wireless MBAN depending on the battery status and the communication performance; and thereafter for managing the wireless devices in the wireless MBAN the method comprises: configuring a second wireless device of the wireless MBAN as a new master if the battery status and communication performance of the master drops below a predefined level of the battery status and communication performance of the second wireless device; and routing data transfer within the wireless MBAN depending on the battery status and communication performance of the wireless devices of the wireless MBAN. configuring the wireless MBAN, the configuring comprising sharing at least identification data, battery status, and communication performance between all wireless devices of the wireless MBAN; providing a plurality of the wireless devices with at least short range communication and long range communication; configuring a first wireless device of the wireless MBAN as a master of the wireless MBAN depending on the battery status and the communication performance; and thereafter for managing the wireless devices in the wireless MBAN the method comprises: configuring a second wireless device of the wireless MBAN as a new master if the battery status and communication performance of the master drops below a predefined level of the battery status and communication performance of the second wireless device; and routing data transfer within the wireless MBAN depending on the battery status and communication performance of the wireless devices of the wireless MBAN. configuring a second wireless device of the wireless MBAN as a new master if the battery status and communication performance of the master drops below a predefined level of the battery status and communication performance of the second wireless device; and routing data transfer within the wireless MBAN depending on the battery status and communication performance of the wireless devices of the wireless MBAN.