Wednesday, April 12, 2017

I Decided to (re)build a PC running Windows 98 SE


I don’t think I need to provide much motivation here, you’re likely either thinking “that’s a cool idea”, or you’re going to stop reading very soon.

There were a few factors for me personally:
  1. I stumbled across an article talking about how tough it was to build a Windows 98 PC in 2017
  2. I have an old PC (that was waiting to be recycled)
  3. I have a an old stack of PC games that work on Windows 98 (nostalgia)
  4. It’s been raining here for about 2 months straight

Why am I writing this?

This was a lot of fun and I thought others might be interested. I also wanted to document the process so I don’t need to do the research again if (when) the hard drive fails.

The PC

  • An ANTEC Aria micro-ATX case
  • A Shuttle 6in1 Card Reader
  • An ASRock K7S41GX motherboard with built in LAN, audio and video
  • An AMD Athlon XP 1600+ (1400Mhz)
  • A Sapphire branded ATI Radeon 9600XT video card
  • 1.5GB of 400Mhz DDR memory
  • An IDE DVD writer (I never removed it to check the brand or specs)
  • An 80 gig Maxtor IDE hard drive

Windows 98 SE Hardware Compatibility

The good news is, everything I had was Windows 98 compatible and drivers were (mostly) easy to find.

I learned and re-discovered a few things when checking compatibility. My best advice is to poke around if you have questions about hardware support. Below are a few notes I made along the way:


Windows 98 doesn’t make use of multicore CPUs. Apparently Core2Duo era CPUs will work but Windows will only use one of the cores. It appears that higher clocked Pentium IIIs, Pentium 4s and Athlon XPs are solid choices as long as you can find Windows 98 drivers for the motherboard.


Windows 98 SE technically supports up to 2 gigabytes of RAM (some claim 4) but many report it doesn’t work well above 512 megabytes. My system works with 1 gigabyte but not with 1.5. The internet suggests that if you’re running more than 512mb, you need to limit the Windows file cache by setting MaxFileCache in system.ini to less than 512mb.  

Video Cards

According to the internet, Windows 98 doesn’t work with video cards with more than 256mb of video memory.

NVidia supported Windows 98 until 2005 and the drivers are still available. Support goes as high as the GeForce 6000 series.

ATI also updated their Win98 drivers until 2005. The last compatible driver package supports the Radeon 9000 series of cards and has beta support for cards as high as the X850.

Hard drives

Windows 98 has a size limit of 128 gigabytes per partition when formatted to FAT32. The motherboard may have lower limits and/or require a bios update to support larger drives.

Sound Cards

Windows 98 supports a large range of ISA and PCI cards and I’m not going to try and list them all.
If you want to use a PCI Sound Blaster, the newest version with Windows 98 support is the Audigy 2 ZS.

For dos games, many of the Sound Blaster PCI cards up to the Audigy 1 provide Sound Blaster 16 emulation drivers that “should” under Windows 98. Apparently, millage may vary.

The Audigy 2 ZS does not come with DOS drivers or Sound Blaster 16 emulation.

If you’re looking for drivers for Creative Labs Sound Blasters, you’ll likely need the original installation CD. has a great collection of legacy drivers.

If you want to play DOS games, your best bet is to use an ISA sound card.

Installing Windows 98 SE

I have a handful of Windows 98 keys from old PC purchases but I didn’t have an installation disk. I was able to find and download a Windows 98 SE OEM image and burn it to a DVD (I knew I kept those for a reason).

Then I collected drivers for all of the components listed above.

Next, I checked the bios to ensure it would boot from the DVD drive and then dropped in the burned Windows 98 install disk.

The installation failed right away with an insufficient memory error. I reduced the installed memory from 1.5 to 1 gig and it seemed happy.

The installation then went pretty smoothly. The installer asked me if I wanted to replace the OS currently on the drive, and after about 20 minutes and a couple of reboots I was looking at the Windows 98 desktop.

It was time to install drivers, and I was quickly reminded that Windows 98 does not have USB mass storage support out of the box. After contemplating a few approaches I decided the easiest thing to do was burn the drivers to a DVD.

All of the drivers installed without issue. I was careful to reboot after each installation as prompted.

Time to install some games. After installing 2 or 3 I hit an out of disk space error - huh? I checked and yes, the drive was full and Windows was reporting my 80 gigabyte drive as 2.

The internet suggested repartitioning and reformatting. Fortunately, the Windows 98 install CD has an option to boot into DOS. From the dos prompt I used fdisk to delete and re-create the primary partition, and then used format to, well, reformat the drive. Note, that the version of format included with Windows 98 SE will not report the correct drive size when formatting but will work correctly.

And of course, I then needed to re-install Windows.

Once I was back up and running I checked the drive size, it somehow ended up at 47 gigabytes (should have been 80). I’m assuming it’s a bios setting but I wasn’t interested in trying to fix it and installing Windows a 3rd time.

I realized there were a few other Apps and utilities I needed to transfer to the PC. With poor judgement, I tried using Internet Explorer 6, which it turns out is basically useless today (and I’m sure incredibly unsafe to use).

I did install the USB drivers for my motherboard but it wouldn’t read my 8 gig USB drive. Rather than spend time diagnosing, I created a shared folder within Windows 98 so I could copy files over from my Windows 10 machine – it works like a charm. My security plan is to only connect the network cable to the Win98 PC when I’m actively transferring files.

Setting the BIOS on the K7S41GX

Arguably I should have done this before installing Windows. I noticed the bios was misreporting the clock speed of the Athlon 1600+. I opened the bios settings and discovered the front-side bus was set to 100Mhz instead of 133Mhz; easy fix. I also needed to bump up the memory speed from 266Mhz to 400. And I disabled any onboard components I wasn’t using including the parallel port and the on-board sound.

Soundcard Upgrade

My goal was to not spend money on this PC since I was very likely not going use it much. However, I was in the neighbourhood of Free Geek and they had a Sound Blaster Audigy 2 ZS for $10 - sold!

Free Geek Vancouver a fantastic non-profit organization that provides hands on training, technical support and low-cost refurbished computers to the local community.
Installing the drivers was pretty painless after downloading an image of the original installation CD from

Useful Windows 98 Apps

Auto-Patcher for Windows 98se  

This app applies all available patches, updates and fixes for Windows 98 SE and includes a copy of the very useful 7-Zip.


Very useful for opening disk images. Version 6 dropped Win98 support so the latest version that works is 5.9. I couldn’t find the old version on the official website so I downloaded it from


If you need to mount an ISO image, Magic Disk 2.7 works great in Windows 98 and it’s still available:


I was able to download and run the ANSI version of Notepad++ 5.9.2. Newer versions may work but you’ll need to download the zip package and run the version in the ANSI folder.

Deficiencies and Final Thoughts

The Antec case came with a Shuttle 6in1 card reader. I wasn’t able to find drivers so it’s not working.

The Audigy 2 ZS soundcard doesn’t provide any support for DOS which means I don’t get sound in
DOS games. Fortunately, I personally don’t have any cravings for these games and I can always use DosBox on a modern system if that changes.  

This project was really fun. There’s the obvious sense of nostalgia, the fun of re-using old hardware, and there was just enough challenge that it provided a sense of accomplishment.

Windows 98 SE has been stable so far; and with no background apps running, it’s quick.

This computer will likely only sit on my desk for a couple of weeks but I’m sure I’ll find a couple of friends willing to do some retro gaming before I put it away.


Monday, February 6, 2017

Debugging Xamarin.Android applications on an Acer Netbook

The Netbook

I have an old Acer Aspire One D255 (Atom CPU, 1024x768 display) that’s never really had a proper use. It was a salvaged machine from a relative which arrived needing a new battery and a new screen, followed shortly by a new hard-drive (I suspect it didn’t like being repeatedly dropped). And the little machine got bumped up to 2gig of ram (max capacity) simply because I had a spare stick.

It’s not great running Windows (ok terrible), so it got some use running live versions of Linux ( which worked fairly well. But at the end of the day, I’ve got better hardware for that purpose.

So what else can I try? – let’s see if I can get it running Android!

Android-x86 Project and Remix OS

My first stop was, which provides source code and compiled images for running Android on x86 hardware, and is a popular option for running Android on old PCs. But after a little bit of digging, I decided to try Remix OS It’s another free option for running Android on a PC. The founder of Android-x86 joined the team, which was reassuring, but the most attractive feature to me was the added mouse and keyboard support. The installation walkthrough and installer didn’t hurt either.

Installing Remix OS

Installation was well, easy. I downloaded the 32 bit installation package from within Windows 10, ran the provided installer and selected the 32gig installation option (I had plenty of drive space free).

Once the installer finished on the Windows side, I was prompted to reboot and the installation continued. This is where the re-partitioning and installation actually happens. And it took about 15 minutes on the little netbook.

After another reboot, Remix was added to the boot menu. After selecting it I got the Remix OS logo, and shortly after I was looking at a customized version of Android running on the Acer. Cool!

Android Debug Bridge

Now to deploy an Android application. The steps below require your Android device to be rooted, fortunately that’s done for us with Remix.

First, make sure both your development machine and your Android device are connected to the same Wi-Fi network.

Next, we need to enable adb connections over Wi-Fi in Android. And for that we’ll need the IP address. Open the Settings app, then select About –> Status and note the address.

Open a terminal; Remix OS includes a terminal app named Terminux. If you’re not using Remix you can download a terminal app from the Google Play Store.

Enter the following commands:
setprop service.adb.tcp.port 5555
stop adbd
start adbd
Your device is now ready to accept adb connections on port 5555.

Switch to your development machine and either open a command prompt if using Windows or a terminal on a Mac.
adb tcpip 5555
adb connect <ip address of Android device>
Note – adb.exe may not be in your path on Windows. If so, you’ll need to navigate to the Android SDK platform-tools folder.

With that done, my Acer appeared as selectable device/deployment target in Visual Studio 2015. And I could deploy and debug to it like any other connected Android device.

Final Thoughts

This was a fun project, and I was excited to try out Remix OS. The custom Windowing features and mouse and keyboard support are pretty fantastic. Unfortunately performance on the Acer wasn’t great and it locked up twice during testing. That plus the added hassle of manually connecting adb means it’s just not as useful as a consumer Android tablet for testing. A faster laptop might make a really interesting test device, especially with Remix OS’s ability to resize the window for running Android applications.

Saturday, March 14, 2015

How to use Classic Bluetooth on iOS

Something like classic Bluetooth sounds like it should be simple enough to use on iOS. I recently falsely stated is was all there and ready to go in the Core Bluetooth APIs. Although Bluetooth LE is fully accessible, classic Bluetooth is not. But there are a few options developers can explore if they need to use Classic Bluetooth within an application.

The first thing to note is, pairing with a Classic Bluetooth device is handled at the OS level, so there isn’t any way we can start the connection or pairing process from within an app.

So assuming a device is already paired, we have a few options:


External Accessory Framework

The External Accessory Framework is used to communicate with devices that are Apple MFi certified. MFi stands for “Made For i(phone/pad/pod)”. These devices can be physically connected, or connected over Bluetooth. If your device is MFi certified, this is the way to go.

As developers, you’re not required to join the MFi Program, that’s only necessary if you intend to develop hardware.

And of course, the External Accessory Framework APIs will not work with non-MFi devices.


Bluetooth Manager Framework

The Bluetooth Manager Framework sounds like the perfect solution to communicate with non-MFi Bluetooth Devices. Unfortunately, it’s a private API, meaning if you want to get your app published on the App Store, it can’t be used.

However, it can do things like scan for local devices, manage connections, and communicate with paired devices. Because it’s a private API, you won’t find any official Apple documentation but a quick Google search should get you going. There’s a good Objective-C tutorial here:



If you’re looking to connect two iOS devices, GameKit has a straight forward solution. It’s a simple matter of starting up GameKit, searching for local devices, connect, and then send/receive data. However, this is only for iOS device-to-device communication:



If you’re willing to Jailbreak your device and write applications that will never make it onto the App Store, you can make use of BTstack. The packages are available on Cydia. I’ve personally never used it but you can find more information here:


Bluetooth 4.0

And finally, if your hardware is Bluetooth 4.0 compatible, you should probably consider moving away from Bluetooth Classic and using Bluetooth LE. Although BLE supports “casual” connections, it can also pair devices and establish secure connections.

This is also the path that Apple recommends, it’s well documented, stable on devices made in the last 2-3 years (iPhone 5 and up, iPad 3 and up), and fully defined in the CoreBluetooth APIs:

Monday, March 2, 2015

Using the Dell Venue 8-7000 for Android Development



I’ve been lucky enough to get my hands on a shiny new Dell Venue 8-7000 - and it’s a fantastic tablet. I’m slightly sad to say it’s going to be replacing my trusty Lenovo S8-50 tab. It’s been a fantastic device but you just can’t argue with the extra performance, or the 2560x1600 screen on the Dell. But this isn’t meant to be a review or a comparison. If you’re looking for a quick opinion, I’d absolutely recommend either tablet. The Venue 8-7000 is a beautiful high-end device, and the Lenovo S8-50 is shockingly good at its price point.

But the point of this post is to get to work (developing) on the Dell Venue 8-7000. Something that surprisingly doesn’t work “out of the box” on Windows.


The Problem? Drivers

To use an Android device for debugging on Windows, you need to have the correct drivers installed.  For Nexus devices, you can simply download the “Google USB Driver” via the Android SDK manager. And occasionally, such as with most Samsung Android devices, you need to download drivers directly from the developer’s website.

Unfortunately the Google USB Drivers don’t work, and when searching Dell’s website for drivers or downloads, there aren’t any.



The Fix? Hack the Google Drivers

Before I go on, there is a warning. You’ll need to configure your Windows system to allow unsigned drivers to be installed. This is because the checksum for the driver is no longer going to be correct after we edit it. I’m not going to cover that here, but a simple Google search will take you through the steps if you’re running Windows 8.1.

Step 1 – obtain a copy of the Google USB Drivers

If you’ve downloaded them already using the SDK manager, simply navigate to your installed location. If you’re a Xamarin developer it’s typically c:\Users\[user name]\AppData\Local\Android\android-sdk\extras\google\usb_driver. Remember that the “Local” folder is hidden by default.

Alternatively, you can download the driver directly from here:

Copy this folder to another location since we’re going to modify it.


Step 2 – Enable Developer Options and USB Debugging

  1. Open Settings on the Venue 8
  2. Scroll to the bottom and click “About tablet”
  3. Tap on the Build number 7 times (to enable the Developer options)
  4. Go back one screen to Settings – you should now see “Developer options” above “About tablet”
  5. Open Developer options and check “USB Debugging”  
Step 3 – Configure the Dell Venue 8-7000
  1. Open Settings
  2. Select “Storage”
  3. Tap on the context menu in the upper right corner (three vertical dots)
  4. Select “USB computer connection” (it’s likely the only option
  5. Change the “CONNECT AS” option to “Camera (PTP)”
Step 4 – Get your Dell Venue 8’s device IDs
  1. Plug in your Dell Tablet to your Windows PC
  2. Open the Control Panel
  3. Open the Device Manager
  4. Expand “Other devices” and select “Android”
  5. On the Details tab, change the property to Hardware Ids and save them both
  6. Repeat steps 4 & 5 for the “MTP” entry under “Other devices” and save/record the IDs




Step 5 – Modify the USB Drivers

  1. Open the location of your saved drivers
  2. Open “android_winusb.inf” with your favourite text editor
  3. Find the [Google.NTx86] section
  4. Add the two “Android” ids as %CompositeAdbInterface% entries
  5. Add the “MTP” ids as %SingleBootLoaderInterface% and %SingleAdbInterface%
  6. Scroll down to the [Google.NTamd64] and add the same four entries
  7. Save the inf file

It should look something like this:

;Dell Venue 8 7840
%CompositeAdbInterface% = USB_Install, USB\VID_8087&PID_0A5D&REV_FFFF
%CompositeAdbInterface% = USB_Install, USB\VID_8087&PID_0A5D
%SingleBootLoaderInterface% = USB_Install, USB\VID_413C&PID_B14D&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_413C&PID_B14D&REV_FFFF&MI_01

Step 6 – Update the Drivers

  1. Open the Device Manager again on your PC with Tablet plugged in
  2. Right-click on the “Android” entry under “Other devices” and select “Update Driver Software”
  3. Browse to your modified driver and install
  4. Repeat for the “MDP” entry

*Remember – you must be able to install unsigned drivers


Step 7 – Run and Debug apps on your new tablet

You’ll now see two new entries in the device manager. Under “Portable Devices” you should see something like “Venue 8 7840” (the specific number will vary based on the model). You’ll also see an “Android ADB interface” entry, on my system it’s listed under “SAMSUNG Android Phone”.


If everything worked you should be ready to develop! My Venue 8-7000 is showing up correctly in Visual Studio 2013, Xamarin Studio for Windows, and Android Studio. 


Monday, February 9, 2015

Android SDK Manager Setup for Xamarin.Android and Xamarin Forms Development

Setting up the Android the SDK can be a bit overwhelming if you’re new to Android development. Especially compared to other mobile platforms like Windows Phone and iOS, where you just install the latest versions and start developing.
My Goal with this article is to clarify the purpose of the installable packages in the SDK manager as well as give you some guidance as to what you should install when developing Xamarin Apps.
If you don't want to read through all of the details, jump to the bottom to view my configuration.
More info:



The Xamarin installer will download and install all of the tooling you need to develop Xamarin.Android applications. And this includes the SDK Manager. You shouldn’t need to install the Android SDKs manually, but if you do you can check out Android’s documentation here:


How to Launch the SDK Manager

As Xamarin developers, the easiest way to open to Android SDK Manager is through your favorite IDE. Both Visual Studio and Xamarin Studio have launch points in their menus.
In Visual Studio, click on “Tools -> Android -> Android SDK Manager …”
In Xamarin Studio, click “Tools -> Open Android SDK Manager …”


Android SDK Manager Packages

The Android SDK Manager allows you to select which packages you want to install. I’ll discuss each option, working from the top to the bottom, and give you recommendations for what to install.



Let’s start in the Tools section.


Android SDK Tools

The first option you’ll see is the Android SDK Tools. These are the development and debugging tools for the Android SDK and you’ll need these installed in order to compile Xamarin.Android Applications. Install this and keep it up to date.
Recommendation: must install
More info:


Android SDK Platform-tools

The Platform tools contain additional tools for connecting to devices and emulators to deploy builds and debug applications. You should always have the latest version of the platform tools to ensure compatibility with the latest version of the Android APIs; so keep this up to date as well.
Recommendation: must install


Android SDK Build-tools

The Build Tools are required for actually building/compiling your source code into an application that can be run on the Android platform. You should AWLAYS install the latest version which will be used by default during compilation. If your project depends on an older version, the SDK Manager allows you to install and maintain separate versions. In my experience this is rarely necessary and I only install the latest version.
Recommendation: install latest version only
More info:


Android APIs

After the Tools section you’ll see sections for each Android API. Typically when a new version of the Android operating system is released, Google also updates the APIs which allow you to develop with the latest features and fixes. You’ll see the Android version listed (i.e. 5.0.1) along with the API level (API 21). There are a lot of options here, let’s look at each one and then discuss which version(s) of the API to install.


Documentation for Android SDK

There is documentation for each API level and this is written for Java Android developers. It can be installed but it’s not often used by Xamarin developers, and it’s not required.
Recommendation: don’t install


SDK Platform

The SDK Platform for a given API level allows you to compile against that version of Android. Newer platforms require newer versions of the SDK Platform-tools and SDK Tools (mentioned above) which is why we need to keep those up to date.
Recommendation: must install


Samples for SDK

These are Java samples included with each API level. These are not required and Xamarin developers don’t typically use these, but they can be examined and ported to C#.
Recommendation: don’t install unless you have a specific use or lots of storage space


System Images

These are system images that can be used with Android virtual devices. On later API levels, both ARM and x86 images are included. The x86 images will run significantly faster and should be preferred over the ARM equivalents. The images prefixed with “Google APIs” include the Google Play Services runtime and are useful for testing Google Play Services features such as mapping. These versions are recommended over the “plain” versions. Note – the System Images take up a significant amount of disk space so you should only install them if you’re using them.
Recommendation: don’t install if you’re using the Xamarin Android Player or Genymotion. Otherwise, install x86 Google API images as needed.


Google APIs

Most API levels include a package called Google APIs. This includes additional documentation, samples and libraries for the Google APIs for that version of Android for Java developers. These libraries are not needed if you’re using Xamarin even if coding against the Google APIs.
Recommendation: don’t install


Sources for Android SDK

For some API levels Google has released the source code. Unless you’re specifically interested in viewing the source code for the Android SDK, I wouldn’t recommend installing it, and it’s not needed for application development.
Recommendation: don’t install


*API Levels

Now that we understand what the individual pieces do, you’re probably asking, “which API levels do I install?”. In an ideal world you would just install the latest version, since you can still target older versions of Android with the latest SDK. However, APIs do change between versions and with that, you may find example code or example projects that are designed for, and targeting older versions. The good news is, each SDK Platform only uses about 100 megabytes of space. So for simplicity, you can safely install every SDK Platform (which will consumes ~2GB of space).
Recommendation: install each SDK Platform from API level 14 to the latest. If space allows, install every SDK Platform.



Our final section is Extras. The packages in this section include extra functionality and tools you can optionally use during development. I won’t cover all the packages, just the ones I recommend you install.


Android Support Library

The Android Support Library is a package that provides backwards compatibility for new API features on older devices. Additionally, Google releases some features and controls that are ONLY available in the support libraries. It’s considered “best practice” to use the Support Libraries for some features during development.
Recommendation: highly recommended to install
More info:


Google Play Services

The Google Play Services provide APIs to develop using extra Android features created by Google, this includes technologies such as Google Maps and Google+. Note – devices must have the Google Play Services Runtime installed to use these additional APIs. Almost all new Android devices include the runtime - notable exclusions include the Kindle Fire devices. Generally, Android emulators don’t include the Google Play Services runtime by default but it can be installed separately.
Recommendation: highly recommended to install
More info:


Google USB Driver

The Google USB Driver enables USB debugging for most Android devices from Windows. Note - for some devices, you may need to install device specific drivers provided by the manufacturer. USB debugging is somewhat inconsistent on Windows 8.x, it can be unreliable to connect and some devices tend to work more reliably than others (ie Nexus). The driver isn’t used on OSX.
Recommendation: install if using Windows


Quick Reference

If you don’t want to read all of the above – take a look at the image below to view my (Windows) configuration:

Saturday, January 24, 2015

How to update the Firmware on the RedBear BLE Mini


RedBear Labs has built a fantastic small profile, low cost, Bluetooth Low Energy board which is perfect for prototyping or hobby IoT projects:

From their website:

You can now incorporate Bluetooth 4.0 Low Energy (BLE) technology easily in your project with our BLE Mini. BLE Mini requires only a serial port for communication so it supports all major development platforms that have UART interface including Arduino, Raspberry Pi, Netduino, BeagleBone etc. In addition, we provide you with access to all Ti's CC2540 I/O pins and the ability to upload firmware via USB, making the BLE Mini an ideal development/prototyping board for your BLE project/accessory/Appcessory.

To get the most out of the BLE Mini you’re probably going to want to install the latest firmware.  It turns out it’s a fairly straight forward process, but there are a few things worth noting.

1st – Download the latest Firmware

You can download the latest firmware from GitHub here:

For the BLE Mini we’re looking for a file labelled “Biscuit-UART-xxxxxxxx.bin”.  At the time of writing it’s “Biscuit-UART_20140409.bin” which was built in April, 2014.

2nd – Find a Windows 7 PC

Unfortunately the firmware update cannot be updated from Windows 8/8.1.  In the RedBear forums it states it should work from a Windows 7 Virtual Machine.  However, I tried it from within a VMWare Player Windows 7 VM, and although I was able to reach the BLE Mini, I wasn’t able to update the firmware.

Fortunately I still have my trusty little Acer 1810T running Windows 7, which I used to update the firmware.

3rd – Connect the BLE Mini to the Win7 PC

There’s one small black button on the top the BLE Mini, close to the Micro USB port.  Hold this down while  connecting your Mini via a regular USB Micro cable.

The first time you connect the BLE Mini this way, Windows will probably need to search for drivers.  Once you see the “Installing device driver software” popup in the system tray, leave the BLE Mini connected but you can let go of the button.


Once it’s installed you’re ready to move on, and you should see a new disk in the file explorer with a capacity of 240 KB.


4th – Update the Firmware

Now it’s simply a matter of removing the old .bin file and copying in the new one.  You may want to back up the old version “just in case”.

Just be warned, when I updated my two BLE Minis, they both rebooted after every file operation.  And I needed to repeat the process of holding down the button and reconnecting the BLE Mini to continue.  Otherwise it was a smooth and simple process. 

Again just replace the old .bin file with the new one, no need to rename the file, etc.


5th – Test it Out

Disconnect the BLE Mini and then reconnect it to a power source (without holding the button).  If the green light comes on you should be all set.  RedBear also has free iOS and Android BLE Controller Apps you can use to test functionality. 

The behaviour of the new firmware seems to be basically the same, with improved stability and connectivity, but the broadcast name has been changed from “Biscuit” to “BLE Mini”.  All of the services and characteristic GUIDs should be the same.

Now If something goes horribly wrong, there are instructions for resetting and reformatting the BLE Mini in the RedBear Labs forums:

If you’re not sure where to go next, I have some sample code to connect to the BLE Mini from Windows Phone 8.1 here:

And here’s an article introducing BLE communication between a similar BLE board from Seeed Studios using Android: 

And finally, when you’re ready for a bigger task, check out the Monkey Robotics project.  It has a ton of great code including a walkthrough to build a BLE controlled car using the RedBear BLE Mini, and connecting from a Xamarin Forms project:


Tuesday, January 13, 2015

Open the Settings app Programmatically from Xamarin iOS


When Apple released iOS 8, it came with a massive API update.  They released a number of new frameworks and over 4000 new APIs.  So needless to say, I’m still discovering new toys and tricks that released with the latest version.

A really cool feature included in iOS 8 is the ability to launch the built in settings app from within our applications; something we haven’t been able to do since iOS 5 (and was removed again in iOS 5.1).

This is useful for multiple reasons.  First, you can add app preferences and expose them through the settings app: 

However, this isn’t all that common, primarily because it required the user to leave your app and search through the Settings app.

But it also means we have quick way to push users to toggle things like permission to use location data.

Fortunately it’s also fairly easy to do, we simply need to create and open a NSUrl with the correct string: {app-settings:}.  And this is conveniently available as a static property on the UIApplication class.

Do note, this only works in iOS8 so if you’re app is compatible with older versions of iOS, you should check you’re running on iOS8 first; this will cause an exception on older versions.

if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
var settingsString
= UIKit.UIApplication.OpenSettingsUrlString;
var url
= new NSUrl (settingsString);
UIApplication.SharedApplication.OpenUrl (url);