Yes it is legal for cops to lie to you. Yes he can search you if he smells weed. You have the right to have weed with a PX but you do not have the right to drive and smoke weed, which can actually be a DUI.
I would have an attorney review this but yes it is legal for an officer to search your car if he believes there are illegal items in the car based on smell. Do not travel with MJ ever even if you have a PX.
Mr. Driessen is a former Deputy DA in Orange County with over 8 years of criminal law experience. Nothing stated on this site shall in anyway be construed as legal advice, or as creating any attorney client relationship. If you would like to hire Mr. Driessen, feel free to contact him at www.theocduiguy.com.
I'm not detecting the smell of anything illegal in the conduct you question. And, it is not uncommon for officers to seek 'minions' who might speak out against others who commit more serious crimes.
Another word for minion is snitch. Rat is also sometimes used.
Police do not speak with you except to find incriminating evidence. You awere given a court appearance date and a charge - what is the code number of the charge. You do need to speak to some one. At this time your concern should not be about what he did to you but what the court will do to you... jail or drug program and fines and your getting a charge on your rap sheet...