I thought you only had the right to remain silent after you're in custody? So just give him your license, registration, and insurance info and remain silent?

At what point are you allowed to not answer questions and speak to an attorney?

I've tried remaining silent the past two times I got stopped and the cops said I didn't have a right unless I was in custody and when I went to go to the hospital to give a blood sample, he took my cell phone from me and said my only right was the right to shut up.