Wireless Communicatons

What's the best way to setup a home network? Why should I care about BGP?

Wireless Communicatons

Post by 3asyMac on Mon Apr 22, 2013 8:33 pm
([msg=75291]see Wireless Communicatons[/msg])

I am working on a side project. I am a senior undergrad Engineering student. I need a little help. I have a wireless heart rate monitor that tells my watch what my heart rate is. I want to intercept the signal and using a program I want to play music on my smartphone based on my heart rate. Translating my hearts BPM to an appropriate song BPM. I do not want to render my watch, monitor, or phone unusable. I just want to adapt my phone and make any homebrew antenna/hardware necessary to make this work. My big issues is with the hand shake procedure between the monitor and the watch, the kind of signal it is for the external antenna/hardware, and the micro or mini usb procedure of my android device.
3asyMac
New User
New User
 
Posts: 7
Joined: Mon Apr 22, 2013 8:23 pm
Blog: View Blog (0)


Re: Wireless Communicatons

Post by centip3de on Mon Apr 22, 2013 11:04 pm
([msg=75292]see Re: Wireless Communicatons[/msg])

3asyMac wrote:I am working on a side project. I am a senior undergrad Engineering student. I need a little help. I have a wireless heart rate monitor that tells my watch what my heart rate is. I want to intercept the signal and using a program I want to play music on my smartphone based on my heart rate. Translating my hearts BPM to an appropriate song BPM. I do not want to render my watch, monitor, or phone unusable. I just want to adapt my phone and make any homebrew antenna/hardware necessary to make this work. My big issues is with the hand shake procedure between the monitor and the watch, the kind of signal it is for the external antenna/hardware, and the micro or mini usb procedure of my android device.


1. You keep saying monitor, you want to say computer.
2. If you want to write an app for Android, you need to learn Java to some degree. I'd suggest getting a PoC working on your desktop/laptop first, then transitioning off.
3. It's most likely a BlueTooth connection which means that you can establish a connection on your computer between your heart rate monitor and your computer (or phone) right off the bat, no extra crap needed.
4. After you connect it, you should be able to view the connection packets with Wireshark, decipher them and figure out how they work.
5. Writing a program that receives the BlueTooth signal should be fairly trivial (assuming it's akin to writing a program for other wireless connections) granted you have the right libraries installed. Look for those libraries.
6. To keep things easier at the start, make a file for each musical BPM, i.e. "90BPM.mp3", "91BPM.mp3", etc.
7. Your program should be able to keep the BlueTooth connection alive, read in the packets, decipher their contents (might be in plaintext, might not), find your heart's BPM, pick the music applicable to that. The BlueTooth library (if it exists) should be able to do most of that for you, the rest is up to you (although that part is pretty easy).
8. ???
9. Profit.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook
User avatar
centip3de
Moderator
Moderator
 
Posts: 1443
Joined: Fri Aug 20, 2010 5:46 pm
Blog: View Blog (0)


Re: Wireless Communicatons

Post by sordidarchetype on Tue Apr 23, 2013 8:53 am
([msg=75293]see Re: Wireless Communicatons[/msg])

Unfortunately, centip3de is not entirely correct. Although it is possible to get bluetooth enabled devices, most heart monitoring hardware do not use it. You are more likely to have a device using the proprietary ANT wireless protocol.
You can get more information here: http://en.wikipedia.org/wiki/ANT_(network)

Some devices (although this is not as common) even include some forms of encryption on the signal as well.

A good start would be to get the manufacturer and model information on your particular unit and see if you can search for any documentation that may be released on it. Manufacturer websites will often have a decent repository of starting information for a project like this.

More than likely, you will need to construct a device to intercept the signal and then translate/transmit it to your android. That's the hardest part; If you can get past that, the rest is (as centip3de mentioned) easy enough: writing an app on android that will interpret the signals and play the appropriate songs. (You can probably find lots of sample Java code to do similar things around the net)
User avatar
sordidarchetype
New User
New User
 
Posts: 47
Joined: Wed Dec 22, 2010 12:46 pm
Blog: View Blog (0)


Re: Wireless Communicatons

Post by brutal_hacker on Tue Apr 23, 2013 5:00 pm
([msg=75297]see Re: Wireless Communicatons[/msg])

Sounds like an interesting concept. Life music in a way ever seen the family guy episode when he wishes that his day to day life played music.

It is quite viable and achievable. I saw a recent app that uses your android phone to relay your heartbeat and work out percentages. Most likely would have to be a relay between a watch and your phone. So it can be done just need to link that up with a music player and a randomize function.

There is a huge prize fund going on at the moment for the first person to develop an app that acts like the tool the star trek doctor uses (not a fan) ...... so as for an audience there is one out there.

All you need to do is like previously stated:

Get an up to date smart phone that supports blue tooth.
Why? - No wires less hassle

Learn everything about compatibility between the products and if its possible.

Learn the programming language for that smart phone I.e Android - Java.

I would first start by looking up if you can learn how to scan for Bluetooth devices every xx minutes. Scan for the specific device and search for the specific variable i.e heartbeat.

Then in turn you would make the app randomize tracks based on the rate. It would take a while to make the app and a lot of time would most likely go into the repetitiveness of BPM - Track BPM. Then inputting each one in individually.

There is a lot of hurdles you will come across when doing this but the main key is to just see if you can scan for Bluetooth devices get the correct device and disply the BPM with no connection issues once you have that the rest is a walk in the park. Like i stated before there is apps like this already out there so its just a matter of adapting someone Else's code.

Sorry I cant be of anymore help im fairly new to App Programming but once you know one language its not hard to learn the rest.
brutal_hacker
Experienced User
Experienced User
 
Posts: 58
Joined: Fri Apr 19, 2013 1:03 pm
Blog: View Blog (0)


Re: Wireless Communicatons

Post by 3asyMac on Wed Apr 24, 2013 6:51 pm
([msg=75326]see Re: Wireless Communicatons[/msg])

Thanks for all your advice. I do have a couple comments and questions though.

centip3de - When I said monitor I was talking about the heart rate monitor. "I do not wish to make any hardware mods for this project except a receiving device to plug into my phone if needed." is what I meant to say. As for profit, I am not looking to make money off of this right now but if a company or a person is interested I would be willing to sell the idea.

brutal_hacker - I have seen that episode. The star trek com, is that the same one on innocentive.com? If so, I have seen that and had a couple ideas but never had an interest to go down that road other than for the money.

Everyone - My programming knowledge is adequate in my opinion however I do not know java. I do know c++, assembly, and VB. Is java really necessary or is c++/c# compatible with android? If not, any recommendations on an online java coding source? Does anyone know where I can find information on USB or micro/mini USB protocol? My laptop does not have blue tooth capabilities. Any suggestions for that particular hurdle?

When I do complete this project I will post my solution online including code and any hardware built. I will see what I can find out and post any issues I come across during this project.
3asyMac
New User
New User
 
Posts: 7
Joined: Mon Apr 22, 2013 8:23 pm
Blog: View Blog (0)


Re: Wireless Communicatons

Post by fashizzlepop on Wed Apr 24, 2013 7:02 pm
([msg=75327]see Re: Wireless Communicatons[/msg])

The Android documentation has good tutorials on Java and programming on Android.
The glass is neither half-full nor half-empty; it's merely twice as big as it needs to be.
User avatar
fashizzlepop
Developer
Developer
 
Posts: 2303
Joined: Sat May 24, 2008 1:20 pm
Blog: View Blog (0)


Re: Wireless Communicatons

Post by sordidarchetype on Fri Apr 26, 2013 9:15 am
([msg=75398]see Re: Wireless Communicatons[/msg])

3asyMac wrote:Everyone - My programming knowledge is adequate in my opinion however I do not know java. I do know c++, assembly, and VB. Is java really necessary or is c++/c# compatible with android? If not, any recommendations on an online java coding source? Does anyone know where I can find information on USB or micro/mini USB protocol? My laptop does not have blue tooth capabilities. Any suggestions for that particular hurdle?


The short and easy answer is that Android exposes a specific interface that must be used in order to write programs for it, and that interface is for Dalvik, not C/C++, ASM, or VB. You will have to write in Dalvik to program for Android (although this isn't 100% true, for the scope of this discussion, just accept that as it is).

Dalvik is a language that is syntactically compatible with Java (and Java byte-code can be converted easily to Dalvik binary form) so pretty much any Java tutorials and guides you read will teach you what you need to know. But you will need to learn Java to write for Android.
User avatar
sordidarchetype
New User
New User
 
Posts: 47
Joined: Wed Dec 22, 2010 12:46 pm
Blog: View Blog (0)



Return to Networking

Who is online

Users browsing this forum: No registered users and 0 guests