The answer to your question is simple: Hire a lawyer. You have decided the search was illegal but you have not furnished enough information for any lawyer here to agree or disagree with you concerning whether the search was illegal. You should discuss the details of this stop with your lawyer - in private. Do not mention any more details in this or any other public forum.
The first priority is to address the current charges. Whether a motion to quash the arrest or to suppress or a combination motion should be researched and filed is a decision that you and your lawyer should focus on.
Consult and retain an experienced criminal defense attorney ASAP.
Of course, every answer is based on the question asked and requires a more complete context. This answer should not be relied upon to make a legal decision. Seek the advice of an experienced criminal defense attorney before acting. Law Offices of Raymond G. Wigell, Ltd. Defenders of the Constitution since 1975/ Aggressive Creative Defense Strategies/ Website: www.waaltd.com 24/7 --(708) 481-4800.
All the answers you got and comments you made point to one thing--you need criminal defense attorney immediately.
NOT LEGAL ADVICE. FOR EDUCATION AND INFORMATION ONLY. Mr. Rafter is licensed to practice in the Commonwealth of Virginia and the US Federal Courts in Virginia. There is no implied or actual attorney-client relationship arising from this education exchange. You should speak with an attorney licensed in your state, to whom you have provided all the facts before you take steps that may impact your legal rights. Mr. Rafter is under no obligation to answer subsequent emails or phone calls related to this matter.