Lets say I have a device which my cell phone can connect to via bluetooth (it can be any device on the market...)
For being able to connect this device using a J2ME application on my cell phone, I need to discover the device first, and then discover the service which the device lets cell phones connect to.
My problem is that I don't know how to discover that service.... the device is being discovered with no problems by the J2ME application, but for discovering the service of this device, I need service's UUID and Attributes (J2ME API requirements), which I have no idea where and how to get.
Does anyone know how can I still connect the device's service using a J2ME application, without knowing service's UUID and Attributes ?
Thanks!
As far as I know, there is nothing in the API to directly do "remote service discovery", but I found this, which I think is about that:
Service discovery allows you to find
nearby services, regardless of what
devices are offering them.
DiscoveryAgent provides methods to
discover services on a Bluetooth
server device and to initiate
service-discovery transactions. Before
a service can be discovered, it must
first be registered or advertised on a
Bluetooth server device. The server is
responsible for a number of things,
including creating a service record
that describes the service offered,
accepting connections from clients,
and adding a service record to the
server's Service Discovery Database
(SDDB). In general, it works like Web
services.
Related
I have an IoT device which I wish to implement:
A mobile app - where the phone is the master when communication is initiated by the user's phone
A remote key - where a click on said key should make the iot device do something. The remote key should be paired one time with the iot device.
Now, the issue that I'm experiencing is that I can not communicate with both. I would like to enable connection with the mobile app at all time, but I would also like to listen for a click on the remote key at all time (unless I'm connected to the app).
What would be the best architecture for such communication? Who would be the master and who would be the slave? Should I use a beacon device for the remote key? What's the best practice here?
Depending on the BLE stack, a device can certainly be a Central and a Peripheral at the same time (the use of 'Master' and 'Slave' is inaccurate here).
If I understand correctly, you have 3 devices - a phone, a key, and an IoT Device. There are several options here:
Phone is Central, and is connected to both Key and Device as Peripherals. A click on the Key will notify the phone, which in turn will send some message to the Device. Pros - easy pairing. Cons - the phone app must run all the time.
Phone is Central, Key is both Central and Peripheral, Device is Peripheral. Phone connects to the Key Peripheral, Key connects to the Device as Central. Pros - Key controls Device even with no phone. Cons - probably harder to setup and pair Key with Device (depends on their I/O capabilities)
I didnt have any idea what Azure IOT is. My manager told me that IOT is a new thing and we can replace IIS with Azure IOT but I couldnt find any such information. According to many articles I read and as per my understanding, IOT is used for duplex communication between the devices and services in a cloud environment.
Can anyone explain about Azure IOT nicely? Does it replace IIS? We want to move our product from normal servers to Azure Cloud servers. Do we still need IIS or IOT is there to replace it?
As always, it depends. If your current website is a gateway to communicate with IoT devices (IoT stands for Internet of Things, think temperate sensors, light sensors or more advanced devices) then it could. Otherwise I really doubt it.
Azure IoT is a managed service that allows device provisioning, device to cloud and cloud to device communication. It does not allow for hosting user interfaces like IIS does.
The most probable thing to do is to move to Azure Web Apps, which is basically IIS as a service. (There is a lot more to it obviously!)
And you definitely need to talk to your manager. Hearing the latest buzz words without knowing enough to be able to place them in your context can do a lot of harm.
I have a ChromeCast device that I use for development. I have whitelisted the device and have received an AppId.
I am also developing an application for another company. Does the whitelisting support multiple AppIDs per device? Should I have them add my device to their whitelist request, or should I update the URLs associated with my AppID to the other company's receiver url(s)?
If you want to share your device with them, you can request for more app-id/urls to be added to your device. Obviously, if you want them to use their own device, you need to get the serial number of their devices to whitelist theirs for your app or have them whitelist directly.å
I currently designing a solution for communication between a Charge Point for Electrical Vehicles and the backoffice. the ChargePoint are connected to the Network of the Telephone company and the backoffice is hosted on Azure. The Chargepoint don't have a public IP-address. In order to send messagese from the backoffice to the ChargePoint we want to implement Azure Service Bus (ASB) Relay. The ChargePoint OS is embeded Linux and Azure is Microsoft. The ASB Relay only works with WCF bindings. I found out that mono supports WCF but cann't find if it supports httpRelayBinding?
what kind of communication are you looking for between the device and service? If you need Relay like two-way or one-way synchronous RPC communication then you could use a simple http client to call into the service, a sample for this is here: http://code.msdn.microsoft.com/windowsazure/Relayed-Messaging-Bindings-a6477ba0
Also if you are looking for different patterns of communication such a brokered messaging where you can send/receive messages w/ data then you can consider using Service Bus Queues and Topics. I recently covered some of these usage scenarios in my session at TechEd: http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/WAD-B336
I am working on a Windows Phone 8 app which is connected to Azure Service Bus Relay. Since i cant add Microsoft.ServiceBus.dll to the WP8 project, I had to go with BasicHttpBinding which works fine.
Now I want to use the service bus relay with topics in WP8. Is this even possible? I cant use NamespaceManager which is discussed here: http://www.windowsazure.com/en-us/develop/net/how-to-guides/service-bus-topics/ , because its not supported by WP8.
My question is simply, is this possible to do? And what approach should i choose?
We do not have any libraries that target Windows Phone at this point but are working on producing these. You can make direct http calls to the REST APIs and send/receive messages etc. Samples for these are available:
http://code.msdn.microsoft.com/windowsazure/Brokered-Messaging-569cff88
https://github.com/WindowsAzure/azure-sdk-for-java/tree/master/microsoft-azure-api/src/main/java/com/microsoft/windowsazure/services/ServiceBus
http://msdn.microsoft.com/en-us/library/hh780762.aspx
Zeezer,
"Now I want to use the service bus relay with topics in WP8"
Not sure if you are conflating two separate issues...
We do not have an SDK for Service Bus Relay for the Windows Phone. However, if your service is using any of the *HttpRelayBinding's, you can use a regular HTTP client from the Windows Phone app to communicate with the Relay endpoint for your service. You will need to include the ACS token for authenticating to Service Bus Relay in a custom HTTP header called ServiceBusAuthorization.