FORUMS

XDA Office Space: Frankenstein’s Perfect IM Client?

The portal’s decentralized XDA office lies in a Hangouts chatroom, where … more

Which IM Client on Android is best?

With so many different messengers to choose from, it can be tough to find the best one for you and … more

Android Factory Reset Security Flaw and More – XDA TV

Nvidia is releasing a 500Gb SHIELD TV Pro! That and much more news is … more

Android M Code Name: Macadamia Nut Cookie

While the official name for the latest iteration of Android has yet to be revealed, the code … more
Post Reply Subscribe to Thread Email Thread

ANT+ for Moto G (4G) and maybe others...

12th September 2014, 10:29 PM |#1  
OP Junior Member
Thanks Meter: 8
 
More
Code:
#include <std_disclaimer.h>
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns before flashing this modification!
 * YOU are choosing to make these modification, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 */
I've noticed that the Moto G 4G had the same chipset as the Xperia M2.
The Xperia M2 supports ANT+, so the 4G should too...

I've managed to build Cyanogenmod with support for ANT+ by following the information at
https://github.com/ant-wireless/ANT_in_Android.

Here's the patch for https://github.com/CyanogenMod/android_device_motorola_msm8226-common:
Code:
diff --git a/msm8226.mk b/msm8226.mk
index 5a27cf5..826f371 100644
--- a/msm8226.mk
+++ b/msm8226.mk
@@ -251,3 +251,7 @@ PRODUCT_PACKAGES += \
 PRODUCT_COPY_FILES += \
     kernel/motorola/msm8226/drivers/staging/prima/firmware_bin/WCNSS_cfg.dat:system/etc/firmware/wlan/prima/WCNSS_cfg.dat \
     kernel/motorola/msm8226/drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini:system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini
+
+#ANT
+BOARD_ANT_WIRELESS_DEVICE := "qualcomm-smd"
+$(call inherit-product, external/ant-wireless/build/ant-wireless.mk)
Attached to this post is a flashable zip which includes all binaries which were added by my own build in comparison to a normal CM build.
So you could add ANT+ support just by flashing it over CM(or probably every other rom).
sha256sum: 42bb6f552b5150e1baab6f9b8f28cec8c7c2ab408b3fbca418 490d71159c2cf4
md5sum: c1c765acb10d0420a643bd4f84f714d5

After you've flashed it, get the "ANT+ Plugin Sampler" from the Play Store and try to connect to any sensor.
If a black window appears with the waiting circle on the upper left screen, then everything is working properly.
I only have a 4G to test, but i'd be very interested whether it works on a Moto G or a Moto E.

If you look at the patch, then you'll see that the driver for ANT+ is called "qualcomm-smd", so it's not specific to the chipset of the 4G but to a group of Qualcomm chips.

Let's find out to which ones exactly!
Attached Files
File Type: zip moto_g_ant.zip - [Click for QR Code] (817.1 KB, 539 views)
The Following 8 Users Say Thank You to antftw For This Useful Post: [ View ]
 
 
18th September 2014, 09:27 AM |#2  
Junior Member
Flag Palermo
Thanks Meter: 5
 
More
I've flashed the zip on my moto g. The app seems to work. But i need to fin and ant+ device to know if it really work
19th September 2014, 05:10 PM |#3  
Senior Member
Thanks Meter: 142
 
More
Quote:
Originally Posted by antftw

[...]

I've noticed that the Moto G 4G had the same chipset as the Xperia M2.
The Xperia M2 supports ANT+, so the 4G should too...

I've managed to build Cyanogenmod with support for ANT+ by following the information at
https://github.com/ant-wireless/ANT_in_Android.

[...]

Attached to this post is a flashable zip which includes all binaries which were added by my own build in comparison to a normal CM build.
So you could add ANT+ support just by flashing it over CM(or probably every other rom).
sha256sum: 42bb6f552b5150e1baab6f9b8f28cec8c7c2ab408b3fbca418 490d71159c2cf4
md5sum: c1c765acb10d0420a643bd4f84f714d5

After you've flashed it, get the "ANT+ Plugin Sampler" from the Play Store and try to connect to any sensor.
If a black window appears with the waiting circle on the upper left screen, then everything is working properly.
I only have a 4G to test, but i'd be very interested whether it works on a Moto G or a Moto E.

If you look at the patch, then you'll see that the driver for ANT+ is called "qualcomm-smd", so it's not specific to the chipset of the 4G but to a group of Qualcomm chips.

Let's find out to which ones exactly!

Hi,

Have you successfully tested it with a 2013 Moto G 4G? (It isn't clear from your posting above)

Were you able to pair up actual ANT+ sensors (HRM, speed, cadence, power etc) to your 2013 Moto G 4G?

Do apps like Tracks, Runtastic, IpBike etc work with these ANT+ sensors on the 2013 Moto G 4G, properly?

Any issues?

Does the original 2013 Moto G non-4G version have the same chipset/SoC as the 4G version (and the Xperia M2)? No reason to expect that it will work on the device otherwise...

---------- Post added at 05:10 PM ---------- Previous post was at 05:05 PM ----------

Quote:
Originally Posted by toot_k90

I've flashed the zip on my moto g. The app seems to work. But i need to fin and ant+ device to know if it really work

Is this a 2013 Moto G 4G or the original 3G-only 2013 model?

Would be great to find out if pairing with an actual ANT+ device works.
Last edited by MiyagiSan; 19th September 2014 at 05:08 PM.
19th September 2014, 07:10 PM |#4  
OP Junior Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by MiyagiSan

Have you successfully tested it with a 2013 Moto G 4G? (It isn't clear from your posting above)
Were you able to pair up actual ANT+ sensors (HRM, speed, cadence, power etc) to your 2013 Moto G 4G?

There's no 4G from 2013 as far as i know. So i'm specifically using a Moto G 4G (XT1039).
I've paired heartrate, speed, cadence, speed/cadence sucessfully with the ANT+ Plugin Sampler and let it run for maybe 30 minutes without any issues.

Quote:
Originally Posted by MiyagiSan

Does the original 2013 Moto G non-4G version have the same chipset/SoC as the 4G version (and the Xperia M2)? No reason to expect that it will work on the device otherwise...

According to gsmarena.com: Yes.
21st September 2014, 03:08 PM |#5  
Senior Member
Thanks Meter: 142
 
More
Quote:
Originally Posted by antftw

There's no 4G from 2013 as far as i know. So i'm specifically using a Moto G 4G (XT1039).
I've paired heartrate, speed, cadence, speed/cadence sucessfully with the ANT+ Plugin Sampler and let it run for maybe 30 minutes without any issues.

My bad. I should have said 1st gen Moto G 4G or xt1039.

Thanks for the clarification.

Have you tried any of the other ANT+ biking/fitness apps?
21st September 2014, 06:16 PM |#6  
Junior Member
Flag Palermo
Thanks Meter: 5
 
More
The phone is a xt1032. The app does the searching but sadly I've only polar devices so I can't say if the ant is working or not
24th September 2014, 11:35 AM |#7  
Senior Member
Hanoi
Thanks Meter: 20
 
More
So how would this need to be edited for a HTC One M8, they're running on the same chip right?
24th September 2014, 03:20 PM |#8  
Senior Member
Thanks Meter: 142
 
More
Quote:
Originally Posted by andy905

So how would this need to be edited for a HTC One M8, they're running on the same chip right?

HTC One M8 and a Moto G (any variant)? Running the same chipset or Soc?

NO.

Someone else can answer the underlying question: "Does the HTC One M8's SoC support ANT+?"

My guess, YES.

I too, would also like to know how this process might be applied to another device btw. Seems like a useful hack to learn...
Last edited by MiyagiSan; 24th September 2014 at 04:20 PM.
24th September 2014, 04:23 PM |#9  
Senior Member
Hanoi
Thanks Meter: 20
 
More
WCN3680
BRAND, PRODUCT NAME: ROMS
Amazon, Fire Phone
HTC, One (M8)
Motorola, Moto G 4G (http://forum.xda-developers.com/moto...maybe-t2875420)
Motorola, Moto X
OnePlus, One
Samsung, Galaxy Mega 6.3
Sony, Xperia M2: Stock (certified)
Sony, Xperia Z Ultra: Stock (certified)
Xiaomi, Mi4

Just so you know they have the same Qualcomm WCN3680 chips so yes it does have ant+ capability
Sent from my HTC One_M8 using XDA Free mobile app
24th September 2014, 05:04 PM |#10  
Senior Member
Thanks Meter: 142
 
More
Quote:
Originally Posted by andy905

WCN3680
BRAND, PRODUCT NAME: ROMS

[...]

Just so you know they have the same Qualcomm WCN3680 chips so yes it does have ant+ capability

Seems I was looking at the wrong chip. This is all very interesting.

What is a WCN3680?

How and where did you get all this information from?

If I have a device, what do I do to get the info about the ANT+ support it may have? (I've just being searching for any similar device on gsmarena with the same SoC. I can see that isn't adequate now)

---------- Post added at 05:04 PM ---------- Previous post was at 04:29 PM ----------

Quote:
Originally Posted by MiyagiSan

Seems I was looking at the wrong chip. This is all very interesting.

What is a WCN3680?

How and where did you get all this information from?
[...]

Ok, found something information in this thread. Replying to myself as the info could be useful for others reading this thread.
Last edited by MiyagiSan; 24th September 2014 at 04:33 PM.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes