I used this Medium Article to create the connection, and while it usually works the connection sometimes closes before even connecting. What I noticed is this usually happen