nes-proj/examples/rpl-udp/rpl-udp.resc
Piotr Zierhoffer da2f84db19 Add sample Renode scripts for rpl-udp example
This sample allows to run two connected TI CC23538DK nodes, connected
via radio, in the Renode Framework. The emulation loads the compiled
binaries for client and server nodes. It also fetches a precompiled
bootloader.
2017-11-02 17:02:35 +01:00

46 lines
1.6 KiB
Plaintext

:name: cc2538 range medium 2 nodes
######################################################################
#
# Sample script creating 1 server node and 1 client node using a
# range-based medium function - transmission is possible if nodes are
# in range. Nodes are positioned in a 3D space (x,y,z),
# at a distance of 10 (units) from each other (on the X axis).
#
# Differences in SyncUnit values in machines represent the differences
# in their relative speed. This prevents the machines from
# synchronizing in 100%, which is crucial for Contiki network stack
# stability.
#
######################################################################
path add $CWD
emulation CreateWirelessMedium "wireless"
$domain = `emulation AddSyncDomain`
wireless SetSyncDomainFromEmulation $domain
# The radio is using a range-based medium (with the `Range` set to `11`)
# If not set, the default SimpleMediumFunction will be used (where range is not relevant)
wireless SetRangeWirelessFunction 11
######################### UDP SERVER - begin #########################
$bin=@udp-server.cc2538dk
$name="server"
i $ORIGIN/cc2538-node.resc
wireless SetPosition radio 0 0 0
machine SyncUnit 100
showAnalyzer sysbus.uart0
mach clear
########################## UDP SERVER - end ##########################
######################### UDP CLIENT - begin #########################
$bin=@udp-client.cc2538dk
$name="client"
i $ORIGIN/cc2538-node.resc
wireless SetPosition radio 10 0 0
machine SyncUnit 110
showAnalyzer sysbus.uart0
mach clear
########################## UDP CLIENT - end ##########################