Maybe the charging port is defective. When plugging in the charger, try applying light pressure to the dongle at a certain angle. Sometimes those ports become worn out so that it only detects anything plugged in there when there's pressure applied to that at certain angles.
Or try a different cable. Some cables are only capable of transmitting data one-way for some reason. Another thing you can try is plugging in the phone with charger into a computer or a different power adapter.
But, why is Miitomo a concern? They discontinued that long ago. I don't think you can even access the app anymore, can you? I miss that app too. I used it now and then.