OFFICIAL BLE SPEC STATES:
If System ID generated based on a Bluetooth Device Address, it is required to be done as follows. System ID and the Bluetooth Device Address have a very similar structure: a Bluetooth Device Address is 48 bits in length and consists of a 24 bit Company Assigned Identifier (manufacturer defined identifier) concatenated with a 24 bit Company Identifier (OUI). In order to encapsulate a Bluetooth Device Address as System ID, the Company Identifier is concatenated with 0xFFFE followed by the Company Assigned Identifier of the Bluetooth Address.
Question:
If a device's BDA is 12:34:56:9A:BC:DE, then what is the correct format for System ID?
0x123456 FFFE 9ABCDE or
0x563412 FEFF DEBC9A or
0xDEBC9A FFFE 563412
Thanks
Related
I want to know what does bluetooth transmit when it is just visible, not connected. I googled , I saw it transmit name of the device and mac address but just them ? Can we add some extra datas or can we change them dynamically ?
For classic Bluetooth (i.e. pre Android API level 21), you are restricted with the data that you can send in the inquiry response (which is connection-less data sent over the air). There are three types of inquiry response data that can be sent over the air:-
Inquiry Result:-
Inquiry Result with RSSI:-
Extended Inquiry Result:-
In other words, depending on what the scanning device asks for, the result can be different, and even though in all cases it is not just name and mac address, you cannot add just random extra data to the inquiry response.
For Bluetooth Low Energy (i.e. Android API level 21 and later), advertising data can be dynamic and can be configurable. The minimum advert report can only contain the device's Bluetooth Address (either the public or the random address). In other words, even the name of the device is not a requirement. However, it is usually common to include both the address and the name as this gives more information about the advertising device.
You can read more about this in the Bluetooth Specification v5.2, Vol 6, Part B, Section 2.3.1 (Advertising PDUs). Also have a look at the links below for more information:-
Is a BLE advertisement required to provide a non-empty local name
How BLE works: advertisements
BLE advertising primer
I was trying to figure out the BT Address of a device and then got in trouble while finding that it follows IEEE 802-2014 standard as well as MAC Address hence which is the difference within MAC Address and BT Address:
Can a phone device (let's say) have BT Address and MAC Address?
If so which would be the impact of having either same MAC Address or BT Address within 2 devices?
Bluetooth addresses are indeed drawn from the same space as the MAC addresses you might be more familiar with -- those on Ethernet adapters or 802.11 WiFi interfaces. In order to assign an address to a Bluetooth interface on say, a phone, the manufacturer must purchase the right to do so from the IEEE in the same way that they must register some portion of the space to assign MAC addresses to 802.11 interfaces. Because of this, it's common to say "Bluetooth MAC", at least in my own experience. The Bluetooth Core Specification says this:
The BD_ADDR shall be created in accordance with Section 9.2 (“48-bit univer-
sal LAN MAC addresses”) of the IEEE 802-2001 standard (http://stan-
dards.ieee.org/getieee802/download/802-2001.pdf) and using a valid
Organizationally Unique Identifier (OUI) obtained from the IEEE Registration
Authority (see http://standards.ieee.org/regauth/oui/forms/ and sections 9 and
9.1 of the IEEE 802-2001 specification).
If a phone has both a Bluetooth and 802.11 chipset, it must have unique hardware identifiers for both. In practice, what I have seen is that manufacturers will assign MAC address X to the 802.11 interface, and MAC address X+1 to the Bluetooth interface on the same phone or vice versa; for example, WiFi MAC 00:11:22:33:44:00 and Bluetooth MAC 00:11:22:33:44:01. There's nothing stating that they must do this, but it seems to be a pretty standard way of divvying up their IEEE allocations.
I'm building a USB HID device using Arduino Leonardo mini clone, based on ATmega32u4. That particular IC has got a USB controller built in, and turning it in to a HID device is simple. You just need to include Keyboard.h and then use Keyboard.print...
Where can I set/define the name of the device that is shown, when that Arduino is connected to a PC, because at the moment it is named Arduino Leonardo.
The default automated name for tty is usbmodemHIDP1.
In system preferences, I can see:
ID product: 0x8036
ID vendor: 0x2341
Wersion: 1.00
Serial number: HIDPC
Speed: do 12 Mb/sek.
Vendor: Arduino LLC
ID location: 0x14200000 / 16
So where in Arduino is file Keyboard.h? Can I change that name, or ID's?
Is it possible?
Because in my opinion it should be, but I just can't find the right place, and I do not have experience with Arduino AVR as I was working with Microchips Mplab X before for different ICs ;).
The "iProduct" string sent by the board on enumeration tells the operating system to give it the human-readable name. The value of that string is set near the top of USBCore.cpp in hardware/arduino/cores/arduino/. It's a Unicode string, so we need looking for 'L', 'e', 'o', 'n' [...], not "Leonardo". The string used depends on the PID number of the device (also sent during enumeration) which is given in boards.txt.
For distributing own custom hardware based on the Leonardo, there is a need to provide your own VID.
Also there can be used alternative firmware.
The Arduino '32U4 bootloader, Caterina, can be found under hardware/arduino/bootloaders/caterina. It requires LUFA in order to build.
Can someone tell me the difference between Mac Address and Bluetooth Address in a BLE device?
Do they both have to be unique?
I've read that changing the bluetooth address affects the mac address?
Is it possible to have a different bluetooth address, but the same mac address?
What you are referring to Bluetooth Address is what more popularly known as static address which is a randomly generated address while the MAC address is unique and public.
The MAC address is created as per the IEEE 802-2001 standards in accordance with section 9.2: "48-bit universal LAN MAC addresses". They have a valid Organizationally Unique Identifier (OUI) obtained from the IEEE Registration Authority.
The MAC address is divided into the following two fields:
company_assigned field is contained in the 24 LSb.
company_id field is contained in the 24 MSb.
Whereas, A static address is a 48-bit randomly generated address created considering these requirements:
The two most significant bits of the static address shall be equal to ‘1’
Not all bits of the random part of the static address shall be equal to ‘1’
Not all bits of the random part of the static address shall be equal to ‘0’
I need to read serial number of MiFare card usin WinSCard. I am able to read 7B UID from the MiFare card.
The confusion is that i dont know if the UID and the serial number of
MiFare card are same?!!
I have googled the issue but only could get partial success. I found a question on stackoverflow also but it did not help.
I found a document of NXP online which says UID and serial number are different. (on page number 3, line number 5)
There is an application of OmniKey that reads the serial number of the card, and it also returns UID only.
NXP documentation says UID <> Serial Number and a other standard OmniKey application returns UID as Serial Number.
I have started pulling my hair off on the issue. I'd greatly appreciate if anyone could help.
Each smart card contains an integrated chip with a unique permanent identification (UID) number burned-in during the manufacturing process. This UID is often referred to as the Card Serial Number (CSN). The card serial number is not encrypted and any reader that is ISO compliant can read the card serial number.
Edit 1:
Mifare Card Serial Number is the unique identifier defined in ISO 14443-3A. There are 3 types of UID defined in the standard - single (4 bytes), double (7 bytes) and triple (10 bytes). Only in first versions of the Mifare card, the UID was 4 bytes but now have migrated to 7 bytes.
EDIT 2:
It might be helpful to you...
What is the difference between a 4 byte UID and a 4 byte ID?
A 4 byte UID is an identifier which has been assigned by the card
manufacturer using a controlled database. This database ensures that a
single identifier is not used twice. In contradiction, a 4 byte ID is an
identifier which may be assigned to more then one contactless chip over
the production time of a product so that more then one card with the same
identified may be deployed into one particular contactless system.
The differentiation in this case comes from the fact that a "Serial Number" implies that the numbers are a series, thus sequentially assigned.
MIFARE cards have Unique Identification Numbers (or in short UID), which are generated by an internal rule which is not necessarily sequential. This means that if you see a card with UID 01020304050607 it does not mean that there are at least that many cards produced so far.
If you ever see someone referring to the Card Serial Number, they are in fact referring to the UID.
The only last confusion can come from the fact that MIFARE cards can be configured to return Random IDs during activation. If that is the case, you would get different "UID" each time you activate the card. In that scenario you need to read the data contained in Block 0 (for which you will need to know the key to sector 0) to get the real UID of the card.
For DesFire cards:
UID is analogous to ethernet MAC address. It is assigned by the chip
manufacturer from a database. Everyone who creates applications for
the card has access to the UID.
The Card Serial Number is specific
to the application loaded on to the card. It can only be accessed by
that application via an encryption key. If the card had several applications loaded on to
it (unlikely but possible), then each could have a different CSN.