diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..6c635c0
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="gen"/>
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+	<classpathentry kind="output" path="bin/classes"/>
+</classpath>
diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 0000000..cd8b547
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1,8 @@
+gen
+bin
+doc
+libs
+assets
+.settings
+secure.properties
+
diff --git a/.gitignore b/.gitignore
index d3f5d3e..ae0d9e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,8 @@
 
 # Local configuration file (sdk path, etc)
 local.properties
+# and the not safe to be released part
+secure.properties
+
+# CVS files
+CVS/
diff --git a/.project b/.project
new file mode 100644
index 0000000..8198719
--- /dev/null
+++ b/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>AntHalService</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..2169f06
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,40 @@
+#
+# ANT Stack
+#
+# Copyright 2011 Dynastream Innovations
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+ifneq ($(BOARD_ANT_WIRELESS_DEVICE),)
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+#
+# ANT java system service
+#
+
+LOCAL_SRC_FILES := \
+    $(call all-java-files-under, src) \
+    src/com/dsi/ant/server/IAntHal.aidl \
+    src/com/dsi/ant/server/IAntHalCallback.aidl
+
+LOCAL_REQUIRED_MODULES := libantradio
+LOCAL_PROGUARD_FLAG_FILES := proguard.flags
+LOCAL_CERTIFICATE := platform
+LOCAL_MODULE_TAGS := optional
+LOCAL_PACKAGE_NAME := AntHalService
+
+include $(BUILD_PACKAGE)
+
+endif # BOARD_ANT_WIRELESS_DEVICE defined
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100644
index 0000000..11ac0e2
--- /dev/null
+++ b/AndroidManifest.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2011 Dynastream Innovations Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.dsi.ant.server"
+    android:versionName="1.3.2"
+    android:versionCode="010302"
+    android:sharedUserId="android.uid.system">
+    
+    <application android:icon="@drawable/icon" 
+        android:label="@string/app_name"
+        android:process="system"
+        android:permission="com.dsi.ant.permission.ANTRADIO" >
+        
+        <service android:exported="true" android:name=".AntService">
+            <intent-filter>
+                <action android:name="com.dsi.ant.server.IAntHal" />
+                <action android:name="com.dsi.ant.intent.request.SERVICE_INFO" />
+            </intent-filter>
+            
+            <meta-data android:name="ANT_AdapterType"
+                android:value="built-in"
+                />
+        </service>
+        
+        <receiver android:name="com.dsi.ant.server.startup.BootCompletedReceiver" 
+            android:enabled="true" 
+            android:exported="false"
+            android:label="BootCompletedReceiver">
+            <intent-filter>
+                <action android:name="android.intent.action.BOOT_COMPLETED" />
+            </intent-filter>
+        </receiver>
+        
+    </application>
+
+    <!-- These permissions should be defined in the system -->
+    <permission android:name="com.dsi.ant.permission.ANT"
+        android:protectionLevel="dangerous"
+        android:permissionGroup="android.permission-group.NETWORK"
+        android:description="@string/permdesc_ant"
+        android:label="@string/permlab_ant"/>
+
+    <permission android:name="com.dsi.ant.permission.ANT_ADMIN"
+        android:protectionLevel="dangerous"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:description="@string/permdesc_antAdmin"
+        android:label="@string/permlab_antAdmin"/>
+
+    <permission android:name="com.dsi.ant.permission.ANTRADIO"
+        android:protectionLevel="dangerous"
+        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+        android:description="@string/permdesc_antradio"
+        android:label="@string/permlab_antradio"/>
+
+    <uses-sdk android:minSdkVersion="7" />
+
+    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+</manifest> 
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..0dafa6b
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,5 @@
+ANT Android System Package
+Copyright 2009-2012 Dynastream Innovations
+
+This product includes software developed at
+Dynastream Innovations (http://www.dynastream.com/).
\ No newline at end of file
diff --git a/proguard.flags b/proguard.flags
new file mode 100644
index 0000000..965f85d
--- /dev/null
+++ b/proguard.flags
@@ -0,0 +1,31 @@
+###############################################################################
+#
+# ANT Stack
+#
+# Copyright 2011 Dynastream Innovations
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+###############################################################################
+
+-keep class com.dsi.ant.server.IAntHal
+
+-keep class com.dsi.ant.core.JAntJava {
+    void nativeCb_AntRxMessage(byte[]);
+    void nativeCb_AntStateChange(int);
+}
+
+-assumenosideeffects class android.util.Log {
+    public static int v(...);
+    public static int d(...);
+}
diff --git a/project.properties b/project.properties
new file mode 100644
index 0000000..5a70945
--- /dev/null
+++ b/project.properties
@@ -0,0 +1,11 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-7
diff --git a/res/drawable/icon.png b/res/drawable/icon.png
new file mode 100644
index 0000000..4bd12b3
--- /dev/null
+++ b/res/drawable/icon.png
Binary files differ
diff --git a/res/values/strings.xml b/res/values/strings.xml
new file mode 100644
index 0000000..c07c1c1
--- /dev/null
+++ b/res/values/strings.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+ ANT Stack
+ 
+ Copyright 2011 Dynastream Innovations
+ 
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and  
+ limitations under the License.
+-->
+<resources>
+    <string name="app_name">ANT HAL Service - DSI BlueZ</string>
+    
+<!-- Permissions -->
+    <!-- Permission description for com.dsi.ant.permission.ANTRADIO -->
+    <string name="permdesc_antradio">Allows the application to directly configure the ANT radio.  Malicious applications may prevent the ANT Radio Service from providing ANT functionality to oter applications. </string>
+    <!-- Permission label for com.dsi.ant.permission.ANTRADIO -->
+    <string name="permlab_antradio">use ANT hardware</string>
+    
+    <!-- Permission description for com.dsi.ant.permission.ANT -->
+    <string name="permdesc_ant">Allows the application to communicate with ANT devices using the proxy service.  Malicious applications may acquire information from, or transmit to, ANT devices without your knowledge. </string>
+    <!-- Permission label for com.dsi.ant.permission.ANT -->
+    <string name="permlab_ant">use ANT radio interface</string>
+    
+    <!-- Permission description for com.dsi.ant.permission.ANT_ADMIN -->
+    <string name="permdesc_antAdmin">Allows the application to directly configure the ANT radio through the proxy service.  Malicious applications may prevent other ANT applications from connecting to ANT devices. </string>
+    <!-- Permission label for com.dsi.ant.permission.ANT_ADMIN -->
+    <string name="permlab_antAdmin">control ANT radio configuration</string>
+
+</resources>
diff --git a/src/com/dsi/ant/core/IJAntEnum.java b/src/com/dsi/ant/core/IJAntEnum.java
new file mode 100644
index 0000000..3a1a825
--- /dev/null
+++ b/src/com/dsi/ant/core/IJAntEnum.java
@@ -0,0 +1,23 @@
+/*
+ * ANT Stack
+ *
+ * Copyright 2009 Dynastream Innovations
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and  
+ * limitations under the License.
+ */
+package com.dsi.ant.core;
+
+public interface IJAntEnum<V> {
+	V getValue();
+}
+
diff --git a/src/com/dsi/ant/core/JAntJava.java b/src/com/dsi/ant/core/JAntJava.java
new file mode 100644
index 0000000..836f320
--- /dev/null
+++ b/src/com/dsi/ant/core/JAntJava.java
@@ -0,0 +1,293 @@
+/*
+ * ANT Stack
+ *
+ * Copyright 2009 Dynastream Innovations
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.dsi.ant.core;
+
+import android.util.Log;
+
+import com.dsi.ant.server.AntHalDefine;
+
+
+/** Class for providing connection with JANTNative.cpp module */
+
+public class JAntJava
+{
+    private static final boolean debug = false;
+    private static final String TAG = "JAntJava";
+    private static ICallback mCallback = null;
+
+
+    /** Static constructor */
+    static
+    {
+        try
+        {
+            System.load("libantradio.so");
+        }
+        catch (Exception e)
+        {
+            Log.e("JANT", "Exception during nativeJANT_ClassInitNative (" + e.toString() + ")");
+        }
+    }
+
+    public interface ICallback
+    {
+        void ANTRxMessage(byte[] RxMessage);
+        void ANTStateChange(int NewState);
+    }
+    /*******************************************************************************
+     *
+     * Class Methods
+     *
+     *******************************************************************************/
+
+    public JAntStatus create(ICallback callback)
+    {
+        JAntStatus jAntStatus;
+
+        try
+        {
+            if (debug)
+                Log.d(TAG, "Calling nativeJAnt_Create");
+            int AntStatus = nativeJAnt_Create();
+            jAntStatus = JAntUtils.getEnumConst(JAntStatus.class, AntStatus);
+
+            // Record the caller's callback if create was successful
+            if (JAntStatus.SUCCESS == jAntStatus)
+            {
+                if (debug)
+                    Log.d(TAG, "create: nativeJAnt_Create returned success");
+                mCallback = callback;
+            }
+            else
+            {
+                Log.e(TAG, "create: nativeJAnt_Create failed " + jAntStatus);
+            }
+        }
+        catch(Exception e)
+        {
+            Log.e(TAG, "create: exception during nativeJAnt_Create (" + e.toString() + ")");
+            jAntStatus = JAntStatus.FAILED;
+        }
+
+        return jAntStatus;
+    }
+
+    public JAntStatus destroy()
+    {
+        if (debug)
+            Log.d(TAG, "destroy: entered");
+        JAntStatus jAntStatus;
+
+        try
+        {
+            int AntStatus = nativeJAnt_Destroy();
+            jAntStatus = JAntUtils.getEnumConst(JAntStatus.class, AntStatus);
+            if (JAntStatus.SUCCESS == jAntStatus)
+            {
+                if (debug)
+                    Log.d(TAG, "destroy: nativeJAnt_Destroy returned success");
+                mCallback = null;
+            }
+            else
+            {
+                Log.e(TAG, "destroy: nativeJAnt_Destroy failed " + jAntStatus);
+            }
+        }
+        catch (Exception e)
+        {
+            Log.e(TAG, "destroy: exception during nativeJAnt_Destroy (" + e.toString() + ")");
+            jAntStatus = JAntStatus.FAILED;
+        }
+
+        if (debug)
+            Log.d(TAG, "destroy: exiting");
+
+        return jAntStatus;
+    }
+
+    public JAntStatus enable()
+    {
+        if (debug)
+            Log.d(TAG, "enable: entered");
+
+        JAntStatus jAntStatus;
+
+        try
+        {
+            int AntStatus = nativeJAnt_Enable();
+            jAntStatus = JAntUtils.getEnumConst(JAntStatus.class, AntStatus);
+            if (debug)
+                Log.d(TAG, "After nativeJAnt_Enable, status = " + jAntStatus.toString());
+        }
+        catch (Exception e)
+        {
+            Log.e(TAG, "enable: exception during nativeJAnt_enable (" + e.toString() + ")");
+            jAntStatus = JAntStatus.FAILED;
+        }
+
+        if (debug)
+            Log.d(TAG, "enable: exiting");
+
+        return jAntStatus;
+    }
+
+
+    public JAntStatus disable()
+    {
+        if (debug)
+            Log.d(TAG, "disable: entered");
+
+        JAntStatus jAntStatus;
+
+        try
+        {
+            int status = nativeJAnt_Disable();
+            jAntStatus = JAntUtils.getEnumConst(JAntStatus.class, status);
+            if (debug)
+                Log.d(TAG, "After nativeJAnt_Disable, status = " + jAntStatus.toString());
+        }
+        catch (Exception e)
+        {
+            Log.e(TAG, "disable: exception during nativeJAnt_Disable (" + e.toString() + ")");
+            jAntStatus = JAntStatus.FAILED;
+        }
+
+        if (debug)
+            Log.d(TAG, "disable: exiting");
+
+        return jAntStatus;
+    }
+
+    public int getRadioEnabledStatus()
+    {
+        if (debug) Log.d(TAG, "getRadioEnabledStatus: entered");
+        int retStatus;
+        try
+        {
+            retStatus = nativeJAnt_GetRadioEnabledStatus();
+            if (debug) Log.i(TAG, "Got ANT status as " + retStatus);
+        }
+        catch (Exception e)
+        {
+            Log.e(TAG, "getRadioEnabledStatus: exception during call (" + e.toString() + ")");
+            retStatus = AntHalDefine.ANT_HAL_STATE_UNKNOWN;
+        }
+        if (debug) Log.d(TAG, "getRadioEnabledStatus: exiting");
+        return retStatus;
+    }
+
+    public JAntStatus ANTTxMessage(byte[] message)
+    {
+        if (debug)
+            Log.d(TAG, "ANTTxMessage: entered");
+        JAntStatus jAntStatus;
+
+        try
+        {
+            int AntStatus = nativeJAnt_TxMessage(message);
+            jAntStatus = JAntUtils.getEnumConst(JAntStatus.class, AntStatus);
+            if (debug)
+                Log.d(TAG, "After nativeJAnt_ANTTxMessage, status = " + jAntStatus.toString());
+        }
+        catch (Exception e)
+        {
+            Log.e(TAG, "ANTTxMessage: exception during nativeJAnt_ANTTxMessage (" + e.toString() + ")");
+            jAntStatus = JAntStatus.FAILED;
+        }
+
+        if (debug)
+            Log.d(TAG, "ANTTxMessage: exiting");
+        return jAntStatus;
+    }
+
+    public JAntStatus hardReset()
+    {
+        if (debug)
+            Log.d(TAG, "hardReset: entered");
+
+        JAntStatus jAntStatus;
+
+        try
+        {
+            int status = nativeJAnt_HardReset();
+            jAntStatus = JAntUtils.getEnumConst(JAntStatus.class, status);
+            if (debug)
+                Log.d(TAG, "After nativeJAnt_HardReset, status = " + jAntStatus.toString());
+        }
+        catch (Exception e)
+        {
+            Log.e(TAG, "hardReset: exception during nativeJAnt_HardReset, (" + e.toString() + ")");
+            jAntStatus = JAntStatus.FAILED;
+        }
+
+        if (debug)
+            Log.d(TAG, "hardReset:: exiting");
+
+        return jAntStatus;
+    }
+
+    /* --------------------------------
+     *            NATIVE PART
+     * --------------------------------
+     */
+    /* RBTL Calls */
+    private static native int    nativeJAnt_Create();
+    private static native int    nativeJAnt_Destroy();
+    private static native int    nativeJAnt_Enable();
+    private static native int    nativeJAnt_Disable();
+    private static native int    nativeJAnt_GetRadioEnabledStatus();
+    private static native int    nativeJAnt_TxMessage(byte[] message);
+    private static native int    nativeJAnt_HardReset();
+
+
+    /*    ----------------------------------------------
+     *    Callbacks from the JAntNative.cpp module
+     *    ----------------------------------------------
+     */
+    public static void nativeCb_AntRxMessage(byte[] RxMessage)
+    {
+        if (debug)
+            Log.d(TAG, "nativeCb_AntRxMessage: calling callback");
+
+        if (mCallback != null)
+        {
+            mCallback.ANTRxMessage(RxMessage);
+        }
+        else
+        {
+            Log.e(TAG, "nativeCb_AntRxMessage: callback is null");
+        }
+    }
+
+    public static void nativeCb_AntStateChange(int NewState)
+    {
+        if (debug)
+            Log.d(TAG, "nativeCb_AntStateChange: calling callback");
+
+        if (mCallback != null)
+        {
+            mCallback.ANTStateChange(NewState);
+        }
+        else
+        {
+            Log.e(TAG, "nativeCb_AntStateChange: callback is null");
+        }
+    }
+
+} /* End class */
+
diff --git a/src/com/dsi/ant/core/JAntStatus.java b/src/com/dsi/ant/core/JAntStatus.java
new file mode 100644
index 0000000..7ee6c43
--- /dev/null
+++ b/src/com/dsi/ant/core/JAntStatus.java
@@ -0,0 +1,61 @@
+/*
+ * ANT Stack
+ *
+ * Copyright 2009 Dynastream Innovations
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and  
+ * limitations under the License.
+ */
+package com.dsi.ant.core;
+
+public enum JAntStatus implements IJAntEnum<Integer> {
+
+SUCCESS                                 (0),
+FAILED                                  (1),
+PENDING                                 (2),
+INVALID_PARM                            (3),
+IN_PROGRESS                             (4),
+NOT_APPLICABLE                          (5),
+NOT_SUPPORTED                           (6),
+INTERNAL_ERROR                          (7),
+TRANSPORT_INIT_ERR                      (8),
+HARDWARE_ERR                            (9),
+NO_VALUE_AVAILABLE                      (10),
+CONTEXT_DOESNT_EXIST                    (11),
+CONTEXT_NOT_DESTROYED                   (12),
+CONTEXT_NOT_ENABLED                     (13),
+CONTEXT_NOT_DISABLED                    (14),
+NOT_DE_INITIALIZED                      (15),
+NOT_INITIALIZED                         (16),
+TOO_MANY_PENDING_CMDS                   (17),
+DISABLING_IN_PROGRESS                   (18),
+COMMAND_WRITE_FAILED                    (20),
+SCRIPT_EXEC_FAILED                      (21),
+
+FAILED_BT_NOT_INITIALIZED               (23),
+AUDIO_OPERATION_UNAVAILIBLE_RESOURCES   (24),
+
+NO_VALUE                                (100);
+
+    private final int value;
+
+    private JAntStatus(int value) 
+    {
+        this.value = value;
+    }
+
+    public Integer getValue() 
+    {
+        return value;
+    }
+}
+
diff --git a/src/com/dsi/ant/core/JAntUtils.java b/src/com/dsi/ant/core/JAntUtils.java
new file mode 100644
index 0000000..a9ff0ac
--- /dev/null
+++ b/src/com/dsi/ant/core/JAntUtils.java
@@ -0,0 +1,44 @@
+/*
+ * ANT Stack
+ *
+ * Copyright 2009 Dynastream Innovations
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and  
+ * limitations under the License.
+ */
+package com.dsi.ant.core;
+
+import java.lang.Enum;
+import java.util.EnumSet;
+
+public final class JAntUtils {
+
+	public static <V, E extends Enum<E> & IJAntEnum<V>> E getEnumConst(Class<E> enumType, V constValue) {		
+		EnumSet<E> es = EnumSet.allOf(enumType);
+
+		E  matchingConst = null;
+
+		for (E enumConst: es) {
+			 if (enumConst.getValue().equals(constValue))
+			 {
+				 matchingConst = enumConst;
+				 break;
+			 }
+		}		
+		
+		if (matchingConst == null) {
+			//Log.e(TAG, "getEnumConst: Invalid const (" + constValue + ") for " + enumType.toString());
+		}
+		return matchingConst;
+	}	
+}
+
diff --git a/src/com/dsi/ant/server/AntHalDefine.java b/src/com/dsi/ant/server/AntHalDefine.java
new file mode 100644
index 0000000..fa52478
--- /dev/null
+++ b/src/com/dsi/ant/server/AntHalDefine.java
@@ -0,0 +1,159 @@
+/*
+ * ANT Stack
+ *
+ * Copyright 2011 Dynastream Innovations
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.dsi.ant.server;
+
+/**
+ * Defines constants to be used by the ANT Radio Service to ANT System Service interface (IAntHal).
+ */
+public class AntHalDefine
+{
+    // ANT HAL Results
+    /** Operation was successful. */
+    public static final int ANT_HAL_RESULT_SUCCESS              = 1;
+
+    /** Operation failed for an unknown reason. */
+    public static final int ANT_HAL_RESULT_FAIL_UNKNOWN         = -1;
+
+    /** Operation failed as it is invalid. */
+    public static final int ANT_HAL_RESULT_FAIL_INVALID_REQUEST = -2;
+
+    /** Operation failed as ANT is not enabled. */
+    public static final int ANT_HAL_RESULT_FAIL_NOT_ENABLED     = -3;
+
+    /** Operation failed as this device does not support ANT. */
+    public static final int ANT_HAL_RESULT_FAIL_NOT_SUPPORTED   = -4;
+
+    /** Operation failed as the ANT hardware is in use. */
+    public static final int ANT_HAL_RESULT_FAIL_RESOURCE_IN_USE = -5;
+
+    /**
+     * Gets the human-readable value of an ANT_HAL_RESULT_X value.
+     *
+     * @param value the ANT_HAL_RESULT_X value
+     * @return the string representation.
+     */
+    public static String getAntHalResultString(int value)
+    {
+        String string = null;
+
+        switch(value)
+        {
+            case ANT_HAL_RESULT_SUCCESS:
+                string = "SUCCESS";
+                break;
+            case ANT_HAL_RESULT_FAIL_UNKNOWN:
+                string = "FAIL: UNKNOWN";
+                break;
+            case ANT_HAL_RESULT_FAIL_INVALID_REQUEST:
+                string = "FAIL: INVALID REQUEST";
+                break;
+            case ANT_HAL_RESULT_FAIL_NOT_ENABLED:
+                string = "FAIL: NOT ENABLED";
+                break;
+            case ANT_HAL_RESULT_FAIL_NOT_SUPPORTED:
+                string = "FAIL: NOT SUPPORTED";
+                break;
+            case ANT_HAL_RESULT_FAIL_RESOURCE_IN_USE:
+                string = "FAIL: RESOURCE IN USE";
+                break;
+        }
+
+        return string;
+    }
+
+
+    // ANT HAL State
+
+    /** State not yet initialised. */
+    public static final int ANT_HAL_STATE_UNKNOWN               = 0;
+
+    /** Powering on the ANT hardware and initialising the transport to it. */
+    public static final int ANT_HAL_STATE_ENABLING              = 1;
+
+    /** ANT is ON. */
+    public static final int ANT_HAL_STATE_ENABLED               = 2;
+
+    /** Closing the transport and powering down the ANT hardware. */
+    public static final int ANT_HAL_STATE_DISABLING             = 3;
+
+    /** ANT is OFF. */
+    public static final int ANT_HAL_STATE_DISABLED              = 4;
+
+    /** ANT is not supported on this device. */
+    public static final int ANT_HAL_STATE_NOT_SUPPORTED         = 5;
+
+    /** ANT system service is not installed. */
+    public static final int ANT_HAL_STATE_SERVICE_NOT_INSTALLED = 6;
+
+    /** There is no connection to the ANT system service (not bound). */
+    public static final int ANT_HAL_STATE_SERVICE_NOT_CONNECTED = 7;
+
+    /** ANT hardware was reset, low level is in the process of re-enabling. */
+    public static final int ANT_HAL_STATE_RESETTING             = 8;
+
+    /** ANT low level has finished re-enabling the hardware. */
+    public static final int ANT_HAL_STATE_RESET                 = 9;
+
+    /**
+     * Gets the human-readable value of an ANT_HAL_STATE_X value.
+     *
+     * @param state the ANT_HAL_STATE_X value
+     * @return the string representation.
+     */
+    public static String getAntHalStateString(int state)
+    {
+        String string = null;
+
+        switch(state)
+        {
+            case ANT_HAL_STATE_UNKNOWN:
+                string = "STATE UNKNOWN";
+                break;
+            case ANT_HAL_STATE_ENABLING:
+                string = "ENABLING";
+                break;
+            case ANT_HAL_STATE_ENABLED:
+                string = "ENABLED";
+                break;
+            case ANT_HAL_STATE_DISABLING:
+                string = "DISABLING";
+                break;
+            case ANT_HAL_STATE_DISABLED:
+                string = "DISABLED";
+                break;
+            case ANT_HAL_STATE_NOT_SUPPORTED:
+                string = "ANT NOT SUPPORTED";
+                break;
+            case ANT_HAL_STATE_SERVICE_NOT_INSTALLED:
+                string = "ANT HAL SERVICE NOT INSTALLED";
+                break;
+            case ANT_HAL_STATE_SERVICE_NOT_CONNECTED:
+                string = "ANT HAL SERVICE NOT CONNECTED";
+                break;
+            case ANT_HAL_STATE_RESETTING:
+                string = "RESETTING";
+                break;
+            case ANT_HAL_STATE_RESET:
+                string = "RESET";
+                break;
+        }
+
+        return string;
+    }
+}
diff --git a/src/com/dsi/ant/server/AntService.java b/src/com/dsi/ant/server/AntService.java
new file mode 100644
index 0000000..42882cc
--- /dev/null
+++ b/src/com/dsi/ant/server/AntService.java
@@ -0,0 +1,461 @@
+/*
+ * ANT Stack
+ *
+ * Copyright 2009 Dynastream Innovations
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.dsi.ant.server;
+
+import android.content.Context;
+import android.content.Intent;
+import android.app.Service;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.dsi.ant.core.*;
+
+import com.dsi.ant.server.AntHalDefine;
+import com.dsi.ant.server.IAntHal;
+import com.dsi.ant.server.IAntHalCallback;
+import com.dsi.ant.server.Version;
+
+public class AntService extends Service
+{
+    private static final String TAG = "AntHalService";
+
+    private static final boolean DEBUG = false;
+
+    public static final String ANT_SERVICE = "AntService";
+
+    private JAntJava mJAnt = null;
+
+    private boolean mInitialized = false;
+
+    private static Object sAntHalServiceDestroy_LOCK = new Object();
+
+    IAntHalCallback mCallback;
+
+    public static boolean startService(Context context)
+    {
+        return ( null != context.startService(new Intent(IAntHal.class.getName())) );
+    }
+
+    private void setState(int state)
+    {
+        if(DEBUG) Log.i(TAG, "Setting ANT State = "+ state +" / "+ AntHalDefine.getAntHalStateString(state));
+
+        if (mCallback != null)
+        {
+            try
+            {
+                if(DEBUG) Log.d(TAG, "Calling status changed callback "+ mCallback.toString());
+
+                mCallback.antHalStateChanged(state);
+            }
+            catch (RemoteException e)
+            {
+                // Don't do anything as this is a problem in the application
+
+                if(DEBUG) Log.e(TAG, "ANT HAL State Changed callback failure in application", e);
+            }
+        }
+        else
+        {
+            if(DEBUG) Log.d(TAG, "Calling status changed callback is null");
+        }
+    }
+
+    private int doGetAntState()
+    {
+        if(DEBUG) Log.v(TAG, "doGetAntState start");
+
+        int retState = mJAnt.getRadioEnabledStatus();
+        if(DEBUG) Log.i(TAG, "Get ANT State = "+ retState +" / "+ AntHalDefine.getAntHalStateString(retState));
+
+        return retState;
+    }
+
+    private int enableBlocking()
+    {
+        int ret = AntHalDefine.ANT_HAL_RESULT_FAIL_UNKNOWN;
+        synchronized(sAntHalServiceDestroy_LOCK)
+        {
+            if (mJAnt != null)
+            {
+                if(JAntStatus.SUCCESS == mJAnt.enable())
+                {
+                    if(DEBUG) Log.v(TAG, "Enable callback end: Success");
+                    ret = AntHalDefine.ANT_HAL_RESULT_SUCCESS;
+                }
+                else
+                {
+                    if(DEBUG) Log.v(TAG, "Enable callback end: Failure");
+                }
+            }
+        }
+        return ret;
+    }
+
+    private int disableBlocking()
+    {
+        int ret = AntHalDefine.ANT_HAL_RESULT_FAIL_UNKNOWN;
+        synchronized(sAntHalServiceDestroy_LOCK)
+        {
+            if (mJAnt != null)
+            {
+                if(JAntStatus.SUCCESS == mJAnt.disable())
+                {
+                    if(DEBUG) Log.v(TAG, "Disable callback end: Success");
+                    ret = AntHalDefine.ANT_HAL_RESULT_SUCCESS;
+                }
+                else
+                {
+                    if (DEBUG) Log.v(TAG, "Disable callback end: Failure");
+                }
+            }
+        }
+        return ret;
+    }
+
+    private int enableBackground()
+    {
+        if(DEBUG) Log.v(TAG, "Enable start");
+
+        if (DEBUG) Log.d(TAG, "Enable: enabling the radio");
+
+        new Thread(new Runnable() {
+            public void run() {
+                enableBlocking();
+            }
+        }).start();
+
+        if(DEBUG) Log.v(TAG, "Enable call end: Successfully called");
+        return AntHalDefine.ANT_HAL_RESULT_SUCCESS;
+    }
+
+    private int disableBackground()
+    {
+        if(DEBUG) Log.v(TAG, "Disable start");
+
+        new Thread(new Runnable() {
+            public void run() {
+                disableBlocking();
+            }
+        }).start();
+
+        if(DEBUG) Log.v(TAG, "Disable call end: Success");
+        return AntHalDefine.ANT_HAL_RESULT_SUCCESS;
+    }
+
+    private int doANTTxMessage(byte[] message)
+    {
+        if(DEBUG) Log.v(TAG, "ANT Tx Message start");
+
+        if(message == null)
+        {
+            Log.e(TAG, "ANTTxMessage invalid message: message is null");
+            return AntHalDefine.ANT_HAL_RESULT_FAIL_INVALID_REQUEST;
+        }
+
+        int result = AntHalDefine.ANT_HAL_RESULT_FAIL_UNKNOWN;
+
+        JAntStatus status = mJAnt.ANTTxMessage(message);
+
+        if(JAntStatus.SUCCESS == status)
+        {
+            if (DEBUG) Log.d (TAG, "mJAnt.ANTTxMessage returned status: " + status.toString());
+
+            result = AntHalDefine.ANT_HAL_RESULT_SUCCESS;
+        }
+        else
+        {
+            if (DEBUG) Log.w( TAG, "mJAnt.ANTTxMessage returned status: " + status.toString() );
+
+            if(JAntStatus.FAILED_BT_NOT_INITIALIZED == status)
+            {
+                result = AntHalDefine.ANT_HAL_RESULT_FAIL_NOT_ENABLED;
+            }
+            else if(JAntStatus.NOT_SUPPORTED == status)
+            {
+                result = AntHalDefine.ANT_HAL_RESULT_FAIL_NOT_SUPPORTED;
+            }
+            else if(JAntStatus.INVALID_PARM == status)
+            {
+                result = AntHalDefine.ANT_HAL_RESULT_FAIL_INVALID_REQUEST;
+            }
+        }
+
+        if (DEBUG) Log.v(TAG, "ANTTxMessage: Result = "+ result);
+
+        if(DEBUG) Log.v(TAG, "ANT Tx Message end");
+
+        return result;
+    }
+
+    private int doRegisterAntHalCallback(IAntHalCallback callback)
+    {
+        if(DEBUG) Log.i(TAG, "Registering callback: "+ callback.toString());
+
+        mCallback = callback;
+
+        return AntHalDefine.ANT_HAL_RESULT_SUCCESS;
+    }
+
+    private int doUnregisterAntHalCallback(IAntHalCallback callback)
+    {
+        if(DEBUG) Log.i(TAG, "UNRegistering callback: "+ callback.toString());
+
+        int result = AntHalDefine.ANT_HAL_RESULT_FAIL_UNKNOWN;
+
+        if(mCallback.asBinder() == callback.asBinder())
+        {
+            mCallback = null;
+            result = AntHalDefine.ANT_HAL_RESULT_SUCCESS;
+        }
+
+        return result;
+    }
+
+    private int doGetServiceLibraryVersionCode()
+    {
+        return Version.ANT_HAL_LIBRARY_VERSION_CODE;
+    }
+
+    private String doGetServiceLibraryVersionName()
+    {
+        return Version.ANT_HAL_LIBRARY_VERSION_NAME;
+    }
+
+    private int doHardReset()
+    {
+        int ret = AntHalDefine.ANT_HAL_RESULT_FAIL_UNKNOWN;
+        synchronized(sAntHalServiceDestroy_LOCK)
+        {
+            if (mJAnt != null)
+            {
+                if(JAntStatus.SUCCESS == mJAnt.hardReset())
+                {
+                    if(DEBUG) Log.v(TAG, "Hard Reset end: Success");
+                    ret = AntHalDefine.ANT_HAL_RESULT_SUCCESS;
+                }
+                else
+                {
+                    if (DEBUG) Log.v(TAG, "Hard Reset end: Failure");
+                }
+            }
+        }
+        return ret;
+    }
+
+    // ----------------------------------------------------------------------------------------- IAntHal
+
+    private final IAntHal.Stub mHalBinder = new IAntHal.Stub()
+    {
+        public int setAntState(int state)
+        {
+            int result = AntHalDefine.ANT_HAL_RESULT_FAIL_INVALID_REQUEST;
+
+            switch(state)
+            {
+                case AntHalDefine.ANT_HAL_STATE_ENABLED:
+                {
+                    result = enableBackground();
+                    break;
+                }
+                case AntHalDefine.ANT_HAL_STATE_DISABLED:
+                {
+                    result = disableBackground();
+                    break;
+                }
+                case AntHalDefine.ANT_HAL_STATE_RESET:
+                {
+                    result = doHardReset();
+                    break;
+                }
+            }
+
+            return result;
+        }
+
+        public int getAntState()
+        {
+            return doGetAntState();
+        }
+
+        public int ANTTxMessage(byte[] message)
+        {
+            return doANTTxMessage(message);
+        }
+
+        // Call these in onServiceConnected and when unbinding
+        public int registerAntHalCallback(IAntHalCallback callback)
+        {
+            return doRegisterAntHalCallback(callback);
+        }
+
+        public int unregisterAntHalCallback(IAntHalCallback callback)
+        {
+            return doUnregisterAntHalCallback(callback);
+        }
+
+        public int getServiceLibraryVersionCode()
+        {
+            return doGetServiceLibraryVersionCode();
+        }
+
+        public String getServiceLibraryVersionName()
+        {
+            return doGetServiceLibraryVersionName();
+        }
+    }; // new IAntHal.Stub()
+
+    // -------------------------------------------------------------------------------------- Service
+
+    @Override
+    public void onCreate()
+    {
+        if (DEBUG) Log.d(TAG, "onCreate() entered");
+
+        super.onCreate();
+
+        if(null != mJAnt)
+        {
+            // This somehow happens when quickly starting/stopping an application.
+            if (DEBUG) Log.e(TAG, "LAST JAnt HCI Interface object not destroyed");
+        }
+        // create a single new JAnt HCI Interface instance
+        mJAnt = new JAntJava();
+        JAntStatus createResult = mJAnt.create(mJAntCallback);
+
+        if (createResult == JAntStatus.SUCCESS)
+        {
+            mInitialized = true;
+
+            if (DEBUG) Log.d(TAG, "JAntJava create success");
+        }
+        else
+        {
+            mInitialized = false;
+
+            if (DEBUG) Log.e(TAG, "JAntJava create failed: " + createResult);
+        }
+    }
+
+    @Override
+    public void onDestroy()
+    {
+        if (DEBUG) Log.d(TAG, "onDestroy() entered");
+
+        try
+        {
+            if(null != mJAnt)
+            {
+                synchronized(sAntHalServiceDestroy_LOCK)
+                {
+                    int result = disableBlocking();
+                    if (DEBUG) Log.d(TAG, "onDestroy: disable result is: " + AntHalDefine.getAntHalResultString(result));
+                    mJAnt.destroy();
+                    mJAnt = null;
+                }
+            }
+
+            mCallback = null;
+        }
+        finally
+        {
+            super.onDestroy();
+        }
+    }
+
+    @Override
+    public IBinder onBind(Intent intent)
+    {
+        if (DEBUG) Log.d(TAG, "onBind() entered");
+
+        IBinder binder = null;
+
+        if (mInitialized)
+        {
+            if(intent.getAction().equals(IAntHal.class.getName()))
+            {
+                if (DEBUG) Log.i(TAG, "Bind: IAntHal");
+
+                binder = mHalBinder;
+            }
+        }
+
+        // As someone has started using us, make sure we run "forever" like we
+        // are a system service.
+        startService(this);
+
+        return binder;
+    }
+
+    @Override
+    public boolean onUnbind(Intent intent)
+    {
+        if (DEBUG) Log.d(TAG, "onUnbind() entered");
+
+        mCallback = null;
+
+        return super.onUnbind(intent);
+    }
+
+    @Override
+    public int onStartCommand(Intent intent, int flags, int startId)
+    {
+        if (DEBUG) Log.d(TAG, "onStartCommand() entered");
+
+        if (!mInitialized)
+        {
+            if (DEBUG) Log.e(TAG, "not initialized, stopping self");
+            stopSelf();
+        }
+        return START_NOT_STICKY;
+    }
+
+    // ----------------------------------------------------------------------------------------- JAnt Callbacks
+
+    private JAntJava.ICallback mJAntCallback = new JAntJava.ICallback()
+    {
+        public synchronized void ANTRxMessage( byte[] message)
+        {
+            if(null != mCallback)
+            {
+                try
+                {
+                    mCallback.antHalRxMessage(message);
+                }
+                catch (RemoteException e)
+                {
+                    // Don't do anything as this is a problem in the application
+                    if(DEBUG) Log.e(TAG, "ANT HAL Rx Message callback failure in application", e);
+                }
+            }
+            else
+            {
+                Log.w(TAG, "JAnt callback called after service has been destroyed");
+            }
+        }
+
+        public synchronized void ANTStateChange(int NewState)
+        {
+            if (DEBUG) Log.i(TAG, "ANTStateChange callback to " + NewState);
+            setState(NewState);
+        }
+    };
+}
+
diff --git a/src/com/dsi/ant/server/IAntHal.aidl b/src/com/dsi/ant/server/IAntHal.aidl
new file mode 100644
index 0000000..523cde8
--- /dev/null
+++ b/src/com/dsi/ant/server/IAntHal.aidl
@@ -0,0 +1,112 @@
+/*
+ * ANT Stack
+ *
+ * Copyright 2011 Dynastream Innovations
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and  
+ * limitations under the License.
+ */
+
+/*
+ *  !! Do not modify this file !!
+ *
+ * To update the interface, create a new AIDL and allow the service to bind with
+ * it, along with any previous AIDL's.
+ */
+
+package com.dsi.ant.server;
+
+import com.dsi.ant.server.IAntHalCallback;
+
+/**
+ * Specifies the interface the ANT Radio Service uses to communicate with the system service.
+ *
+ * @version 1.0.1
+ */
+interface IAntHal 
+{
+    /**
+     * Powers on/off the ANT chip.
+     * 
+     * @param state The desired ANT state, either ANT_HAL_STATE_ENABLED or ANT_HAL_STATE_DISABLED.
+     *
+     * @return ANT_HAL_RESULT_SUCCESS if the request was forwarded to the hardware layer.
+     * The IAntHalCallback sends ANT_HAL_STATE_X through antHalStateCallback()
+     * to indicate when the state has changed.
+     */
+    int setAntState(int state);
+    
+    /**
+     * Gets the enabled status (ANT_HAL_STATE_X) of the ANT hardware, either enabling, enabled, disabling or disabled.
+     * 
+     * @return The current state of the ANT HAL service.
+     */
+    int getAntState();
+    
+    
+    /**
+     * Sends raw data to the ANT hardware.  May be multiple ANT packets.
+     *
+     * @param message The data to be forwarded to the hardware, plus a header giving the 2 byte little endian length.
+     *
+     *  The format is
+     *   LL LL II JJ ------ [... II JJ ------   ] 
+     *  | Len | ANT Packet |    | ANT Packet N |
+     *
+     *   where:   LL LL  is the 2 byte (little endian) total length of the following ANT packet(s)
+     *            II     is the 1 byte size of the ANT message (0-249)  
+     *            JJ     is the 1 byte ID of the ANT message (1-255, 0 is invalid)
+     *            ------ is the data of the ANT message (0-249 bytes of data)
+     *
+     *
+     * The sync byte (header) and checksum byte (footer) for each ANT packet are added by the system service if required.
+     * 
+     * @return ANT_HAL_RESULT_SUCCESS if the request was forwarded to the hardware layer.
+     */
+    int ANTTxMessage(in byte[] message);
+    
+    
+    /**
+     * Set the callback to be used for updates from the ANT system service.
+     *
+     * @param callback The instance of an IAntHalCallback to use.
+     * 
+     * @return ANT_HAL_RESULT_SUCCESS if the callback was set.
+     */
+    int registerAntHalCallback(IAntHalCallback callback);
+    
+    /**
+     * Stop receiving updates from the ANT system service on the specified callback.
+     *
+     * @param callback The instance of an IAntHalCallback to remove.
+     * 
+     * @return ANT_HAL_RESULT_SUCCESS if the callback was removed.
+     */
+    int unregisterAntHalCallback(IAntHalCallback callback);
+    
+    
+    /**
+     * Gets the version code of the (latest) interface version provided by the system service.
+     * This allows the ANT Radio Service to only request functionality provided by the current system service.
+     * 
+     * @return The version number.
+     */
+    int getServiceLibraryVersionCode();
+    
+    
+    /**
+     * Gets the human-readable version name of the interface (latest) version provided by the system service.
+     * 
+     * @return The current state of the ANT HAL service.
+     */
+    String getServiceLibraryVersionName();
+}
diff --git a/src/com/dsi/ant/server/IAntHalCallback.aidl b/src/com/dsi/ant/server/IAntHalCallback.aidl
new file mode 100644
index 0000000..f2d6fba
--- /dev/null
+++ b/src/com/dsi/ant/server/IAntHalCallback.aidl
@@ -0,0 +1,60 @@
+/*
+ * ANT Stack
+ *
+ * Copyright 2011 Dynastream Innovations
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and  
+ * limitations under the License.
+ */
+
+/*
+ *  !! Do not modify this file !!
+ *
+ * To update the interface, create a new AIDL and allow the service to bind with
+ * it, along with any previous AIDL's.
+ */
+
+package com.dsi.ant.server;
+
+/**
+ * Specifies the interface system service uses to communicate with the ANT Radio Service.
+ * The ANT Radio Service must register an instance of the callback with the system service.
+ *
+ * @version 1.0.1
+ */
+interface IAntHalCallback
+{
+    /**
+     * Triggered when the ANT enabled state has changed.
+     *
+     * @param state The new (ANT_HAL_STATE_X) state of the system service, either enabling, enabled, disabling or disabled.
+     */
+    void antHalStateChanged(int state);
+    
+    /**
+     * Triggered when an ANT message has been received.  Always a single ANT packet.
+     *
+     * @param message The raw ANT packet.
+     *
+     *  The format is
+     *   II JJ ------ 
+     *   ^          ^
+     *  | ANT Packet |
+     *
+     *   where:   II     is the 1 byte size of the ANT message (0-249)  
+     *            JJ     is the 1 byte ID of the ANT message (1-255, 0 is invalid)
+     *            ------ is the data of the ANT message (0-249 bytes of data)
+     *
+     * The sync byte (header) and checksum byte (footer) for each ANT packet were removed by the system service if required.
+     */
+    void antHalRxMessage(in byte[] message);
+}
diff --git a/src/com/dsi/ant/server/Version.java b/src/com/dsi/ant/server/Version.java
new file mode 100644
index 0000000..64a8570
--- /dev/null
+++ b/src/com/dsi/ant/server/Version.java
@@ -0,0 +1,39 @@
+/*
+ * ANT Stack
+ *
+ * Copyright 2011 Dynastream Innovations
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and  
+ * limitations under the License.
+ */
+
+package com.dsi.ant.server;
+
+/**
+ * Defines version numbers
+ * 
+ * @hide
+ */
+public class Version {
+	
+    //////////////////////////////////////////////
+    // Library Version Information
+    //
+    // Specifies the interface version (IAntHal and IAntHalCallback).
+    //
+    //////////////////////////////////////////////
+    public static final int    ANT_HAL_LIBRARY_VERSION_CODE = 1;
+    public static final int    ANT_HAL_LIBRARY_VERSION_MAJOR = 0;
+    public static final int    ANT_HAL_LIBRARY_VERSION_MINOR = 1;
+    public static final String ANT_HAL_LIBRARY_VERSION_NAME = String.valueOf(ANT_HAL_LIBRARY_VERSION_MAJOR) + "." + String.valueOf(ANT_HAL_LIBRARY_VERSION_MINOR);
+	
+}
diff --git a/src/com/dsi/ant/server/startup/BootCompletedReceiver.java b/src/com/dsi/ant/server/startup/BootCompletedReceiver.java
new file mode 100644
index 0000000..e53ebc4
--- /dev/null
+++ b/src/com/dsi/ant/server/startup/BootCompletedReceiver.java
@@ -0,0 +1,48 @@
+/*
+ * ANT Stack
+ *
+ * Copyright 2011 Dynastream Innovations
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and  
+ * limitations under the License.
+ */
+package com.dsi.ant.server.startup;
+
+import com.dsi.ant.server.AntService;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Log;
+
+/**
+ * This class will receive BOOT_COMPLETED, and start the ANT HAL Service running forever.
+ */
+public class BootCompletedReceiver extends BroadcastReceiver 
+{
+    /** The debug log tag */
+    public static final String TAG = "BootCompletedReceiver";
+    
+    @Override
+    public void onReceive(final Context context, final Intent intent) 
+    {
+        // just make sure we are getting the right intent (better safe than sorry)
+        if(Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) 
+        {
+            AntService.startService(context);
+        }
+        else
+        {
+            Log.w(TAG, "Received unexpected intent " + intent.toString());
+        }
+    }
+}
