A portable electronic device having opposing first and second sides, the portable electronic device comprising: a radio-frequency antenna configured to transmit radio-frequency signals with a transmit power that is capped at a maximum transmit power level; circuitry that is configured to adjust the maximum transmit power level; an accelerometer; and a speaker; characterised by: the speaker being configured to generate ultrasonic sound; the portable electronic device comprising a front facing microphone on the first side and a rear facing microphone on the second side, wherein one of the front and rear facing microphones is selected based on orientation data from the accelerometer; and the circuitry being configured to adjust the maximum transmit power level based at least partly on measured ultrasonic sound from the selected microphone (20, 35), wherein the circuitry is configured to place the portable electronic device in a first mode of operation in which the maximum transmit power level is set to a first level in response to determining that the selected microphone is gathering more ultrasonic sound than a predetermined threshold and the circuitry is configured to place the portable electronic device in a second mode of operation in which the maximum transmit power level is set to a second level in response to determining that the selected microphone is gathering less ultrasonic sound than the predetermined sound threshold, and wherein the first level is greater than the second level. a radio-frequency antenna configured to transmit radio-frequency signals with a transmit power that is capped at a maximum transmit power level; circuitry that is configured to adjust the maximum transmit power level; an accelerometer; and a speaker; characterised by: the speaker being configured to generate ultrasonic sound; the portable electronic device comprising a front facing microphone on the first side and a rear facing microphone on the second side, wherein one of the front and rear facing microphones is selected based on orientation data from the accelerometer; and the circuitry being configured to adjust the maximum transmit power level based at least partly on measured ultrasonic sound from the selected microphone (20, 35), wherein the circuitry is configured to place the portable electronic device in a first mode of operation in which the maximum transmit power level is set to a first level in response to determining that the selected microphone is gathering more ultrasonic sound than a predetermined threshold and the circuitry is configured to place the portable electronic device in a second mode of operation in which the maximum transmit power level is set to a second level in response to determining that the selected microphone is gathering less ultrasonic sound than the predetermined sound threshold, and wherein the first level is greater than the second level. the speaker being configured to generate ultrasonic sound; the portable electronic device comprising a front facing microphone on the first side and a rear facing microphone on the second side, wherein one of the front and rear facing microphones is selected based on orientation data from the accelerometer; and the circuitry being configured to adjust the maximum transmit power level based at least partly on measured ultrasonic sound from the selected microphone (20, 35), wherein the circuitry is configured to place the portable electronic device in a first mode of operation in which the maximum transmit power level is set to a first level in response to determining that the selected microphone is gathering more ultrasonic sound than a predetermined threshold and the circuitry is configured to place the portable electronic device in a second mode of operation in which the maximum transmit power level is set to a second level in response to determining that the selected microphone is gathering less ultrasonic sound than the predetermined sound threshold, and wherein the first level is greater than the second level.