Monthly Archives

June 2018

iOS USB Data Transfer in a DIL Environment With Xamarin

By Development, Mobile, XamarinNo Comments

Transferring data across mobile devices can be a daunting problem when those devices are in a DIL (Disconnected, Intermittent, Low bandwidth) environment where you do not want your device to transmit signals that could be detected. For small data packages it may make sense to use QR codes to transfer data across devices that are not connected. However; this type of solution is not scalable if you have large packets of data that need to be transferred. For larger amounts of data a laptop could be used as an intermediary between two devices. With an Android device the simplest way to do this would be to program the app on the device to dump the data to be transferred in an external file located in “My Files.” The Android device could then be plugged into a laptop where the device would be seen as an external mass storage device and the data could easily be retrieved and then transferred to another Android device. Unfortunately it is not this simple with iOS.

Communicating With an iOS Application through USB

The iOS mobile operating system limits the way in which Apple mobile devices (and therefore the applications on those devices) can communicate via the physical USB/Lightning connection. The typical portal through which data is transferred via a USB connection from a computer to an iOS mobile device (and vice-versa) is through the iTunes desktop application. The iTunes application accomplishes this by connecting to the iOS device through usbmuxd. When the iTunes application is installed on a computer, a utility called usbmuxd (USB Multiplexing Daemon) is installed along with it. usbmuxd is a socket daemon that is started on Mac OSX by launchd (see /System/Library/LaunchDaemons/com.apple.usbmuxd.plist). It creates a listening UNIX Domain Socket at /var/run/usbmuxd. On Windows the service that hosts this program is named “Apple Mobile Device Service,” and can be seen in services.msc.

Can usbmuxd Be Leveraged By Third Party Apps?

usbmuxd is a socket daemon that listens for iOS device connections to a computer through its USB ports. When the usbmuxd detects an iOS device running in normal mode (as opposed to recovery mode) it will connect to it and then start relaying requests that it receives via /var/run/usbmuxd. This is the only way to connect directly to an iOS mobile device through a USB connection. This means if you want to create a direct line of  communication through USB between a desktop application and a mobile application, that connection must be made through usbmuxd. In order to establish this socket connection through usbmuxd some code needs to be implemented in both the desktop app and the mobile app. The sample code below was written by Carlos Rodriguez in his blog article “Communicating with your iOS app over USB (C# and/or Xamarin).”

How To Create a Connection Using usbmuxd

First the NuGet package iMobileDevice.Net needs to be added to the desktop application project. Here is some sample code using that package to listen for a usbmux “AddDevice” event:


Below, the Connect method gets a “DeviceHandle” reference using the UDID of the connected device. Once it gets that handle, it calls the “ReceiveDataFromDevice” method:

And finally, the below line sends data to the iOS device.


The iOS application would have to implement some code like the following in order to ‘listen’ for an incoming connection on port 5050 (an arbitrarily chosen number that matches the port number in the desktop app code).

Once the above code has been executed a connection that resembles something like a TCP network connection will be established between the MCC Utilities desktop app and the Communication Component inside the app on the iOS mobile device.

Conclusion

It is possible to create a direct connection between an iOS mobile application and a desktop application through USB by leveraging the usbmuxd socket daemon. Data can then be communicated back and forth through this connection in order to accomplish the prescribed data sync between the two applications. This connection will have been established through the usbmuxd socket daemon. This solution can be used to transfer data between iOS devices in a DIL environment with the desktop app as the intermediary.

How I Passed Scrum.org Scrum Master Certification

By Agile, DevelopmentNo Comments

Work in progress as of 3 June 2018… please don’t judge yet

Bother to become scrum certified with scrum.org? First and foremost, I believe in self reliance and not needing to go through “a course”.  Secondly, going through a certification process forces you to get uncomfortable and challenge what you know.  If you aren’t familiar with scrum.org vs scrum alliance, please check out our previous article to see why I chose scrum.org.

I have been through training years ago and ran several projects with ease.  I sat down and took this assessment after spending $150.

My Results

Name PSM I
Description Professional Scrum Master I Assessment

Thank you for taking the PSM I Assessment. We regret that you did not receive the minimum passing score of 85%. An e-mail contining your score will be sent to you.

Your result has been recorded and you can safely close your browser or return to Scrum.org by clicking the button below.

Scrum on, Ken Schwaber

Score NOT PASSED
57 points scored (or 71.3%) out of 80 maximum points

(a score of 85.0% or greater is needed to pass this test)

From Failure To Success

As a minor perfectionist, my first reaction was to go through the normal steps of failing.  Blame, sadness, self loathing, angry, and then acceptance.  This cycle took about 2 minutes and now I have to solve it.  But what is the best way to do that?  Read.

All Hail Chandini Paterson!

I have never met Chandini Paterson per se, but I loved one of his posts where he outlined what he studied to pass the certification test in a community forum.  I am going to outline those steps and put some time to them.  His study technique was as follows:

– Reading the Scrum Guide and understanding the concepts
– Taking the Scrum Open assessments.

Time Boxing Prep Work – The Plan

One of the most important things you can do is put a plan in place to execute.  Following the book “Deep Work”, am going to block off every morning for 90 minutes a day starting at 5am.  In 2 weeks time, I should be able to get in 10×1.5 minutes = 15 hours of prep time.  This seems a little extreme, but getting this certification would make that all the more worthwhile. The other options is to spend 4 hours commuting back and forth over two 9 hour days for a total of 22 hours.

The Scrum Guide

You can download it from either Bytelion or Scrum.org.

Total Pages = 19.  Total read time = ?