Adding a 1s delay before sending ifconfig makes this test works reliably because it gives the softdevice enough time to get in a ready state.