Multitech + KL46Z NanoService example with the RTOS
Dependencies: mbed SocketModem nanoservice_client_1_12
Diff: main.cpp
- Revision:
- 2:1592223f12e1
- Parent:
- 1:5147d3fa7816
- Child:
- 3:1e981a0aebfb
--- a/main.cpp Mon Feb 17 22:26:04 2014 +0000 +++ b/main.cpp Mon Feb 17 22:42:20 2014 +0000 @@ -11,13 +11,13 @@ using namespace mts; Cellular* cellular; +Endpoint nsp; // **************************************************************************** // Cellular initialization static void cellular_init() { - //Setup serial interface to radio MTSSerialFlowControl* serial = new MTSSerialFlowControl(PTD3, PTD2, PTA12, PTC8); serial->baud(115200); @@ -61,6 +61,11 @@ static void nsp_init() { + nsp.set_address(NSP_ADDRESS, NSP_PORT); + +// DEBUG("name: %s", endpoint_name); + DEBUG("NSP Location: coap://%s:%d\n", NSP_ADDRESS, NSP_PORT); + // Bind the port cellular->bind(EP_PORT); @@ -71,12 +76,6 @@ wait(3); } DEBUG("TCP connection to NSP successful."); - cellular->write("test", 4, -1); - -// nsp.set_address(NSP_ADDRESS, NSP_PORT); - -// DEBUG("name: %s", endpoint_name); -// DEBUG("NSP=%s - port %d\n", NSP_ADDRESS, NSP_PORT); }