Create a wirelessNetworkSimulator
object. By default, the wirelessNetworkSimulator
object applies free-space path loss model for the channel effects.
Create two Bluetooth BR nodes, one with the "central"
role and other with the "peripheral"
role. Specify the position of the Peripheral node in meters.
Create a default Bluetooth BR connection configuration object to configure and share a connection between Bluetooth BR Central and Peripheral nodes.
Configure connection between the Central and the Peripheral nodes.
Create and configure a networkTrafficOnOff
object to generate an On-Off application traffic pattern.
Add application traffic from the Central to the Peripheral node.
Add the Central and Peripheral nodes to the wireless network simulator.
Specify the simulation time in seconds.
Run the simulation for the specified simulation time.
Custom channel model is not added. Using free space path loss (fspl) model as the default channel model.
Retrieve application, baseband, and physical layer (PHY) statistics corresponding to the Central and Peripheral nodes.
centralStats = struct with fields:
Name: "Node1"
ID: 1
App: [1x1 struct]
Baseband: [1x1 struct]
PHY: [1x1 struct]
peripheralStats = struct with fields:
Name: "Node2"
ID: 2
App: [1x1 struct]
Baseband: [1x1 struct]
PHY: [1x1 struct]