Is there a list of existing, assigned UUID prefixes that would permit me to e.g. recognized that all devices whose UUID begins with 2a299aae are Foobar Inc device?
While there is a mapping of sponsorship for Bluetooth SIG member requested "short" or 16 bit UUIDs, this mapping is related to services rather than hardware devices. I.E., an Intel sponsored UUID does not necessarily mean the device is an Intel device; only that it is using an Intel defined service or protocol.
This link should help (living document):
https://www.bluetooth.com/specifications/assigned-numbers
Related
I develop Linux netfilter kernel module and need retrieve vendor information of network card, something like:
"Intel Corporation 82579LM Gigabit Network Connection"
or
"Intel Corporation Centrino Advanced-N 6205"
I have available net_device structure. Is possible to retrieve such description from net_device in kernel ?
The answer is no.
This can be done from userspace only, the kernel does not keep such information. However, you can retrieve the vendor id and product id of the device. For that, you need to know more about the PCI subsystem. And the combination of vendor id and product id, sometimes with subvendor and subproduct id, determine the device identity.
Wanted to know how a device is detected in Linux? What exactly is the workflow of the device driver in device detection?
It is the Kernel's job to detect devices as it has the lowest level access to the available hardware. When the Kernel scans through all available addresses it maintains a list of Vendor and Device IDs.
To use PCI bus devices as an example, there is a Vendor ID and a Device ID associated with all PCI devices.
Device drivers are written in such a way as to identify to the Kernel what kinds of devices the driver is able to control. Drivers may advertise that they can handle more than one vendor and device type combination.
The Kernel will allocate a driver to each device based on these IDs. A similar process is in place for USB devices. Older technologies like legacy devices (serial ports, parallel, ps2 mice/keyboards) will have explicitly hardcoded methods of associating particular drivers with devices.
You can use the Linux commands lsusb and lspci to see the available devices and IDs on your system.
So in direct answer to your question - the device driver usually does nothing to detect the device, at least in the first instance. Once the driver is associated with a device (by the Kernel) the driver will likely do further interrogation of the device to ensure it contains the right firmware or is the right hardware revision, etc.
In iOS 7, I am writing a core bluetooth app to get advertising packets from a series of peripherals. Each peripheral has an unique UUID in its advertising packet and is shown in the LightBlue sniffer app.
When I detect the peripherals in a central manager it assigns an UUID that is different from the UUID in the advertising packet.
According to the docs:
"The first time a central manager discovers a peripheral, the system assigns the peripheral a UUID, represented by a new NSUUID object. Your app can store this UUID and later provide it to a central manager for use in retrieving this specific peripheral. Peripherals are identified by NSUUID UUIDs instead of by the CBUUID objects that identify a peripheral’s services, characteristics, and characteristic"
Why does it do this?
Can I read the real peripheral UUID without connecting to the device?
How?
I think there is no such thing as a "real peripheral UUID". My understanding is that UUID (for the device/peripheral) is an Apple-specific concept, not a BLE concept. Take note of this discussion:
Corebluetooth, How to get a unique UUID?
OTOH, it appears that BLE devices do hold a IEEE-defined, unique MAC/BDADDR address. I was looking for a way to deploy platform-independent, static configurations of BLE devices. I was getting discouraged (Apple's UUIDs being +/- meaningless, and the MAC/BDADDR which can be obtained on most/all other platforms not being accessible from CoreBluetooth). Fortunately, I noticed that the "Device Information Service" profile (0x180A) contains a "System ID" attribute (0x2A23) which encodes the device's unique MAC/BDADDR address. I don't know if it is mandatory for a BLE device to expose this service, however.
As you can see from the specification System ID is optional in the Device Information Service
Link https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.device_information.xml
And in fact DIS itself is also an optional service, e.g. The Environmental Sensing Profile defines DIS as an optional service.
Is it possible to identify a USB device by a unique identifier like an Operating system has Mac-ID, Harddisk ID, Ethernet card ID has unique identifiers? I know one can easily change the volume serial number of USB partition or it could be changed when user Formats it.
But is there an ID some kind of 'USB Harddisk ID or USB Hardware ID' which could be retrieved via MFC's (Visual C++ or C#) using the WMI Service? Will such an identifier be unique to the physical device? Kindly clarify...
The closest equivalent of a "unique number" available in any USB device is the VID and PID, the vendor and product IDs. It is used to identify the device and install the proper driver for it. However, it is the same set of numbers for the same product, it is not good enough to identify the particular device you have in your hand. And thus useless to implement a license verification procedure, presumably what you are after.
Only certain kind of USB devices implement a serial number. You get it by accident from a flash drive due to the drive formatter generating a volume serial number. Useless as well, it can easily be changed. A USB wifi adapter could work, the manufacturer must generate a unique MAC address.
There's one class of USB devices that are perfect for this goal. The generic name is "dongle", they are made for this. When you buy one you also get software that you can link into your program that provides a tamper-proof way to verify the license number, another important part of a license verification procedure and usually the weak link. More about dongles in this Wikipedia article.
how can the bluetooth server identify the discovered clients - get the type of them, for example, that discovered device is blackberry or iphone device?
You can use device address to find out the manufacturer. The list for lookup is here: http://standards.ieee.org/regauth/oui/oui.txt
Bluetooth devices use a Class Of Device, which is returned when one Bluetooth Device performs an inquiry to find what other devices are around.
Typically, the Bluetooth Inquiry function (depending on API) can be configured to search for a specific Class of Device and return only the results that match that.
The Class of Device value is a 3-octet value. Top 11-bits indicate the Service Class (Information, Telephony, Audio, etc..), 5-Bits for the Major Device Class, (Computer, Phone, LAN, etc...) and 6-bits for the Minor Device Class, which depends on the Major Device Class for interpretation.
The enumerations for the Class of Device values can be found from the BlueTooth website (login required) https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm
Using this you can narrow down that the server is connecting to a Phone (Major Device Class), specifically a Smart Phone (Minor Device Class). But after that, how to determine the make and model is probably specific to that device e.g. in the Device Name or in a custom field in an Extended Inquiry Response. I don't think there is a (Bluetooth) standard way of doing it.