I've used Apple's Network Link Conditioner to simulate a degraded network for my iOS device testing. But I'd like to set up some automated testing where a Mac's wifi hotspot is used as the mobile device-under-test's wifi connection. I'd like to be able to programmatically disable/enable the wifi network as well as disable/enable the networks upstream connection, perhaps under shell control. Any notion on how to achieve this?
On my MacBook, which has no built-in Ethernet, the following commands turns the Wi-Fi radio off and on:
sudo ifconfig en0 down
sudo ifconfig en0 up
If you enable Internet Connection Sharing you can use these commands to disable and enable Wi-Fi, and the backhaul interface as well, you'll just need to figure out which en device is which.
For finer grained control over the Wi-Fi radio check out the airport tool:
/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport
Related
I need to test my application on IPv6 network on iPhone. As far as I have learned, I have several options:
Share IPv6 Internet via iMac as described in this tutorial; though when I tried to follow the steps there on an MacBook Air connected by bluetooth to an iPhone with turned on 3G there was no "Create NAT64 Network" checkbox for step 7 - do I nessesarely need to be connected via cabel or I need a stationary iMac?
Configurate IPv6 wi-fi on a router; though as far as I have learned to do this I need some special router that supports IPv6 and my Internet provider should be able to give me IPv6 connection. Is this correct?
Are there other, maybe easier ways to simulate IPv6 on an iPhone? How do I tell router that supports IPv6 from the one that does not?
I know its a bit late, yet it might help someone. You can create an ipV6 network via step 1 described. The trick is, at the time of clicking on BluetoothPAN option, you should press the option(ALT) key in the keyboard. Then Create NAT64 Network checkbox will be displayed at the bottom. This is the same case for WIFI & Ethernet too
Is it possible to send an ASCII code on an external device through USB port using IOS API? I assume that it is possible through bluetooth connection, but I'm not sure through USB connector. Any thoughts?
I would appreciate if someone could put me in the right direction.
Thanking you in advance
That largely depends on the level of sophistication of this "external device". If this external device is just a bare metal embedded device without some sort of operating system you definitely need MFI.
Otherwise, you can run a usbmuxd server (e.g. on Raspberry PI with Linux) to establish a connection via USB. Usbmuxd is basically the technology that Apple uses to communicate between iOS devices and Desktop apps such as iTunes or Xcode. And yes, it is App Store compliant, e.g., Duet Display uses this approach to make an iPad a secondary display for your Desktop via USB.
There are several open source libraries that provide a high level API, e.g., PeerTalk or DarkLightning.
In order for adb to recognize my device LG G4 I needed to select USB tethering. With this setting on, I am unable to maintain a wifi connection. I am trying to do some testing with wifi and want to have access to the log.
I thought maybe I could use adb over wifi but I want to see logs for connecting and disconnecting to wifi, do once I disconnect from wifi I loose my log.
today a SmartEyrGlass arrived at the office and I am having trouble connecting it to the wifi to take pictures.
The manual just says:
Turn on wireless LAN on your smartphone.
And in the settings off the glass it only displays the MAC address of the device.
I looked online for a full manual, but I couldn't find any.
What do I need to do to take pictures?
It will automatically connect over wireless LAN when you start the Camera application.
For connection, initial pairing over bluetooth is enough. Device will switch to WLAN automatically when application needs it.
Start Camera and you will see it is starting to connect.
I just downloaded Wireshark on Windows 8.1, and when I try to capture packet it works just fine, just only for the current machine. I've "promiscuous mode" enabled, but nothing seems to happen? During the installation I installed WinPcap, and set it to run on boot. Is there any way to solve this? I've also tried to plug in a USB network adapter, without luck.
Wi-Fi network? Promiscuous mode generally doesn't work on those, especially on Windows; you need monitor mode, but, unfortunately, WinPcap doesn't support that, so Wireshark doesn't support it, either.
Switched wired network? Promiscuous mode isn't enough on a switched network; you need a "monitor port" or "SPAN port" or whatever the switch vendor calls it.