Did the device formerly for work OK for your friend?
Normally, an invalid SIM notification is that the device has not been unlocked for use on a carrier other than the one to which it is branded. How do I determine if my BlackBerry is "unlocked"? - BlackBerryFAQ
If the device is branded to ATT and you have an ATT SIM, it should work, but still a new SIM could be gotten from ATT and it might allow the new SIM.