Once I met Collin R. Mulliner at the university, he told me he was having fun exploring weak bluetooth stacks. I liked the idea, and some days later I bought a bluetooth dongle. It was quite a surprise to me that my phone, a Nokia 6310i, silently accepted AT modem commands on some RFCOMM channels without pairing. Later I discovered that some Ericsson phones had the same kind of vulnerability. This is the C code which I wrote while learning how to use the bluez stack and how to get data from a phone using AT commands.