These applications communicate through UDP/IPv6 socket in simple client-server model.
- Client will send a data string to server.
- Server will capitalize the recieved data string from the client and send back to the client.
- Client will receive the capitalized data string and print it out.
Refer to: linux-wpan http://wpan.cakelab.org/
- Could be founded at https://github.com/linux-wpan/wpan-tools
- The dependencies will be listed during building
SX1278 driver and 6LoWPAN kernel module should be inserted or loaded before this action.
Do these works with the granted privilege.
# Private Area Network ID
panid="0xbeef"
# Index of the wpan interface
i=0
# Set the PANID of the wpan interface
iwpan dev wpan${i} set pan_id $panid
# Create a lowpan interface over the wpan interface
ip link add link wpan${i} name lowpan${i} type lowpan
# Bring up the wpan and lowpan interfaces
ip link set wpan${i} up
ip link set lowpan${i} up
ip addr
will show the IPv6 addresses of the interfaces.
make
will produce server and client.
server <listening IPv6 address> <listening port>
-
listening IPv6 address: Listening on which IPv6 address
-
listening port: Listening on which UDP port
client <src IPv6 address> <dst IPv6 address> <dst port> <data string>
-
src IPv6 address: Send with the source IPv6 address
-
dst IPv6 address: Send to the server's IPv6 address
-
dst port: Send to the server's UDP port
-
data string: Send the data string to the server