How to debug MAC OSX utun driver/routing decisions? - ichat

I want to debug why video/audio of iChat/jabber is sent from the physical interface and not from utun0 interface. How to debug MAC OSX utun driver or routing decision?

I'd use tcpdump -- try dumping the default route interface and the utun interface and see which one shows packets.

Related

Mac OS X 10.x Network Service Notification

Using Mac os x 10.13 the network preferences pane shows status of network services (eg Wi-Fi and/or Ethernet) being connected or not. If I change the service status, say by turning Wi-Fi off or on, or disconnecting/connecting ethernet cable then the Preferences Pane reflects this change immediately which implies that it is getting some notification of the network service changes.
How can I accomplish receiving these types of notifications in my Swift program?
I know that I can create a timer object to periodically check the status using the NetworkSetup app process commands and this works fine, but I wish to be notified when the changes occur.
never mind; it looks like this is do-able using the SystemConfiguration framework

Can I get debug information on USB?

Currently I am working on Yocto OS for my project. My question regarding debugging. In normal practice, the debug information is sent through the serial port. I aware about ssh debug. I have two questions:
Why does every device normally support debugging over serial port?
Is there any possible way to debug through the USB port (without using serial to USB converter) in Yocto?
Because a serial driver can be simple and implemented without interrupts (it’s how the Linux kernel console actually does). This is a requirement due to emergency cases when crash log should be sent as much as possible and as full as possible.
You have a few options:
a) use a USB-2-Serial and /dev/ttyUSB0, or
b) use a USB-2-Ethernet and setup netconsole, or
c) (only on the newest xHCI hardware with debug capability and with additional code to write) you may enable earlyprintk for USB. Note, it requires special debug cable to be connected (note, the blue colored is not the same, you need the orange one), or
d) USB2 (EHCI), which supports debug capability, requires a special device to be connected in between, which is not needed for USB3 (see option c) above).
Variant c) is partially supported in the v4.13-rc1 Linux kernel, there is HOWTO file (in the kernel source tree Documentation/driver-api/usb/usb3-debug-port.rst).

WWAN Interface AT Commands

I've got a Windows 8 Professional device which has got a Mobile Broadband adapter embedded and I need to be able to send AT commands to the modem, usually I'd connect to the COM port and send the commands. However the device doesn't appear to have any COM ports, instead it presents its self as a network adapter.
I'm wanting to send AT commands to change the APN of the modem and to reset the device, I've looked into the 'netsh mbn add profile' but this command always returns an error advising that the XML profile is incorrect.
Also from looking at the functions of the netsh mbn it doesn't seem to provide as much control as sending AT commands.
The modem that I'm trying to interface to is the Ericsson C5621 GW on a Lenovo ThinkPad Tablet 2.
Is there another way to send AT commands?
Thanks
I do not know this product in particular, but since I worked in Ericsson, later in ST-Ericsson with mobile phone development for over a decade it is doomed to have some of my code in it so I'll answer on a general basis.
Short version is, no unless the device exposes a serial interface over one of the external interfaces (possible interface types are RS-232, IrDA, Bluetooth, USB or CAIF), there is no way of sending AT commands to it1.
Being an embedded device in a laptop and
your since you say it seems to be without serial interfaces I assume it uses CAIF (commonly used in embedded settings. It could also have be using USB with the serial interfaces disabled, but since this press release mentions that it will be available in a version with PCI interface, that is very unlikely). And thus unless the device is set up with any active VEI channels, there is no ways in for AT commands.
There might be other ways of changing the APN though.
1 We had a debug mechanism to inject AT commands onto arbitrary serial interfaces, but this itself was running on a serial interface, started by an AT command. And besides it will not be present in released products.

Testing tool for TCP/IP communication

I am creating an iPad app, which has to communicate with a WiFi enable device using TCP/IP protocol. I have the API sets of the device for communication. Now what i want is i would like to see whether the device is responding to the requests send via TCP/IP. Please suggest a good tool for MAC OS, where i can simulate the WiFi communication and get the response messages from the device.
Thanking you guys in advance
I have just started to use MAC OSX recently and I also have the same question as yours.
Luckily I have found a good tool that you can try:
https://packetsender.com/
It's multiplatform, support both TCP and UDP client/server.
If I get your question you may use telnet. With telnet you can establish a TCP connection with the device and communicate with it, sending and receiving messages.

Sending a Message from a iPhone to a Mac

How would I send a message to an App on my mac (which I develop) from my iPhone via WiFi?
This message would then make something happen in the Mac App.
This is just a fun app for myself so it doesn't need any security like SSL.
I'd recommend looking into a tutorial on Bonjour.
http://www.mobileorchard.com/tutorial-networking-and-bonjour-on-iphone/
http://www.macresearch.org/cocoa-scientists-part-xxviii-bonjour-and-how-do-you-do
Use TCP to create a connection. Here's a tutorial: http://dev.im.ethz.ch/wiki/Socket_communication_on_the_iPhone
But TCP is extremely common protocol, so on the Mac side you can probably just read up on TCP sockets and be fine.