It connects to the port circled in red, under the storage compartment on the driver’s side (image credit to respective owner).
I use a vgate icar2 wifi adapter. Even though bimmercode says it doesn’t work, it does. I got mine last month off of amazon and it is still working perfectly. No idea about the longevity though.