Here a mBed code to send a hello world to TTN.
https://developer.mbed.org/users/ropu/code/mDot_LoRa_example_TTN_connect/
this should replace the terminal commands.
Just got my Buenos Aires TTN Multitech gateway working!
http://thethingsnetwork.org/api/v0/nodes/0201BA01/
thanks for all the help