Arduino detecting bluetooth devices

Hello. I am relatively new to arduino, and want to do something that should be simple, but I am finding it is not. I have an arduino duemilanove board with bluesmirf gold module wired to it. I want this device to detect any bluetooth devices in range. If it detects a bluetooth device with the right bluetooth address, I want it to perform and action. I can't seem to find anywhere what I need/ code to get the module to detect bluetooth devices?! Any help or sample code would be much appreciated :)

You'll need to dig through the bluesmirf datasheet, see what commands it accepts.. and how. The bluetooth devices I've worked with thus far all used a serial interface, and came with a comprehensive manual containing the entire AT command set the device accepts.

I don't know how the bluesmirf works in particular, so I'll leave it to you to do the research to find out the specifics.