Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

You are here: Forum Home → ANT+ Forums → ANT+ Weight Scale → Thread

   

Tanita HD-351ANT

Rank

Total Posts: 5

Joined 2013-09-09

PM

Hello All,
I have a Tanita HD-351ANT Scale. It came with a software called "Healthy Edge Lite". I installed the software and initially I had to configure it to connect to the scale and it works fine. When I click the "New Measurement" from the app, the light blinks on the Scale and I can stand on the scale and the weight shows up on the application.

Now I have a requirement to create a web application in ASP.NET to connect to Tanita HD-351ANT Scale and get the measurements. Basically I should to be able to do the same thing that I was doing from the "Healthy Edge Lite" app.
I have downloaded the "ANT Windows Library Package with source code". I am not sure what to configure in the code to communicate with the Scale. Do I need to do something on the "ANT_Libraries" or the "ANT_NET_Libraries"

Any help is greatly appreciated.
Thanks
AD      
Avatar
RankRankRankRank

Total Posts: 235

Joined 2012-08-31

PM

Hi!

You'll need to download the ANT+ Weight Scale Device Profile, and use that to configure the channel to receive the weight scale data. http://www.thisisant.com/developer/resources/downloads/#documents_tab

Bear in mind that the Tanita scale will only send ANT+ weight and if you are looking for other metrics e.g. body fat% you will need to speak to Tanita as they have implemented the advanced metrics using a proprietary format.

Kind regards,

Kat      
Rank

Total Posts: 5

Joined 2013-09-09

PM

Kat,

Thanks for the quick reply.
Just downloaded the document. I will let you know how that goes.

Thanks,
AD      
Rank

Total Posts: 5

Joined 2013-09-09

PM

Hi,

I read the document "ANT_Weight_Scale_Device_Profile" but still I am not sure where to put the configuration info to check for the weighing Scale. I mean in which folder/file should I put this information.

I am trying to do the following.
I launch my custom .net web application, and request a new measurement from the Scale by clicking a button "New Measurement" on the web page. When I do this action, the light on the scale should blink and should be ready to take the measurement. And once I stand on it, it should pass the weight to my application that I should be able to capture. Is this possible?

Best Regards!!!
AD      
Avatar
RankRankRankRank

Total Posts: 235

Joined 2012-08-31

PM

Yes, that's possible. When user presses the button in your web app, the program should send a user profile to the weight scale (the user profile can be invalid). This will wake up the scale, cause it to blink, the user can stand on the scale and you can receive the weight data from the scale as described in the profile.

For help developing the PC app take a look at the process here: http://www.thisisant.com/developer/ant/starting-your-project/

Hope that helps,

Kat      
Rank

Total Posts: 5

Joined 2013-09-09

PM

Kat,
Thanks for providing me the info
I followed the link you provided.

On the .net library there is a WPF app (ANT_NetDll_Demo)that I see.
I made the following changes to the demo.cs file after reading the document ANT_Weight_Scale_Device_ Profile
static readonly byte CHANNEL_TYPE_INVALID = 2;

static readonly byte USER_ANT_CHANNEL = 0; // ANT Channel to use
static readonly ushort USER_DEVICENUM = 0; // Device number
static readonly byte USER_DEVICETYPE = 119; // Device type
static readonly byte USER_TRANSTYPE = 5; // Transmission type

static readonly byte USER_RADIOFREQ = 57; // RF Frequency + 2400 MHz
static readonly ushort USER_CHANNELPERIOD = 8192; // Channel Period (8192/32768)s period = 4Hz

static readonly byte[] USER_NETWORK_KEY = { 0, 0, 0, 0, 0, 0, 0, 0 };
static readonly byte USER_NETWORK_NUM = 0; // The network key is assigned to this network number

static ANT_Device device0;
static ANT_Channel channel0;
static ANT_ReferenceLibrary.ChannelType channelType;
static byte[] txBuffer = { 0, 0, 0, 0, 0, 0, 0, 0 };

When I run the app and click the start demo, I always get the error.

I have tried using the ANT + Display Simulator and am able to invoke the weighing machine and get the weight. But still no luck with the .net application that I am working on.

THanks,
Imran      

Image Attachments

error.png

Click thumbnail to see full-size image

Avatar
RankRankRankRank

Total Posts: 235

Joined 2012-08-31

PM

You need to set the network key to the ANT+ Network Key to communicate with an ANT+ device. Using all zeros probably means you are currently on the public network instead.

"One of the channel configuration parameters is the network key. This should be set to the ANT+ network key as specified in the ANT+ device profile to enable the device to operate on the ANT+ managed network; however please note that this network key may only be used by devices that are fully compliant with an ANT+ device profile. You can use these links to find more information about network keys, or view the network keys."

Network keys: http://www.thisisant.com/developer/ant-plus/ant-plus-basics/network-keys

Network key FAQ: http://www.thisisant.com/developer/resources/tech-faq/category/network-keys/      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

It is highly recommended that you use the DEMO_NET demo in the ANT Windows Library package as a starting point, as it includes many comments that explain what the code is doing. If you are new to ANT, you will find development much easier if you take the time to understand the basics of the ANT protocol before jumping into implementing a device profile.

Also, when using the projects in the library package, make sure to read the readme file, it has many useful pointers on the usage of this libraries.

Regarding the error you are getting, set your project to x86. This is explained in more detail in the readme file.      
Rank

Total Posts: 5

Joined 2013-09-09

PM

Kat, I will look into the network keys. Thanks for pointing that out.

Alejandra,
I started with the ANT_NETdll_Demo project and set the project to x86 and compiled. Now I am able to open up the start page and Start the Demo.

Thanks for all your help. I will keep digging more

Kind Regards,
AD      
Rank

Total Posts: 1

Joined 2016-04-27

PM

Greetings

I also needed to make an app to talk with this scale and did so successfully by hiring someone to help me. He did a wonderful job and said it was easy.

Now the scale comes with a smaller dongle and my app needs the protocol updated to use this app. I am a greenhorn when it comes to this stuff so a very patient individual willing to help is needed.

I have some other things to do in regard to this matter and would be willing to hire someone that knows Zend Framework.

Let me know if there is anyone interested.