Web page beacon - web-bluetooth

I would like to send a BLE Eddystone beacon from a web page. My application requires to send SSID info to a BLE listener. My thought is to have a user load a URL on a smartphone that would run JS to send periodic BLE Eddystone-UID beacons with SSID info embedded. I need the web page to work on both Android and iOS phones. Is there a simple way to do this using Javascript?
I looked into physical web but it did not seem to provide this capability.
thanks,
Ian

The current version of the Web Bluetooth API specification allows websites, running in the Central role, to connect to remote GATT Servers over a BLE connection. What you're looking for is a way to run in the Server role to advertise your data.
In your case, I'd recommend you have a look at https://www.npmjs.com/package/#abandonware/bleno

Related

Sonos control api: polling rate & subscription

We are controlling the sonos via a small IOT device. This device will be placed at the homes of our customers.
In our home automation system we need to know the playbackstate + volume of the players/groups.
At which polling rate can we ask these parameters ?
We cannot use a cloud server to handle the subscription events.
I tried to put a https webservice in the IOT device with a self signed certificate but this doesn't work.
After I have posted the subscription I get a request in my webservice but the cloud sonos server disconnects immediately.
Probably because of the certificate is self signed - Or can there be another reason ?
Is there another way to recieve status events ?
During discovery In the players Json object there is a key 'websocketUrl'.
The documentation says "The secure WebSocket URL for the device. See Connect for details".
But I cannot find more info about this.
Can this be used ?
At which polling rate can we ask these parameters?
Consider using subscriptions instead of polling. See this answer for more: https://stackoverflow.com/a/60893119/4902948
We cannot use a cloud server to handle the subscription events...
Or can there be another reason?
Is there another way to [receive] status events?
You must host a service that satisfies a set of requirements to receive events. See this answer for more: https://stackoverflow.com/a/57189717/4902948
Also see Details on API credentials and events in New features in versions 11.1, 11.2 (S1), & 12.0 (S2).
Can [the 'websocketUrl'] be used?
This is not publicly available for use.
It would be a lot easier to use the (undocumented but more useful) UPnP APIs. You could simply Subscribe to the UPnP RenderingControl endpoint, then you will get an event every time the volume changes. To find when the track changes, subscribe to AVTransport endpoint.
You can do this with a local server (this is how every Sonos app works after all) and no special cert requirements either.
UPnP events are described in the UPnP spec.
Your question doesn't provide details about the language you're using, but if the device is powerfull enough to run node, you have a good change with my sonos library.
You can just pull the required information from the device as often as you like. Or use the build-in event subscriptions. If you use the events, it will automatically setup an http listener and automatically subscribe to all the events you're listening for.
Events are instant (as in 50ms-100ms after the event took place on the device).
If you request information it is send directly to the device and the device will respond with the answer. Pulling multiple data points per second has never been a problem to me.
Warning as stated above, this uses the undocumented local UPNP api, but since their own app also uses it, I'm guessing that won't change soon.

Codename one NFC Integration

There's a way from Codename One to provide access to Near Field Communication (NFC) ?
Anything new, out this post codename-one-nfc-beacon?
NFC is an Android only API and even there the availability in devices is "problematic". In iOS it's restricted to payment so there is no access to the underlying hardware. So there is no point in supporting the API in a framework that is designed for cross platform. I'm sure you can create a cn1lib similar to the fingerprint reader API or the SMS intercept API.

Does Google nearby message API needs Internet connection to work?

Hi I want to create an app using google nearby message api. I want it to be completely offline.
Is it possible? Does google needs internet connection for using this Nearby api?
I know it uses bluetooth and WIFI things to share the data!
I want to know whether it needs internet connection at its initial stage? since it needs to retrieve some token from the cloud.
Help me in this!
Thanks in advance!
Yes, Nearby Messages requires devices to have internet access. Discovery is accomplished via BLE (Bluetooth Low Energy), WiFi, and audio (using near-ultrasonic frequencies), but the cloud is needed for message delivery after discovery. Nearby doesn't yet provide a pure peer-to-peer solution.

Send data from WP7 phone to PC via USB cable

I’d be interested in show data from wp7 sensors on a PC screen. Is it possible to send data back to the PC via the USB cable?
When the phone is plugged in via USB it appears as an Ethernet network connection to the device. This means it is easy enough to send data back to a service running on your machine using standard HTTP calls.
This is easily done by setting up a simple web service on your PC and generating a WCF proxy around it in Silverlight. You can then simply use it as you would any other web service.
If you are looking for lower level serial access to the USB itself, then unfortunately no the phone APIs don't expose that functionality.

Cisco IP Phone Call Manager handle events

I'm new on cisco IP Phones.
I have a cisco call manager system also a 7970 Ip phone.
The phone cominicates with Cisco Call Manager application.
I want to listen events when user logon and send some commands to phone.,
Is there any idea about this task?
Is there a way to got events from cisco call manager or I have to listen up the ports of IP phone?
Cisco JTAPI is the best API to perform 3rd party call control and get events about IP phone state. You'll write an application in Java that uses the Cisco JTAPI jar. This api will let you subscribe to a specific phone and you'll be able to get events like OnHook, OffHook, Connected, Disconnected, etc.
JTAPI is fairly complicated. Cisco has a product called Cisco Unified Application Environment that can help simplify the development task. It isn't free, however.
Is the phone registered as SIP phone or SCCP phone .
Traces from the call manager are the best way of finding out what is happening in the sytem.
You can also look for packet captures on the phone in those captures you can see SCCP events and SIP events
for example you can see events like
SIP INVITE , OK , BYE..etc.
apart from this call manager traces SDI and SDL traces for "call manager service" will give you whole lot of information you need.
This link will help you take traces in call manager:
http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_tech_note09186a0080094e89.shtml

Resources