Swarm robotics investigates groups of relatively simple robots that use decentralized control to achieve a common goal. While the robots of many swarm systems communicate via optical links, the underlying channels and their impact on swarm performance are poorly understood. This paper models the optical channel of a widely used robotic platform, the e-puck. It proposes SwarmCom, a mobile ad-hoc network for mobile robots. SwarmCom has a detector that, with the help of the channel model, was designed to adapt to the environment and nearby robots. Experiments with groups of up to 30 physical e-pucks show that (i) SwarmCom outperforms the state-of-the-art infra-red communication software-libIrcom-in range (up to 3 times further), bit error rate (between 50 and 63% lower), or throughput (up to 8 times higher) and that (ii) the maximum number of communication channels per robot is relatively low, which limits the load per robot even for high-density swarms. Using channel coding, the bit error rate can be further reduced at the expense of throughput. SwarmCom could have profound implications for swarm robotics, contributing to system understanding and reproducibility, while paving the way for novel applications. Keywords Swarm robotics • MANET • Infra-red communication • Channel model • e-puck • libIrcom S.M. Trenkwalder is a recipient of a DOC Fellowship of the Austrian Academy of Sciences. This is one of the several papers published in Autonomous Robots comprising Special Issue on Robot Communication Challenges: Real-World Problems, Systems, and Methods.