Is it possible to connect to multiple mobile devices non-wireless and run tests Is it possible to connect from computer to multiple mobile devices via USB and run tests on mobile devices while they (devices) are connected to Wireless network of another device.?

Scenario: We have some proprietary devices that have their own WiFi radio signal. We need to connect mobile devices to that signal. Then, we need to connect to that mobile device at the same time and inject tests. I've added a diagram to explain our need. Is it possible? 

Any help/ pointers would be appreciated!!
Yes it is possible . 
If your devices are android you can simply use scripts including adb commands

Steps :


GEt Device ID : 
adb devices
Pass adb command :
adb -s $device_id shell am start -a android.settings.AIRPLANE_MODE_SETTINGS


Sample Script :
You can take device id as command line parameter 

      for($i=1; $i&lt;=$temp;$i++)
      {
      print "\n********* Opening activities : **********\n";
      system("adb -s $devices shell am start -a android.settings.AIRPLANE_MODE_SETTINGS");
      sleep 5;
      system("adb -s $devices shell input tap 200 200");
      sleep 25;
      }