The STM reference library wasn't expressly designed to work on an ARM target, so running into some impementation issues is very possible. However, it uses the base level TCP functions at its heart, so it's possible that it will be able to be implemented successfully on this target. Error code 56 implies that your connection request is timing out before receiving a response. You should go through and double-check the timeout duration, and increase them as necessary. Additionally, to remove any unnecessary complications in trying to debug this, you may want to try running just the basic TCP example program and see if that works before trying to incorporate the STM reference library. I hope this helps!