Bafang m400 mid drive no pedal assist???

Thanks for all the help guys. Eventually I fixed my issue, I did pull apart everything again and double checked everything was fine. The fix was, I had the battery attached all this time whilst working on my bike and all I did was remove the battery and attach it again, and suddenly everything worked!
When all else fails... reboot.
Whatever fixed it, great. I want to point out though that we don't know if it was a reboot or if the taking the battery off and putting it back on made for a good connection that wasn't quite there before. Regardless, glad you're up and running and thanks for reporting back.

Now, another "for what it's worth": My riding mower wouldn't start today after sitting all winter. DEAD. No clicks or anything. I tried jumping it. Nada. Thought if it's nothing worse, maybe I need a new battery. Took the battery out, cleaned it up, put a voltmeter to it. 12.5. volts. So I wire brushed the connections and put a nice little film of dielectric grease (silicone) on everything, and hooked it back up. Fired right up. I could have left off the grease and gotten the same results this time, but now I'm confident I won't have this particular problem again any time soon. Point being, there is zero ill-effect in putting dielectric grease on battery terminal contacts. There is no invisible insulating film preventing electron flow. And there is ongoing protection now from future corrosion. This is consistent with all of my experiences with dielectric grease.

I don't mean to argue with Gionni or with Garmin or Permatex. They may be correct for enclosed connectors with o-rings, but their warnings also seem somewhat theoretical, whereas my experience is real world, really happened. It's only anecdotal though, so let the debate continue.