Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 7, 2014, 08:14 AM   #1
jmac0621
macrumors newbie
 
Join Date: Jul 2014
php or java or anything to communicate with bluetooth device

Hi.

I am basically looking for a good starting point in creating a web page that would allow a user to control a Bluetooth device from the page.

I have the Bluetooth 4 LE hardware already that works with an iOS app only, but I am wanting to expand the accessibility to other platforms.

My hope is to go on a smart phone or computer's browser, type in the url and be presented with controls for the Bluetooth device. So, whether you are on your phone or desktop, the controls would sent commands via the computer's or phone's Bluetooth to the board.

Thanks!
jmac0621 is offline   0 Reply With Quote
Old Jul 7, 2014, 01:32 PM   #2
Cromulent
macrumors 603
 
Cromulent's Avatar
 
Join Date: Oct 2006
Location: The Land of Hope and Glory
Quote:
Originally Posted by jmac0621 View Post
Hi.

I am basically looking for a good starting point in creating a web page that would allow a user to control a Bluetooth device from the page.

I have the Bluetooth 4 LE hardware already that works with an iOS app only, but I am wanting to expand the accessibility to other platforms.

My hope is to go on a smart phone or computer's browser, type in the url and be presented with controls for the Bluetooth device. So, whether you are on your phone or desktop, the controls would sent commands via the computer's or phone's Bluetooth to the board.

Thanks!
Can you clarify exactly what you want to do. As far as I can tell from what you have written you want to access a URL which will allow remote control of a bluetooth device. Is that correct?

Or do you want to access a URL and have control of a local bluetooth device on the same computer as the browser is accessing the page?

Depending on which you want the answer will be different. If you want both then it might be somewhat more complex than you are currently thinking.
__________________
Neural Advance - Mac OS X, UNIX and Windows Development
Last.fm Profile | Extreme Metal Reviews
MP 4x 2.66Ghz Xeons / 6GB RAM / 640GB + 500GB + 750GB + 1TB HDDs / ATI Radeon 4870 / iPad 3
Cromulent is offline   0 Reply With Quote
Old Jul 7, 2014, 11:46 PM   #3
jmac0621
Thread Starter
macrumors newbie
 
Join Date: Jul 2014
In the long run, I would like to be able to get it to work with other credentials. One could access a URL, use Facebook or Google credentials, and can control Bluetooth devices of other users or your own Bluetooth device. But that's above and beyond what I am wanting to do now.

Basically, I'd be happy with a web UI that can control a local Bluetooth device on the same computer as the browser.

Some added information: I don't know the profile used, but the Bluetooth device does not need to be paired with the iPhone from Settings>Bluetooth. You open the iOS app, and if Bluetooth is on, you can connect and control. I would like the web UI to work similarly. Load the URL from a computer or smart phone, and start controlling the device without pairing.
jmac0621 is offline   0 Reply With Quote
Old Jul 8, 2014, 11:49 AM   #4
Cromulent
macrumors 603
 
Cromulent's Avatar
 
Join Date: Oct 2006
Location: The Land of Hope and Glory
Quote:
Originally Posted by jmac0621 View Post
Basically, I'd be happy with a web UI that can control a local Bluetooth device on the same computer as the browser.
This is going to be a problem. The browser doesn't allow access to local hardware to client side code (or for that matter server side code for obvious reasons). The only way you are going to be able to access local hardware is if you write an app that will run on the local machine. You can use whatever programming language for this (although if you are targeting Macs then Objective-C would probably be the best bet - if you are targeting Windows as well and possibly even Linux on top then Java is likely to be the best option).

But bear in mind that the user will actually have to download a program and run it on their machine. You'll then need to communicate with your server. The easiest method is to have an HTTP RESTful API and then send and receive JSON or XML.

The important thing to note is that you won't be able to do what you want to do entirely in the browser. It just isn't allowed due to security reasons. There is a reason browsers run JavaScript in a sandbox environment and that is limit what potentially malicious code can do to your machine. Stopping direct access to local hardware is one part of that protection.
__________________
Neural Advance - Mac OS X, UNIX and Windows Development
Last.fm Profile | Extreme Metal Reviews
MP 4x 2.66Ghz Xeons / 6GB RAM / 640GB + 500GB + 750GB + 1TB HDDs / ATI Radeon 4870 / iPad 3
Cromulent is offline   1 Reply With Quote
Old Jul 9, 2014, 03:59 PM   #5
jtara
macrumors 65816
 
Join Date: Mar 2009
I don't get it.

Is the Bluetooth device in the server room?

If you want to control a Bluetooth connection between a phone or desktop and a Bluetooth device, I don't see how anything you might do on a server could help.

This might be a good candidate for an HTML5 feature, but as far as I know, this hasn't even been proposed.

This is probably as close as you're gonna get:

http://brulee-sdk.com

You can use this in PhoneGap apps, and you can use it on desktop, but the user has to install a browser plugin.
jtara is offline   0 Reply With Quote

Reply
MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhone: Bluetooth cannot forgot device ezio007 iOS 8 13 Sep 26, 2014 09:07 AM
Different EQ setting based upon Bluetooth device MaloCS iOS 7 6 Jun 18, 2014 11:32 AM
Connect Bluetooth between Simulator and Device namanhams iPhone/iPad Programming 0 Sep 20, 2013 03:07 AM
iPhone: Osb 2 bluetooth device connected to car hgrimberg Jailbreaks and iOS Hacks 1 Feb 10, 2013 05:48 PM
What bluetooth device do you use while driving and how do you like it? sixxmum iPhone Accessories 18 Oct 3, 2012 02:34 PM

Forum Jump

All times are GMT -5. The time now is 06:20 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC