By default, DEMO-OPPNET tries to establish an opportunistic network based on a Wi-fi Ad hoc network. As opposed to the far more common Access Point mode, the Ad hoc mode (aka IBSS mode) of Wi-Fi does not need any fixed infrastructure.
Unfortunately, Linux software support at the driver level is not complete (and
sometimes buggy) for a large number of Wi-Fi chipsets (note that this is worse on
Windows). You can use the linux command iw list to check that the linux driver for your
chipset can support the IBSS mode, in particular, that it supports the
join_ibss command. But even if it is the case, a proper functioning is not
guaranteed.
The 802.11 standard doesn't really consider the mobility of the devices in Ad hoc mode, simply assuming that an ad hoc network is "a network composed solely of stations within mutual communication range of each other via the wireless medium". This leaves room in drivers' implementation for different behaviors when it comes to handle the choice of the BSSID (aka cell ID).
When configuring the WiFi interface in Ad hoc mode, you set a channel and an ESSID (the visible name of the network). In general the driver will adopt the cell ID of an already present emitter with the same channel and ESSID, or generate a random one if the device is alone, i.e, if it receives no beacons. The problem rises when two devices were apart and consequently had chosen each their own cell ID. When they come closer, the devices should agree on a unique cell ID and drop one to form a unique network. It is possible to build such an agreement by comparing MAC timestamps in beacons. Unfortunaltely, this is often neglected by driver developers, leading to situations where devices in the same radio range remain in distinct cells forever, unable to communicate, or even worse, drivers crash.
It would be more convenient to fix the cell ID, in order to avoid any cell
splitting and complicated merging. The configuration user-level tools in Linux
(based on the cfg80211 subsystem) allow now the cell id to be fixed when
configuring the ad hoc mode (parameter fixed-freq of command iw). But
again, this parameter is simply ignored by many drivers.
Yet, we have successfully tested this option on Debian with Intel Wi-Fi chipsets on M.2 cards (driver iwlwifi) and with an (old) Ralink RT5370 dongle (driver rt2800usb).
By default, the network configured in DEMO-OPPNET is a Wi-Fi Ad hoc network with an ESSID set to CASAADHOC, without fixing the cell ID. This corresponds to the Wifi configuration named 'adhoc_casa' in the Webadmin application.
Alternatively you may choose the configuration named 'adhoc_fcell' that takes the same parameters as configuration 'adhoc_casa' but fixes the cell ID to CA:5A:CA:5A:CA:5A. Note that if your driver ignores cell ID fixing, this may worsen the situation by systematically setting a distinct cell ID for each device even if they are close.
Use the Webadmin app (tab Status) to check that the cell ID is the same on all the devices of your network (and not null). Restarting the demo (button 'Restart Demo') will force resetting the cell ID.
If none of the Ad hoc configurations gives satisfactory results, you may fall back to using a configuration based on a Wi-Fi Access point mode (aka managed mode).
Of course you will need for this a reachable Wi-Fi access point. Additionally, you should verify that this access point allows brodcasting and authorizes station to station IPv4 traffic (Some access points only intended to enable traffic to/from public Internet may block station to station transmissions.)
In Webadmin, you can create and apply a custom configuration based on an Access Point. You first create a 'New Wifi AP' that you name as you wish, indicating the SSID and the WPA key for your access point. Then you choose the configuration you've just created as the Wifi Active Mode and potentially as the Wifi Default Mode (for the the next times you will start DEMO-OPPNET).