Skip to content

ARMmbed/mbed-os-example-tcp-ping-pong

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Mbed OS - TCP ping-pong with node.js

Looking for UDP? See mbed-udp-ping-pong.

Tested on ODIN-W2 EVK, but should work on every Mbed OS 5 device that implements the Network Sockets API.

Get both devices on the same WiFi network, or host the server on a publicly available hostname.

Setting up the server

  1. Install a recent version of node.js.

  2. Open a terminal.

  3. Navigate to the server-in-node directory.

  4. Run:

    $ node server.js
    
  5. Note down the IP address of the WiFi interface.

Setting up the client

  1. Open mbed_app.json and set your connectivity method and WiFi credentials.
  2. Open main.cpp and set the IP (or hostname) of the server.
  3. Compile and flash on the device.

What it does

The Mbed device will set up a TCP socket to the server, and will send 'ping' the server. The server will respond with 'pong'.

About

TCP Ping-pong between Mbed OS device and node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published