A medical capsule is provided which includes at least a housing, transceiver, ultrasonic transducer(s), a power source, a microprocessor, and is capable of carrying a medical payload. The capsule is ingestible or implantible in a human or animal body and communicates wirelessly via ultrasonic signals with one or more transceivers attached to the outside of the body. The capsule payload can perform diagnostic, analytical, treatment or imaging functions and its position within the body can be accurately monitored. A wireless system employing the capsule and external transceiver can also include a remote monitoring station accessed by radio frequency electromagnetic signals. Further, collaborative activity among the internal capsules is enabled by an inter-capsule and capsule-to-external transceiver acoustic communications net.