Connect Bluetooth device to an unknown device - mobile

Is it possible to connect a Bluetooth device to an unknown device? I thought all Bluetooth devices had to be paired with another Bluetooth device before they could be used together. Someone mentioned a possible application where a Bluetooth device (most likely a Windows Mobile phone as the iPhone SDK doesn't support Bluetooth connections) can be used to say read electric meters in a given area. I thought the phone would have to be paired with each meter before any other communication could take place. Is this correct? Can the phone receive arbitrary data from a Bluetooth provider before they are paired?

You don't have to have security set up (no pin code) so you could have a bluetooth device that is always discoverable and will always connect/pair. So this could be used for the 'read a meter' type application.
Also, in Bluetooth 2.1, you have Extended Inquiry data so you could get the meter reading by having the meter encode the reading into the Extended Inquiry response. Then you don't even have to connect/pair. Just have a device that does an inquiry and gets the data that way.
There are some new standards coming for BlueTooth for Low Energy devices that would basically act like sensors, which are specifically targeted at this type of application.
There is more info then you could possibly want at www.bluetooth.org

If you know the MAC address of a bluetooth device and it is connectable you can talk to it directly.

Related

Finger print scanner with webusb

Is possible to connected/paired usb finger print scanner with webusb (https://wicg.github.io/webusb)?
I have digital persona U.are.U 4500 and want to connect to browser (chrome) with react.js and get image file and can compare image
WebUSB is a generic API for communicating with USB devices and so supporting any particular device requires knowledge of the data protocol used to communicate with the device. Manufacturers may or may not provide public documentation for this protocol and so it is often necessary to reverse engineer it by observing the communication between the device and a closed-source driver. In the cases where an open-source driver is available then that can be a reference for building a Javascript application to control the device.
In the case of the DigitalPersona U.are.U 4500 it appears that the open-source libfprint library includes a driver for this series of devices: https://gitlab.freedesktop.org/libfprint/libfprint/blob/master/libfprint/drivers/uru4000.c
This would be a good starting point for understanding how to communicate with the device.

Communicating with a Bluetooth device from UEFI code

Is it possible to communicate with a mobile device supporting Bluetooth LE from UEFI of a system? UEFI specification 2.6 adds support for Bluetooth but I dont see any new laptops supporting it and also the specification doesnt say anything about Bluetooth LE.
This feature is possible. However, its not related to UEFI Mode but this feature has to be embedded into the bluetooth chip itself. This feature is generally known as Headless mode of Bluetooth Chip.
The Bluetooth chips contain two firmwares. One firmware for general BT functionality and the other firmware contain a lite Bluetooth stack which contain a very cut down version of Bluetooth stack which can support BLE feature. So, when your laptop either gets shutdown or goes to sleep, your BT chip goes into headless mode and start advertising itself to other BLE device. Other ble device like mobile can see this and can connect to it and start your laptop.
This feature is however, not present in any laptop known to me. But you find a good example of this in Samsung's smart TV. You can switch on your TV from samsung mobile using ble.

NFC Payment : mobile as reader and emulated card

As I understand NFC offers three modes of operations :
Reader/Writer mode :
Reading/Writing of/to NFC tags. (Coupons, SmartPoster tags)
Card Emulation mode (using the Secure Element):
Virtual cards are stored in Secure Element (PayWave, PayPass).
Peer-to-Peer mode:
Communication between two NFC enabled active devices used in contactless services ticketing, money transfers or lower security access control applications
more: About NFC
Is it possible to combine these modes, and have NFC transactions between two phones, one as an emulated card in a secure element and the second as the reader POS? all informations about the subject is appreciated
Thank you.
Yes, what you are after is possible. What you refer to as card emulation mode, is commonly associated with the term digital wallet. In this case, the phone behaves like an EMV enabled payment card and transmits the necessary signals using the phone's NFC hardware.
On the other end of the spectrum is a reader. This reader can be another phone, or can be a typical merchant terminal that you see in retail locations. As long as both parties implement the standards properly, the data exchange can occur.
The merchant terminals however typically have stronger range than the sensors found in phones, so a payment at a merchant terminal is a bit easier to execute. As new phones come out, they tend to have better NFC antennas embedded in them however (for example comparing Nexus S with S4), so hopefully this gap will close. The EMV standards dictate a 5cm range for a reader to be compliant, though I've stumbled across many readers that don't have that range.
As you have guessed probably, I'm familiar with this space. I'm a cofounder of Triangle.io and what we do is to allow you to use any Android device as a reader for free. You can learn more about our API at http://www.triangle.io if interested. To go back to the question on hand, you can use one phone in card emulation mode, and on the other, you can use our API to read the other phone's emulated card. The phone emulating the card needs to implement the EMV specifications properly.

Reading from usb as a comport

I'm quite a beginner in the embedded world, since I'm always at the "other side of the wire" as a SW engineer so please don't crucify me for a question that might seem silly.
When I'm working with a Bluetooth device that connects to the computer, it is usually presented as a virtual COM-port which I connect and read the data from using winapi. Now our embedded engineer presented me a device that sends the same data through a USB cable which also presents as a virtual comport at my system which I read the same (meaning, for me it is completely transparent).
Now I wonder, in any other devices that use a USB connection, I don't see the device as a comport (like a mouse, or a keyboard), yet the info is sent. Why there is a need in a comport in this case, and what other reading options available?
You should read some basic USB information.
The difference you've noticed is because USB supports something called "device classes", that basically control how the computer (the host) views the device.
One such class is "USB communications device" which often becomes a virtual COM port, for instance.
Another is the very commonly seen "USB mass storage device" which is what e.g. flash drives use.
A third is the one you mention for mouses and keyboards, which is called "USB human interface device".
Which class a particular device uses is communicated when it's first connected on the bus, so that the host can load the proper driver. You cannot magically force a device to switch classes, the class is typically a "hard" (non-modifiable) part of the device's implementation, chosen by the designers of the device.

Arduino computer mouse/input device

I have successfully talked to the computer from an Arduino via serial USB port and I had the idea that I could make a keyboard or mouse with the arduino. Say I wanted to translate the computer's mouse 1 pixel to the left. What message would I have to send over the serial line in order to achieve this?
Google is a wonderful thing. "use arduino as mouse" returns 1.7 million hits. The third hit on the list takes you to the Arduino Playground for an example using the new Leonardo board.
Note:
The Leonardo differs from all preceding boards in that the ATmega32u4 has built-in USB communication, eliminating the need for a secondary processor. This allows the Leonardo to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port.
Assuming you don't have that board, here is another site for some other specific boards and yet another that is log for a project including hardware and software for older boards.
Hope this helps (and is a better answer to the question).
You would have to reconfigure the USB interface chip to appear as a USB HID endpoint.

Resources