How can I capture packets while using Wi-Fi or a hub?

I encountered a problem during the development process. I want to enable the rvi0 capture interface using the rvictl command in the terminal while debugging over Wi-Fi in Xcode, but there is no response.

Then I tried a different method by connecting the iPhone to a hub. At this point, I can see the device normally in both Xcode and the console, but I still cannot use the rvictl command.

How can I capture packets while using Wi-Fi or a hub?

If you connect your iPhone to your Mac via a USB cable, does RVI work?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

It’s better if you reply as a reply, rather than in the comments. See Quinn’s Top Ten DevForums Tips for this tip and more.

However, for some reasons, I need to use the iPhone's Type-C port to connect to other peripherals.

OK. I need to check something here and then I’ll get back to you.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I need to check something here

What I wanted to check is whether RVI is supposed to work over Wi-Fi. That’s because I see the same behaviour you do — it works over USB but not Wi-Fi — and I wasn’t sure whether it was a bug or not. So I asked the RVI folks about this and they confirmed that this is not expected to work.

Normally I’d suggest using a USB hub for this but:

Then I tried a different method by connecting the iPhone to a hub.

So, just to confirm, you’re talking about a USB hub here, right?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

So, just to confirm, you’re talking about a USB hub here, right?

-- Thank you for your patient answers. Yes, it is a USB hub that allows multiple devices to be connected to a single Type-C port.
My connection method is: Peripheral ------ iPhone ------ Mac.
With this setup, I can confirm that the peripheral is working properly, and I can manage the iPhone in Xcode without any issues. I can also use Console for debugging.
However, I still cannot enable RVI. Is there a way to enable RVI in this topology?

Yes, it is a USB hub that allows multiple devices to be connected to a single Type-C port.

Hmmm, I would’ve thought that’d work. Before I did deeper I want to clarify this:

My connection method is: Peripheral ------ iPhone ------ Mac.

So where does the hub fit into that diagram, something like this?

accessory -- USB hub -- Mac
                |
                |
              iPhone

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

So where does the hub fit into that diagram, something like this?


Yes, that's how it's connected. The main connection port of the hub is connected to the iPhone (I tried connecting the main port to the Mac, but at that point, the iPhone couldn't correctly recognize the accessory). I also tried to verify whether the order of inserting the devices affects the RVI startup results, but no matter which hardware the hub is connected to first, RVI ultimately fails to start.

Yes, that's how it's connected.

OK, thanks for confirming.

I don’t have a modern USB hub to test this with, but I ran this past the RVI folks and they tried it with a USB hub and it’s working for them.

Are you able to try with a different USB hub? My experience with USB hubs is that sometimes they just behave weirdly.

If you continue to have problems, I’d like to clarify what actually happens when you try to enable RVI. Does rvictl -s spit out an error? Or does that work and then tcpdump fails?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How can I capture packets while using Wi-Fi or a hub?
 
 
Q