What's the best way to connect to Sphero bolt on windows 10 and connect to it with javascript without using Sphero edu app? - sphero

I'm trying to connect to Sphero Bolt on windows 10. When I select Add a Bluetooth Device, I can see the device name SB-058A.However, it keeps spinning and shows Connecting when I select it.
I have installed Sphero edu app and could connect to Sphero Bolt via the edu app.
My end goal is using spherojs and connect to Sphero Bolt on windows 10.
What's the best way to connect to Sphero bolt on windows 10 and connect to it with javascript without using Sphero edu app?

The Sphero BOLT communication is not based on UART. It uses custom BLE services. That means you can't connect to it the way you tried.
You would have to explore and implement communication services yourself (or use a 3rd party library, if you found some). The Sphero company hasn't published their BLE protocol as far as I know. However, the communication is possible and you can find a few resources on the net you can start with.
The packet structure is public (https://sdk.sphero.com/docs/api_spec/general_api) and many commands are compatible with older Sphero versions (V2). However, there are some differences.
Google these GUIDs to find more:
00010001-574f-4f20-5370-6865726f2121
00020001-574f-4f20-5370-6865726f2121

Related

Windows 10 Connect to Bluetooth Classic Device without Pairing

According to Microsoft's latest docs:
Do I have to pair Bluetooth devices before using them? You don't have
to for Bluetooth RFCOMM (classic) devices. Starting with Windows 10
release 1607, you can simply query for nearby devices and connect to
them. The updated RFCOMM Chat Sample shows this functionality.
However, when I try to connect to my devices using this chat sample, I get a notification that asks me to "set up the device", like I was going through a normal pairing process.
Am I missing something?
The snippet of code that I changed from the sample:
var rfcommServices = await bluetoothDevice.GetRfcommServicesAsync(BluetoothCacheMode.Uncached);
Taken from msdn resources:
Windows 10 Mobile is currently limited to connections with only paired
devices. In Windows 10, you can programmatically pair/unpair. See
scenarios 8 and 9:
https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing
Here’s is the related MSDN documentation on pairing and the relevant
device selectors for enumeration.
https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.enumeration.deviceinformationpairing.aspx
https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.bluetooth.bluetoothdevice.aspx
But I also know that you can use direct bluetooth connections on lower level and this way windows won't suggest you pairing. For example, that's how things work with 32feet.net library, discussed in this answer (I worked with it and it was fine, however it is currently unsupported so please beware of it).
First thing to test is the bluetooth protocol used to be RFCOMM in both client and server. Link
Check that both client and server hardware support the RFCOMM
Check the bluetooth versions in both client and server link
based on wikipedia bluetooth has many protocols.
Second is to check windows version

Maintaining a Windows Bluetooth Connection

I'm manufacturing a device that connects to my computer using Bluetooth and then a desktop Java app uses the Bluetooth connection to send serial data to the device which is then displayed.
When I try to connect my device to windows 7 it successfully finds and pairs with it creating a Bluetooth link on a COM port. This link can then be used by a serial prompt (used for testing) or my Java application. It works initially however soon after windows drops the connection and the only way to reconnect is to delete the device within devices and printers and then reconnect.
This seems to be a known problem with windows bluetooth so I decieded to use a third party Bluetooth application. I downloaded and tried Toshiba's Bluetooth Stack and it was able to add a Bluetooth device and keep a stable connection which works great however this only works for Toshiba computers without getting a cracked version.
This device is commercial and can't be sold with cracked versions of software. Has anybody experienced the same problems or not in other operating systems and has any solutions of advice as that would be a tremendous help.
This is not a good idea/method to use the COM ports generated by Windows, it's not working fine and not reliable in any scenario ; you should use Bluetooth Sockets instead.
Using Toshiba or Widcomm or BleuSoleil won't help: under Win7, all dongles are now trying to use the Microsoft Stack, not their own implementation.

iOS and Android bluetooth connection differences

Just curious to understand why iOS devices connect to sphero directly but an app needs to do it in Android?
Well that's what I guess is happening because sphero will keep flashing in identity colours in Android until an app completes a connection.
To add: to use the option that keeps the sphero alive on the charger while connected to the client, then IOS would not need an app running but Android would. Well the Android app could have a service running to keep a connection open with sphero.
But ideally a consistent behaviour would be better.
Kasuku, you're correct in your post, but you also need to consider that the operating systems that you are comparing are completely different. For example, in Android it is possible to directly access the bluetooth adapter and "manually" connect to a bonded device. In iOS, this functionality is abstracted out from the developer.
To address BTLE:
No, as of right now Sphero currently does not support BTLE hardware.
OK ... as usual this tag seems to be dead so I post my finding anyway:
Bluetooth hardware that wanted to connect to IOS, but were not following one of the standard profiles (e.g. headsets), need to conform to Apple's proprietary MFI (Made for IOS) protocol. So the connection is established by the IOS system and then it allows apps to access this connection.
But now newer IOS devices support Bluetooth LE so the MFI restriction no longer applies. I think Sphero2B is going to use this. Current Sphero hardware probably doesn't support BT LE. My next question is ... does sphero hardware support BT LE? ... but I'm not going to ask on this forum:)
Android on the other hand allows apps to negotiate the connections to paired devices.
Here's a link with more info:
Some blog

How do I connect a Windows Phone device with an Arduino?

I want to capture distances from sensors, using an Arduino and a Windows Phone device. How can I do that?
The Windows Phone 7 SDK does not give access to the USB port or Bluetooth on the phone, so you can't use that. So I think the best way (and probably only way on Windows Phone 7) would be to communcate over Internet or local network with the Arduino acting as a server which the Windows Phone 7 app connects too.
Here are some examples of an Arduino web server and TCP server.
For the Windows Phone client I would check out either WebClient or sockets.
Windows Phone 8 SDK:
Consider establishing an App to Device communication through Bluetooth API which became available for developers in the release. Bluetooth App to Device application sample, available on MSDN, is the way to go.
There is another option in Windows Phone 8, using Proximity (a set of classes which works with NFC), which is more applicable for a short range communication.
As for Arduino, there is certainly a Bluetooth module.
Windows Phone 7 SDK:
No way to establish a peer-to-peer communication with a third party device. A workaround would be to connect them through a network, as was proposed by Johan.
I have actually made a Windows Phone 8 App that connects to an Arduino using the Sparkfun Bluetooth Silver Modem. Issues is, even after I get them connected, I can't get either the Arduino to receive the input OR I can't get the WP8 App to successfully send to the Arduino...
My GitHub for the project is: https://github.com/lanceseidman/Arduino-Bluetooth-WinPhone8
Hoping everyone can try and help on the project.
My Breadboard photos will be up soon and my Arduino Code.

Windows Phone 7 programming the use of the USB port

I would like to make a Windows Phone 7 application that takes advantage of it's USB port to communicate with the PC. I would like to write an application to control or push information/data to the PC from the application. But I am having problems finding information on where to start. Can anyone help point me in the right direction with some resources?
The only way to communicate over the USB connection is over HTTP.
To get this to work you'll need:
- a webservice hosted on the PC you're connecting to.
- a way for the app (on the phone) to know the hostname of the PC. (You'll probably need to enter it manually)
When you have these it should be straight forward.
You can't.
If you want to make sure to push data to a client PC, you will have to use a kind of synchronization by using the internet. For example create a wp7 application and a desktop application and let them sync the data based on a user object or anything like that.
As far as I know also the updated SDK for Mango will not support programming against the USB dataconnection.

Resources