How to get HDMI Port info from EDID block? - display

I am trying to get the HDMI port from the EDID data. So far I have taken the EDID data by connecting to different HDMI ports (say 1,2,3,4).When I compared the data, I can find the 0xAA byte of EDID data is varying for each port with the values 0x10,0x20,0x30,0x40 respectively. When I searched for the CEA-861-E details of EDID, the address oxAA is reserved field. Below is the link for CEA-861 specification I referred.
[http://electronix.ru/forum/index.php?act=Attach&type=post&id=77872][1]
So my question is, how to know the port ID for the HDMI from EDID data? Is my understanding based on my experiment correct?
Your suggestions are highly appropriated.
Cheers,
Gopinath

It can be found in the vendor specific data block. A "Vendor Specific Data Block" (if any) contains as its first three bytes the vendor's IEEE
24-bit registration number, LSB first. For HDMI, it is always 00-0C-03 for HDMI Licensing, LLC.
It is followed by a two byte source physical address, LSB first. The source physical address provides the CEC physical address for upstream CEC devices.
For more details, please refer the below post. http://www.bitsandqubits.com/2017/06/detecting-hdmi-port-id-from-edid-data.html

Related

what does bluetooth transmit when it is just visible

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

Bluetooth LE Advertising Packets: where to find the preamble, MAC address, and CRC?

Does anybody have the BLE Advertising Packet format that shows the relation (e.g. a hierarchy graph) among packet preamble, MAC address, and CRC fields? A graph that shows the length of bits for each field would be the best.
This is written in the Bluetooth Core
Specification https://www.bluetooth.com/specifications/specs/core-specification/ in the Link Layer chapter, section 2.1.
The advertising bluetooth device address is found in section 2.3.1.1 (ADV_IND).

how to find out which ioports be assigned to my devices

has linux reserved io port numbers for all manufactured devices.
I have devices like intel built-in network card. or another device I have for wifi (usb) from realtek.
On linux repository on github, device drivers use specific io ports to register. And kernel assign those ports to device driver. device drivers normally request for ports using call to request_region function. so for some ethernet device it requests like following
for (id_port = 0x110 ; id_port < 0x200; id_port += 0x10)
{
if (!request_region(id_port, 1, "3c509-control"))
continue;
outb(0x00, id_port);
outb(0xff, id_port);
if (inb(id_port) & 0x01)
break;
else
release_region(id_port, 1);
}
above starts with 0x110 to 0x200, any port can be assigned in this range by kernel to driver and appear in /proc/ioports file means driver is using that io port by the time of success return from request_region.
Question : So my question is has linux assigned io ports to all manufactured devices usable with kernel 5.7 or latest kernel version?
Question : What if I want to write device driver for any device. How can I find the io ports number range to request to. I dont not expect that I have to look into kernel code and find similer driver port range. so How can I find that io port number range. how to achieve this first step required in writing device driver (any device. be it wifi internet device or ethernet device)
Question : So my question is has linux assigned io ports to all manufactured devices usable with kernel 5.7 or latest kernel version?
No.
Question : What if I want to write device driver for any device. How can I find the io ports number range to request to.
You ask the user for it. After all it's the user who set them using jumpers on the ISA card.
Here's a picture of an old Sound Blaster card (taken from Wikipedia, I'm too lazy to rummage around in my basement now). I've highlighted a specific area in the picture:
That jumper header I highlighted: That's the port configuration jumper. As a user you literally connect two of the pins with a jumper connector and that connects a specific address line that comes from the card connectors to the circuitry on the rest of the card. This address line is part of the AT bus port I/O scheme. The user sets this jumper, writes down the number and then tells the driver, which number it was set to. That's how AT style I/O ports.
Or the driver uses one of the well known port numbers for specific hardware (like network controllers) that dates back to the era, where ISA style ports were still are thing. Also there's old ISA-P'n'P where the BIOS and the add-in cards would negotiate the port assignments at power up, before the OS even started. You can read those port numbers with the ISA-P'n'P API provided by the kernel.
We no longer use this kind of hardware in practice! Except for legacy and retro computing purposes.
Over a quarter of century ago, the old AT / ISA bus was superseeded with PCI. Today we use PCIe which, from the point of view of software still looks like PCI. One of the important things about PCI was, that it completely dropped the whole concept of ports.
With ISA what you had were 8 data lines and 16 address lines, plus two read/write enable lines, one for memory mapped I/O and one for port I/O. You can find the details here https://archive.is/3jjZj. But what happens when you're reading from say, port 0x0104, it would physically set the bit pattern of 0x0104 to the address lines on the ISA bus, pull low the read enable line, and then read the voltage level on the data lines. And all of that is implemented as an actual set of instructions of the x86: https://c9x.me/x86/html/file_module_x86_id_139.html
Now look at the PCI bus: There's no longer separate data and address lines. Instead read/write commands would be sent, and everything happens through memory mappings. PCI devices have something called a BAR: a Base Address Register. This is configured by the PCI root complex and assigns the hardware the region of actual physical bus addresses where it appears. The OS has to get those BAR information from the PCI root complex. The driver uses the PCI IDs to have the hardware discovered and the BAR information told to it. It can then do memory reads/writes to talk to the hardware. No I/O ports involved. And that is just the lowest level. USB and Ethernet happen a lot further up. USB is quite abstract, as is Ethernet.
Your other question Looking for driver developer datasheet of Intel(R) Core(TM) i5-2450M CPU # 2.50GHz suggests, that you have some serious misconceptions of what is actually going on. You were asking about USB devices, and Ethernet ports. Neither of those in any way directly interact with this part of the computer.
Your question per se is interesting. But we're also running into a massive XYZ problem here; it's worse than an XY problem; you're asking about X, although you want to solve Y. But Y isn't even the problem you're dealing with in the first place.
You're obviously smart, and curious, and I applaud that. But I have to tell you, that you've to backtrack quite a bit, to clear up some of the misconceptions you have.

In bluetooth protocol , what is the difference between LT_ADDR and LLID of L2CAP layer

I feel like both are used to identify logical channel that a physical channel is divided into. Is there any difference?
Short answer:
Both terms are relevant to Bluetooth Logical Links definitions.
LT Address is defined in Link Control; it is being used In the packet header.
In general, It allows a Bluetooth (BR/EDR) slave to determine that a certain packet was addressed to it.
LLID is defined in the packet payload header and is used to distinguish between:
ACL-C (Link Management Protocol) message
ACL-U (L2CAP - Logical Link Control and Adaptation Protocol) message
Detailed answer (all page references address the BT Spec 5.0):
LT Address is defined in the Bluetooth Baseband Specification and stands for Logical Transport Address.
It is defined in Link Control layer for the master to be able to address its various slaves within the piconet.
Each slave is assigned with a unique 3-bit LT_ADDR (page 390):
The primary LT_ADDR shall be assigned by the master to the slave when
the slave is activated. This is either at connection establishment or
role switch, when the primary LT_ADDR is carried in the FHS payload.
LLID term is defined in ACL-C and ACL-U (=> L2CAP) logical links:
It is included in the packet payload header to determine if a packet is ACL-C (LMP) or ACL-U (L2CAP):
ACL-C (page 398):
The ACL-C and ASB-C logical links are indicated by the LLID code 11b
in the payload header.
ACL-U (page 399):
For fragmented messages, the start packet shall use anLLID code of
10b in the payload header. Remaining continuation packets shall use
LLID code 01b. If there is no fragmentation, all packets shall use
the LLID start code 10b.
There’s another usage of the LLID term in context of Bluetooth Low Energy (LE) which is not covered here.
The Logical Link Control and Adaptation Layer Protocol (L2CAP) is layered over the Baseband Protocol and resides in the data link layer. It provides connection-oriented and connectionless data services to upper layer protocols with protocol multiplexing capability, segmentation and reassembly operation, and group abstractions. L2CAP permits higher level protocols and applications to transmit and receive L2CAP data packets up to 64 kilobytes in length.
Fig1: L2CAP architecture block
Link Controller (LC)
The standard data packet used at the LC level comprises an Access Code, Packet Header, Payload Header, Payload and CRC. This standard packet will be used to encompass data to and from the upper-layers of the protocol stack.
Fig1: Packet structure at LC
Packet Header
Header comprises of six fields LT_ADDR,TYPE,FLOW,ARQN,SEQN and HEC
LT_ADDR (Logical Transport Address) : LT_ADDR comprises of a 3-bit field, which denotes an active slave within a piconet (Note: that the master is not assigned a LT_ADDR).
Payload
LLID (Logical Link Identifier) : Within such logical transports, the logical link is identified by the LLID bits in the payload header of baseband packets that carry a data payload.
Ref :
BLE5-Stack User's Guide
Developing Practical Wireless Applications
Bluetooth Specification - Vol 0

bluetooth module HM-15 and Arduino scanning for iBeacons

I bought a HM-15 BLE bluetooth module and successefully connected to Arduino. I am able to sent At commands and I would like to use it for scanning for iBeacons and get their major and minor.
Using AT+DISC? I can see the beacon address but I cannot connect to it and now I am stuck on how to retrieve major and minor
Can you help me? Here is the datasheet of the module:
http://www.elecrow.com/download/bluetooth40_en.pdf
Thanks
Bluetooth beacons do not require a connection and you read the identifiers directly from the advertisement.
Read section 19, Start a discovery scan, and learn how to read and decode the bytes in the discovered peripherals. The exact byte layout varies for different beacon types. For AltBeacon, an open source beacon variant, you can see the byte layout here: https://github.com/AltBeacon/spec
To decode a proprietary beacon format, you will need to learn how that beacon layout differs from the example linked above.
Old question, but just for the record, you can use AT-DISI?
This will scan for beacons, including iBeacons and also AltBeacons. The response from HM-10 will include RSSI for each.
PS: I'm assuming HM-15 and HM-10 operate the same way. Probably not exactly a fully reasonable assumption.

Resources