Imagine a bat flying through the jungle of Borneo. It calls out to find a place to spend the night. And a plant calls back.

The plant in question is Nepenthes hemsleyana—a flesh-eating plant that’s terrible at eating flesh. It’s a pitcher plant and like all its kin, its leaves are shaped like upright vases. They’re meant to be traps. Insects should investigate them, tumble off the slippery rim, and drown in the pool of liquid within the pitcher. The pitcher then releases digestive enzymes to break down the corpses and absorb their nitrogen—a resource that’s in short supply in the swampy soils where these plants grow.

But N.hemsleyana has very big pitchers that are oddly short of fluid and that don’t release any obvious insect attractants. And when Ulmar Grafe from the University of Brunei Darussalam looked inside them, he saw seven times fewer insects than in other pitchers.

Instead, he found small bats.

Grafe enlisted the help of Caroline and Michael Schöner from the University of Greifswald, a wife-and-husband team who had worked on bats. Together, they repeatedly found the same species—Hardwicke’s woolly bat—roosting inside the plants, and nowhere else. In some cases, youngsters snuggled next to their parents.

The plant had adapted to accommodate these tenants: that’s why their pitchers are roomier than average, and have little fluid. And the bats repay them with faeces. Bat poo—guano—is rich in nitrogen, and the team found that this provides the pitcher with a third of its supply. The carnivorous plant has largely abandoned its insect-killing ways and now makes a living as a bat landlord.

This was all published in 2011. Since then, the Schöners and Grafe have discovered another extraordinary side to the relationship between the bat and the pitcher. “It started when we were searching for the plants in the forest,” says Michael Schöner. “We had a lot of difficulty. The vegetation is dense and the pitchers are green.”

This problem should be even worse for the woolly bats. They navigate by echolocation: they make high-pitched squeaks and visualise the world in the reflecting echoes. “Inside these forests, you get a reflection from everything, every single plant and leaf that’s there,” says Schöner. To make matters worse, the bats must distinguish N.hemsleyana from a closely related, similarly shaped, and far more common species, that’s unsuitable for roosting. How do they do it?

In South America, there are flowers with a similar problem: they are pollinated by bats, and must somehow attract these animals amid the clutter of the rainforest. They do it by turning their flowers into sonar dishes, which specifically reflect the calls of echolocating bats. The Schöners wondered if their pitcher plant had also evolved acoustic cat’s eyes.

They contacted Ralph Simon from the University of Erlangen-Nürnberg, who showed up with a robotic bat head.

It has a central loudspeaker and two microphones that look like a bat’s ears. He used it to “ensonify” the pitchers with ultrasonic calls from various directions, and measure the strength of the echoes.

The team found that the back wall of N.hemsleyana—the bit that connects its lid to its main chamber—is unusually wide, elongated, and curved. It’s like a parabolic dish. It strongly reflects incoming ultrasound in the direction it came from, and over a large area. Other pitcher plants that live in the same habitat don’t have this structure. Instead, their back walls reflect incoming calls off to the sides. So, as the woolly bats pepper the forest with high-pitched squeaks, the echoes from N.hemsleyana should stand out like a beacon.

Is this what actually happens? To find out, the team modified the pitchers’ reflectors. They enlarged them by building up the sides with tape, reduced them by trimming the sides with scissors, and cut them off entirely (while propping the lids up with toothpicks). Then, they hid the modified plants among some shrubbery, and placed them in a tent with some bats.

The bats took much less time to approach the pitchers with enlarged or unmodified reflectors than those with trimmed or amputated ones. And when given a choice, they mostly entered pitchers with natural, unaltered reflectors. They seem to be attracted to strong echoes but when they get close, they make a more considered decision about whether they have found the right species.

The team also found that the woolly bats produce the highest-pitched calls ever recorded from a bat. They don’t need such high frequencies to hunt their prey and, indeed, other insect-eating bats are nowhere near that high-pitched. Instead, the team believes that the calls are particularly well suited to detecting targets in cluttered environments. Between these squeaks and the plant’s reflectors, both partners can find each other in the unlikeliest of circumstances. The bat gets a home, and the plant gets its faecal reward.