507 simply means there is no OS software on your device. It's a simple fix.
1. Install Desktop Manager if it's not installed already.
2. Download and install the latest Pearl OS from here. It's a version released by Cingular but will work on any Pearl:
https://www.blackberry.com/Downloads...E4F82F9F00E7D4
3. Delete the file "vendor.xml" from c:\program files\common files\research in motion\apploader
4. Plug in BB and run Desktop Manager.
5. From the connections menu at the top select USB.
6. Run Application Loader.
The OS will reload on to the device.