<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.faked.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jan</id>
	<title>fakedWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.faked.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jan"/>
	<link rel="alternate" type="text/html" href="https://wiki.faked.org/Special:Contributions/Jan"/>
	<updated>2026-05-30T22:58:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=474</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=474"/>
		<updated>2021-01-02T20:09:09Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;br /&gt;
&lt;br /&gt;
I did all of my testing using a bench power supply that provided exactly 5V, while also showing me how much current is being drawn, but when i moved the setup to the power supply i bought for this project, at least 2 of my ESP8266 died over night, and i was completely clueless why this was happening (as opposed to those that died with a puff of magic smoke, where it was rather obvious that something was wrong).&lt;br /&gt;
While replacing the old relay that didn&#039;t quite latch anymore after the last visit of the magic smoke monster, i used my multimeter (Aneng AN8009 - very cheap, but quite good!) to measure the voltage that was being delivered through the relay, and noticed that the power supply&#039;s output voltage was at a rather high 5.4V instead of the 5.0V i was looking for. While genuine Wemos D1 Mini boards are hard to come by, and may tolerate voltages higher that 5V, i highly recommend using that multimeter to dial the output voltage of the power supply down (or up) to something as close as 5.0V as you can.&lt;br /&gt;
&lt;br /&gt;
(At the time of this writing, the ESP8266 i&#039;m currently using with the proper voltage hasn&#039;t died yet - but i&#039;ll update this page if it turns out to be something other than overvoltage.)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
Now that the hard part of the build is done, let&#039;s go over the software i&#039;m using:&lt;br /&gt;
* [https://github.com/Aircoookie/WLED WLED]&lt;br /&gt;
* [https://github.com/hyperion-project/hyperion.ng Hyperion]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.abrenoch.hyperiongrabber&amp;amp;hl=en&amp;amp;gl=US Hyperion Android Grabber]&lt;br /&gt;
* [https://www.boxpirates.to/index.php?thread/206406-plugin-enigmalight-ambilight-f%C3%BCr-enigma2-receiver-oe1-6-oe2-0-oe2-2-oe2-5-dreamb/ Enigmalight]&lt;br /&gt;
&lt;br /&gt;
The star of the show is WLED. It receives data from Hyperion on my OSMC Vero 4K+ (my mediacenter running Kodi), from Hyperion Android Grabber on my Nvidia Shield TV Pro (which i use to stream games from my PC) and from Enigmalight on my VU+ Uno 4K SE (basically &amp;quot;just&amp;quot; cable television, on steroids).&lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
As WLED doesn&#039;t allow exporting its config (yet), here are the most important settings i changed from the stock setup:&lt;br /&gt;
* Wifi Setup: SSID &amp;amp; Key already set in the image i uploaded, so nothing to change here for me, but have a look at the [https://github.com/Aircoookie/WLED/wiki WLED wiki] how to connect to a stock image.&lt;br /&gt;
* LED Preferences: LED count = 298, Enable automatic brightness limiter = Off&lt;br /&gt;
* Sync Interface: Force max brightness = Off (this is important so that data from Hyperion can switch the relay on if it was off)&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
As Hyperion.NG is not yet available as a package for OSMC, i used the excellent [https://github.com/hissingshark/hyperion-vero4k hyperion-vero4k] script to build Hyperion.NG on my Vero 4K+ (using the current master branch, not a release). This makes the initial installation a breeze and is easily reproduceable, leaving plenty of time for the more challenging part: setting Hyperion up correctly.&lt;br /&gt;
&lt;br /&gt;
For Hyperion, the most important settings are:&lt;br /&gt;
* LED Hardware / LED Controller&lt;br /&gt;
** Controller Type: udpraw&lt;br /&gt;
** Hardware LED count: 298&lt;br /&gt;
** Target IP: &amp;lt;the IP of your ESP8266&amp;gt;&lt;br /&gt;
** Target Port: 19446&lt;br /&gt;
* LED Hardware / LED Layout&lt;br /&gt;
** Top: 100&lt;br /&gt;
** Bottom: 100 (should be the same a Top)&lt;br /&gt;
** Left: 56&lt;br /&gt;
** Right: 56&lt;br /&gt;
** Gap Length: 14&lt;br /&gt;
** Gap Position: 199 (position, not count - so it starts from 0, not 1 - and is actually the 200th LED)&lt;br /&gt;
** Input Position: 199&lt;br /&gt;
** Reverse Direction: On&lt;br /&gt;
&lt;br /&gt;
Your exact layout depends on your number of LEDs and how you attach them, but this should give you a general idea of how to configure the layout. And always remember: this layout is viewed from the front of your TV!&lt;br /&gt;
&lt;br /&gt;
Feel free to use a ruler or similar to measure the left and right bottom parts length on your computer screen when configuring the exact gap/input position of the layout - i know i did! ;-)&lt;br /&gt;
&lt;br /&gt;
As i&#039;m running this on a Vero 4K+, i&#039;m using the AMLogic grabber with a width and height of 100 and 56 (matching my LED layout). I have also written some short Python scripts to enable and disable the &amp;quot;platform capture&amp;quot; feature whenever Kodi wakes up or goes to sleep, so that Hyperion doesn&#039;t block WLED by sending LED commands even though Kodi is not actually in use, and the relay can switch the LEDs off.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;.kodi/userdata/wake.py&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import requests&lt;br /&gt;
&lt;br /&gt;
hyperion_url = &#039;http://127.0.0.1:8090/json-rpc&#039;&lt;br /&gt;
hyperion_data = &#039;{&amp;quot;command&amp;quot;:&amp;quot;componentstate&amp;quot;,&amp;quot;componentstate&amp;quot;:{&amp;quot;component&amp;quot;:&amp;quot;GRABBER&amp;quot;,&amp;quot;state&amp;quot;:true}}&#039;&lt;br /&gt;
requests.post(hyperion_url, hyperion_data)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;.kodi/userdata/standby.py&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import requests&lt;br /&gt;
&lt;br /&gt;
hyperion_url = &#039;http://127.0.0.1:8090/json-rpc&#039;&lt;br /&gt;
hyperion_data = &#039;{&amp;quot;command&amp;quot;:&amp;quot;componentstate&amp;quot;,&amp;quot;componentstate&amp;quot;:{&amp;quot;component&amp;quot;:&amp;quot;GRABBER&amp;quot;,&amp;quot;state&amp;quot;:false}}&#039;&lt;br /&gt;
requests.post(hyperion_url, hyperion_data)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Yes, they&#039;re not pretty and nearly identical, but honestly: i don&#039;t care as long as they work. (PS: Yes, i know that Python can use JSON natively, but Hyperion doesn&#039;t like real JSON from Python because of the &#039;&#039;&#039;exact&#039;&#039;&#039; true/false values that are required, and Python complains if i use those exact values. So strings it is!)&lt;br /&gt;
&lt;br /&gt;
=== Hyperion Android Grabber ===&lt;br /&gt;
The Hyperion Android Grabber does pretty much what its name implies: it grabs the screen output of Android and sends it to Hyperion.&lt;br /&gt;
&lt;br /&gt;
Configuration should be fairly simple, just make sure to point it to your Hyperion IP and port 19445, configure the same number of vertical and horizontal LEDs as in Hyperion, but one important settings is the &#039;&#039;&#039;priority&#039;&#039;&#039;: set this to something like 150 (i think the default is 50), otherwise it won&#039;t trigger the output.&lt;br /&gt;
&lt;br /&gt;
=== Enigmalight ===&lt;br /&gt;
Mostly working, but still not perfect. Also not that easy to even get installed. To be continued...&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=473</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=473"/>
		<updated>2021-01-02T20:00:53Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;br /&gt;
&lt;br /&gt;
I did all of my testing using a bench power supply that provided exactly 5V, while also showing me how much current is being drawn, but when i moved the setup to the power supply i bought for this project, at least 2 of my ESP8266 died over night, and i was completely clueless why this was happening (as opposed to those that died with a puff of magic smoke, where it was rather obvious that something was wrong).&lt;br /&gt;
While replacing the old relay that didn&#039;t quite latch anymore after the last visit of the magic smoke monster, i used my multimeter (Aneng AN8009 - very cheap, but quite good!) to measure the voltage that was being delivered through the relay, and noticed that the power supply&#039;s output voltage was at a rather high 5.4V instead of the 5.0V i was looking for. While genuine Wemos D1 Mini boards are hard to come by, and may tolerate voltages higher that 5V, i highly recommend using that multimeter to dial the output voltage of the power supply down (or up) to something as close as 5.0V as you can.&lt;br /&gt;
&lt;br /&gt;
(At the time of this writing, the ESP8266 i&#039;m currently using with the proper voltage hasn&#039;t died yet - but i&#039;ll update this page if it turns out to be something other than overvoltage.)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
Now that the hard part of the build is done, let&#039;s go over the software i&#039;m using:&lt;br /&gt;
* [https://github.com/Aircoookie/WLED WLED]&lt;br /&gt;
* [https://github.com/hyperion-project/hyperion.ng Hyperion]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.abrenoch.hyperiongrabber&amp;amp;hl=en&amp;amp;gl=US Hyperion Android Grabber]&lt;br /&gt;
* [https://www.boxpirates.to/index.php?thread/206406-plugin-enigmalight-ambilight-f%C3%BCr-enigma2-receiver-oe1-6-oe2-0-oe2-2-oe2-5-dreamb/ Enigmalight]&lt;br /&gt;
&lt;br /&gt;
The star of the show is WLED. It receives data from Hyperion on my OSMC Vero 4K+ (my mediacenter running Kodi), from Hyperion Android Grabber on my Nvidia Shield TV Pro (which i use to stream games from my PC) and from Enigmalight on my VU+ Uno 4K SE (basically &amp;quot;just&amp;quot; cable television, on steroids).&lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
As WLED doesn&#039;t allow exporting its config (yet), here are the most important settings i changed from the stock setup:&lt;br /&gt;
* Wifi Setup: SSID &amp;amp; Key already set in the image i uploaded, so nothing to change here for me, but have a look at the [https://github.com/Aircoookie/WLED/wiki WLED wiki] how to connect to a stock image.&lt;br /&gt;
* LED Preferences: LED count = 298, Enable automatic brightness limiter = Off&lt;br /&gt;
* Sync Interface: Force max brightness = Off (this is important so that data from Hyperion can switch the relay on if it was off)&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
As Hyperion.NG is not yet available as a package for OSMC, i used the excellent [https://github.com/hissingshark/hyperion-vero4k hyperion-vero4k] script to build Hyperion.NG on my Vero 4K+ (using the current master branch, not a release). This makes the initial installation a breeze and is easily reproduceable, leaving plenty of time for the more challenging part: setting Hyperion up correctly.&lt;br /&gt;
&lt;br /&gt;
For Hyperion, the most important settings are:&lt;br /&gt;
* LED Hardware / LED Controller&lt;br /&gt;
** Controller Type: udpraw&lt;br /&gt;
** Hardware LED count: 298&lt;br /&gt;
** Target IP: &amp;lt;the IP of your ESP8266&amp;gt;&lt;br /&gt;
** Target Port: 19446&lt;br /&gt;
* LED Hardware / LED Layout&lt;br /&gt;
** Top: 100&lt;br /&gt;
** Bottom: 100 (should be the same a Top)&lt;br /&gt;
** Left: 56&lt;br /&gt;
** Right: 56&lt;br /&gt;
** Gap Length: 14&lt;br /&gt;
** Gap Position: 199 (position, not count - so it starts from 0, not 1 - and is actually the 200th LED)&lt;br /&gt;
** Input Position: 199&lt;br /&gt;
** Reverse Direction: On&lt;br /&gt;
&lt;br /&gt;
Your exact layout depends on your number of LEDs and how you attach them, but this should give you a general idea of how to configure the layout. And always remember: this layout is viewed from the front of your TV!&lt;br /&gt;
&lt;br /&gt;
Feel free to use a ruler or similar to measure the left and right bottom parts length on your computer screen when configuring the exact gap/input position of the layout - i know i did! ;-)&lt;br /&gt;
&lt;br /&gt;
=== Hyperion Android Grabber ===&lt;br /&gt;
The Hyperion Android Grabber does pretty much what its name implies: it grabs the screen output of Android and sends it to Hyperion.&lt;br /&gt;
&lt;br /&gt;
Configuration should be fairly simple, just make sure to point it to your Hyperion IP and port 19445, configure the same number of vertical and horizontal LEDs as in Hyperion, but one important settings is the &#039;&#039;&#039;priority&#039;&#039;&#039;: set this to something like 150 (i think the default is 50), otherwise it won&#039;t trigger the output.&lt;br /&gt;
&lt;br /&gt;
=== Enigmalight ===&lt;br /&gt;
Mostly working, but still not perfect. Also not that easy to even get installed. To be continued...&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=472</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=472"/>
		<updated>2021-01-02T19:56:40Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;br /&gt;
&lt;br /&gt;
I did all of my testing using a bench power supply that provided exactly 5V, while also showing me how much current is being drawn, but when i moved the setup to the power supply i bought for this project, at least 2 of my ESP8266 died over night, and i was completely clueless why this was happening (as opposed to those that died with a puff of magic smoke, where it was rather obvious that something was wrong).&lt;br /&gt;
While replacing the old relay that didn&#039;t quite latch anymore after the last visit of the magic smoke monster, i used my multimeter (Aneng AN8009 - very cheap, but quite good!) to measure the voltage that was being delivered through the relay, and noticed that the power supply&#039;s output voltage was at a rather high 5.4V instead of the 5.0V i was looking for. While genuine Wemos D1 Mini boards are hard to come by, and may tolerate voltages higher that 5V, i highly recommend using that multimeter to dial the output voltage of the power supply down (or up) to something as close as 5.0V as you can.&lt;br /&gt;
&lt;br /&gt;
(At the time of this writing, the ESP8266 i&#039;m currently using with the proper voltage hasn&#039;t died yet - but i&#039;ll update this page if it turns out to be something other than overvoltage.)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
Now that the hard part of the build is done, let&#039;s go over the software i&#039;m using:&lt;br /&gt;
* [https://github.com/Aircoookie/WLED WLED]&lt;br /&gt;
* [https://github.com/hyperion-project/hyperion.ng Hyperion]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.abrenoch.hyperiongrabber&amp;amp;hl=en&amp;amp;gl=US Hyperion Android Grabber]&lt;br /&gt;
* [https://www.boxpirates.to/index.php?thread/206406-plugin-enigmalight-ambilight-f%C3%BCr-enigma2-receiver-oe1-6-oe2-0-oe2-2-oe2-5-dreamb/ Enigmalight]&lt;br /&gt;
&lt;br /&gt;
The star of the show is WLED. It receives data from Hyperion on my OSMC Vero 4K+ (my mediacenter running Kodi), from Hyperion Android Grabber on my Nvidia Shield TV Pro (which i use to stream games from my PC) and from Enigmalight on my VU+ Uno 4K SE (basically &amp;quot;just&amp;quot; cable television, on steroids).&lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
As WLED doesn&#039;t allow exporting its config (yet), here are the most important settings i changed from the stock setup:&lt;br /&gt;
* Wifi Setup: SSID &amp;amp; Key already set in the image i uploaded, so nothing to change here for me, but have a look at the [https://github.com/Aircoookie/WLED/wiki WLED wiki] how to connect to a stock image.&lt;br /&gt;
* LED Preferences: LED count = 298, Enable automatic brightness limiter = Off&lt;br /&gt;
* Sync Interface: Force max brightness = Off (this is important so that data from Hyperion can switch the relay on if it was off)&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
For Hyperion, the most important settings are:&lt;br /&gt;
* LED Hardware / LED Controller&lt;br /&gt;
** Controller Type: udpraw&lt;br /&gt;
** Hardware LED count: 298&lt;br /&gt;
** Target IP: &amp;lt;the IP of your ESP8266&amp;gt;&lt;br /&gt;
** Target Port: 19446&lt;br /&gt;
* LED Hardware / LED Layout&lt;br /&gt;
** Top: 100&lt;br /&gt;
** Bottom: 100 (should be the same a Top)&lt;br /&gt;
** Left: 56&lt;br /&gt;
** Right: 56&lt;br /&gt;
** Gap Length: 14&lt;br /&gt;
** Gap Position: 199 (position, not count - so it starts from 0, not 1 - and is actually the 200th LED)&lt;br /&gt;
** Input Position: 199&lt;br /&gt;
** Reverse Direction: On&lt;br /&gt;
&lt;br /&gt;
Your exact layout depends on your number of LEDs and how you attach them, but this should give you a general idea of how to configure the layout. And always remember: this layout is viewed from the front of your TV!&lt;br /&gt;
&lt;br /&gt;
Feel free to use a ruler or similar to measure the left and right bottom parts length on your computer screen when configuring the exact gap/input position of the layout - i know i did! ;-)&lt;br /&gt;
&lt;br /&gt;
=== Hyperion Android Grabber ===&lt;br /&gt;
The Hyperion Android Grabber does pretty much what its name implies: it grabs the screen output of Android and sends it to Hyperion.&lt;br /&gt;
&lt;br /&gt;
Configuration should be fairly simple, just make sure to point it to your Hyperion IP and port 19445, configure the same number of vertical and horizontal LEDs as in Hyperion, but one important settings is the &#039;&#039;&#039;priority&#039;&#039;&#039;: set this to something like 150 (i think the default is 50), otherwise it won&#039;t trigger the output.&lt;br /&gt;
&lt;br /&gt;
=== Enigmalight ===&lt;br /&gt;
Mostly working, but still not perfect. Also not that easy to even get installed. To be continued...&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=471</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=471"/>
		<updated>2021-01-02T19:55:20Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;br /&gt;
&lt;br /&gt;
I did all of my testing using a bench power supply that provided exactly 5V, while also showing me how much current is being drawn, but when i moved the setup to the power supply i bought for this project, at least 2 of my ESP8266 died over night, and i was completely clueless why this was happening (as opposed to those that died with a puff of magic smoke, where it was rather obvious that something was wrong).&lt;br /&gt;
While replacing the old relay that didn&#039;t quite latch anymore after the last visit of the magic smoke monster, i used my multimeter (Aneng AN8009 - very cheap, but quite good!) to measure the voltage that was being delivered through the relay, and noticed that the power supply&#039;s output voltage was at a rather high 5.4V instead of the 5.0V i was looking for. While genuine Wemos D1 Mini boards are hard to come by, and may tolerate voltages higher that 5V, i highly recommend using that multimeter to dial the output voltage of the power supply down (or up) to something as close as 5.0V as you can.&lt;br /&gt;
&lt;br /&gt;
(At the time of this writing, the ESP8266 i&#039;m currently using with the proper voltage hasn&#039;t died yet - but i&#039;ll update this page if it turns out to be something other than overvoltage.)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
Now that the hard part of the build is done, let&#039;s go over the software i&#039;m using:&lt;br /&gt;
* [https://github.com/Aircoookie/WLED WLED]&lt;br /&gt;
* [https://github.com/hyperion-project/hyperion.ng Hyperion]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.abrenoch.hyperiongrabber&amp;amp;hl=en&amp;amp;gl=US Hyperion Android Grabber]&lt;br /&gt;
* [https://www.boxpirates.to/index.php?thread/206406-plugin-enigmalight-ambilight-f%C3%BCr-enigma2-receiver-oe1-6-oe2-0-oe2-2-oe2-5-dreamb/ Enigmalight]&lt;br /&gt;
&lt;br /&gt;
The star of the show is WLED. It receives data from Hyperion on my OSMC Vero 4K+ (my mediacenter running Kodi), from Hyperion Android Grabber on my Nvidia Shield TV Pro (which i use to stream games from my PC) and from Enigmalight on my VU+ Uno 4K SE (basically &amp;quot;just&amp;quot; cable television, on steroids).&lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
As WLED doesn&#039;t allow exporting its config (yet), here are the most important settings i changed from the stock setup:&lt;br /&gt;
* Wifi Setup: SSID &amp;amp; Key already set in the image i uploaded, so nothing to change here for me, but have a look at the [https://github.com/Aircoookie/WLED/wiki WLED wiki] how to connect to a stock image.&lt;br /&gt;
* LED Preferences: LED count = 298, Enable automatic brightness limiter = Off&lt;br /&gt;
* Sync Interface: Force max brightness = Off (this is important so that data from Hyperion can switch the relay on if it was off)&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
For Hyperion, the most important settings are:&lt;br /&gt;
* LED Hardware / LED Controller&lt;br /&gt;
** Controller Type: udpraw&lt;br /&gt;
** Hardware LED count: 298&lt;br /&gt;
** Target IP: &amp;lt;the IP of your ESP8266&amp;gt;&lt;br /&gt;
** Target Port: 19446&lt;br /&gt;
* LED Hardware / LED Layout&lt;br /&gt;
** Top: 100&lt;br /&gt;
** Bottom: 100 (should be the same a Top)&lt;br /&gt;
** Left: 56&lt;br /&gt;
** Right: 56&lt;br /&gt;
** Gap Length: 14&lt;br /&gt;
** Gap Position: 199 (position, not count - so it starts from 0, not 1 - and is actually the 200th LED)&lt;br /&gt;
** Input Position: 199&lt;br /&gt;
** Reverse Direction: On&lt;br /&gt;
&lt;br /&gt;
Your exact layout depends on your number of LEDs and how you attach them, but this should give you a general idea of how to configure the layout. And always remember: this layout is viewed from the front of your TV!&lt;br /&gt;
&lt;br /&gt;
Feel free to use a ruler or similar to measure the left and right bottom parts length on your computer screen when configuring the exact gap/input position of the layout - i know i did! ;-)&lt;br /&gt;
&lt;br /&gt;
=== Hyperion Android Grabber ===&lt;br /&gt;
The Hyperion Android Grabber does pretty much what its name implies: it grabs the screen output of Android and sends it to Hyperion.&lt;br /&gt;
&lt;br /&gt;
Configuration should be fairly simple, just make sure to point it to your Hyperion IP and port 19445, configure the same number of vertical and horizontal LEDs as in Hyperion, but one important settings is the &#039;&#039;&#039;priority&#039;&#039;&#039;: set this to something like 150 (i think the default is 50), otherwise it won&#039;t trigger the output.&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=470</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=470"/>
		<updated>2021-01-02T19:49:35Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;br /&gt;
&lt;br /&gt;
I did all of my testing using a bench power supply that provided exactly 5V, while also showing me how much current is being drawn, but when i moved the setup to the power supply i bought for this project, at least 2 of my ESP8266 died over night, and i was completely clueless why this was happening (as opposed to those that died with a puff of magic smoke, where it was rather obvious that something was wrong).&lt;br /&gt;
While replacing the old relay that didn&#039;t quite latch anymore after the last visit of the magic smoke monster, i used my multimeter (Aneng AN8009 - very cheap, but quite good!) to measure the voltage that was being delivered through the relay, and noticed that the power supply&#039;s output voltage was at a rather high 5.4V instead of the 5.0V i was looking for. While genuine Wemos D1 Mini boards are hard to come by, and may tolerate voltages higher that 5V, i highly recommend using that multimeter to dial the output voltage of the power supply down (or up) to something as close as 5.0V as you can.&lt;br /&gt;
&lt;br /&gt;
(At the time of this writing, the ESP8266 i&#039;m currently using with the proper voltage hasn&#039;t died yet - but i&#039;ll update this page if it turns out to be something other than overvoltage.)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
Now that the hard part of the build is done, let&#039;s go over the software i&#039;m using:&lt;br /&gt;
* [https://github.com/Aircoookie/WLED WLED]&lt;br /&gt;
* [https://github.com/hyperion-project/hyperion.ng Hyperion]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.abrenoch.hyperiongrabber&amp;amp;hl=en&amp;amp;gl=US Hyperion Android Grabber]&lt;br /&gt;
* [https://www.boxpirates.to/index.php?thread/206406-plugin-enigmalight-ambilight-f%C3%BCr-enigma2-receiver-oe1-6-oe2-0-oe2-2-oe2-5-dreamb/ Enigmalight]&lt;br /&gt;
&lt;br /&gt;
The star of the show is WLED. It receives data from Hyperion on my OSMC Vero 4K+ (my mediacenter running Kodi), from Hyperion Android Grabber on my Nvidia Shield TV Pro (which i use to stream games from my PC) and from Enigmalight on my VU+ Uno 4K SE (basically &amp;quot;just&amp;quot; cable television, on steroids).&lt;br /&gt;
&lt;br /&gt;
As WLED doesn&#039;t allow exporting its config (yet), here are the most important settings i changed from the stock setup:&lt;br /&gt;
* Wifi Setup: SSID &amp;amp; Key already set in the image i uploaded, so nothing to change here for me, but have a look at the [https://github.com/Aircoookie/WLED/wiki WLED wiki] how to connect to a stock image.&lt;br /&gt;
* LED Preferences: LED count = 298, Enable automatic brightness limiter = Off&lt;br /&gt;
* Sync Interface: Force max brightness = Off (this is important so that data from Hyperion can switch the relay on if it was off)&lt;br /&gt;
&lt;br /&gt;
For Hyperion, the most important settings are:&lt;br /&gt;
* LED Hardware / LED Controller&lt;br /&gt;
** Controller Type: udpraw&lt;br /&gt;
** Hardware LED count: 298&lt;br /&gt;
** Target IP: &amp;lt;the IP of your ESP8266&amp;gt;&lt;br /&gt;
** Target Port: 19446&lt;br /&gt;
* LED Hardware / LED Layout&lt;br /&gt;
** Top: 100&lt;br /&gt;
** Bottom: 100 (should be the same a Top)&lt;br /&gt;
** Left: 56&lt;br /&gt;
** Right: 56&lt;br /&gt;
** Gap Length: 14&lt;br /&gt;
** Gap Position: 199 (position, not count - so it starts from 0, not 1 - and is actually the 200th LED)&lt;br /&gt;
** Input Position: 199&lt;br /&gt;
** Reverse Direction: On&lt;br /&gt;
&lt;br /&gt;
Your exact layout depends on your number of LEDs and how you attach them, but this should give you a general idea of how to configure the layout. And always remember: this layout is viewed from the front of your TV!&lt;br /&gt;
&lt;br /&gt;
Feel free to use a ruler or similar to measure the left and right bottom parts length on your computer screen when configuring the exact gap/input position of the layout - i know i did! ;-)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=469</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=469"/>
		<updated>2021-01-02T19:49:23Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;br /&gt;
&lt;br /&gt;
I did all of my testing using a bench power supply that provided exactly 5V, while also showing me how much current is being drawn, but when i moved the setup to the power supply i bought for this project, at least 2 of my ESP8266 died over night, and i was completely clueless why this was happening (as opposed to those that died with a puff of magic smoke, where it was rather obvious that something was wrong).&lt;br /&gt;
While replacing the old relay that didn&#039;t quite latch anymore after the last visit of the magic smoke monster, i used my multimeter (Aneng AN8009 - very cheap, but quite good!) to measure the voltage that was being delivered through the relay, and noticed that the power supply&#039;s output voltage was at a rather high 5.4V instead of the 5.0V i was looking for. While genuine Wemos D1 Mini boards are hard to come by, and may tolerate voltages higher that 5V, i highly recommend using that multimeter to dial the output voltage of the power supply down (or up) to something as close as 5.0V as you can.&lt;br /&gt;
&lt;br /&gt;
(At the time of this writing, the ESP8266 i&#039;m currently using with the proper voltage hasn&#039;t died yet - but i&#039;ll update this page if it turns out to be something other than overvoltage.)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
Now that the hard part of the build is done, let&#039;s go over the software i&#039;m using:&lt;br /&gt;
* [https://github.com/Aircoookie/WLED WLED]&lt;br /&gt;
* [https://github.com/hyperion-project/hyperion.ng Hyperion]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.abrenoch.hyperiongrabber&amp;amp;hl=en&amp;amp;gl=US Hyperion Android Grabber]&lt;br /&gt;
* [https://www.boxpirates.to/index.php?thread/206406-plugin-enigmalight-ambilight-f%C3%BCr-enigma2-receiver-oe1-6-oe2-0-oe2-2-oe2-5-dreamb/ Enigmalight]&lt;br /&gt;
&lt;br /&gt;
The star of the show is WLED. It receives data from Hyperion on my OSMC Vero 4K+ (my mediacenter running Kodi), from Hyperion Android Grabber on my Nvidia Shield TV Pro (which i use to stream games from my PC) and from Enigmalight on my VU+ Uno 4K SE (basically &amp;quot;just&amp;quot; cable television, on steroids).&lt;br /&gt;
&lt;br /&gt;
As WLED doesn&#039;t allow exporting its config (yet), here are the most important settings i changed from the stock setup:&lt;br /&gt;
* Wifi Setup: SSID &amp;amp; Key already set in the image i uploaded, so nothing to change here for me, but have a look at the [https://github.com/Aircoookie/WLED/wiki WLED wiki] how to connect to a stock image.&lt;br /&gt;
* LED Preferences: LED count = 298, Enable automatic brightness limiter = Off&lt;br /&gt;
* Sync Interface: Force max brightness = Off (this is important so that data from Hyperion can switch the relay on if it was off)&lt;br /&gt;
&lt;br /&gt;
For Hyperion, the most important settings are:&lt;br /&gt;
* LED Hardware / LED Controller&lt;br /&gt;
** Controller Type: udpraw&lt;br /&gt;
** Hardware LED count: 298&lt;br /&gt;
** Target IP: &amp;lt;the IP of your ESP8266&amp;gt;&lt;br /&gt;
** Target Port: 19446&lt;br /&gt;
* LED Hardware / LED Layout&lt;br /&gt;
** Top: 100&lt;br /&gt;
** Bottom: 100 (should be the same a Top)&lt;br /&gt;
** Left: 56&lt;br /&gt;
** Right: 56&lt;br /&gt;
** Gap Length: 14&lt;br /&gt;
** Gap Position: 199 (position, not count - so it starts from 0, not 1 - and is actually the 200th LED)&lt;br /&gt;
** Input Position: 199&lt;br /&gt;
** Reverse Direction: On&lt;br /&gt;
&lt;br /&gt;
Your exact layout depends on your number of LEDs and how you attach them, but this should give you a general idea of how to configure the layout. And always remember: this layout is viewed from the front of your TV!&lt;br /&gt;
&lt;br /&gt;
Feel free to use a ruler or similar to measure the left and right bottom parts length on your computer screen when configuring the exact gap/input position of the layout - i know i did! ;-)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=468</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=468"/>
		<updated>2021-01-02T19:49:08Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;br /&gt;
&lt;br /&gt;
I did all of my testing using a bench power supply that provided exactly 5V, while also showing me how much current is being drawn, but when i moved the setup to the power supply i bought for this project, at least 2 of my ESP8266 died over night, and i was completely clueless why this was happening (as opposed to those that died with a puff of magic smoke, where it was rather obvious that something was wrong).&lt;br /&gt;
While replacing the old relay that didn&#039;t quite latch anymore after the last visit of the magic smoke monster, i used my multimeter (Aneng AN8009 - very cheap, but quite good!) to measure the voltage that was being delivered through the relay, and noticed that the power supply&#039;s output voltage was at a rather high 5.4V instead of the 5.0V i was looking for. While genuine Wemos D1 Mini boards are hard to come by, and may tolerate voltages higher that 5V, i highly recommend using that multimeter to dial the output voltage of the power supply down (or up) to something as close as 5.0V as you can.&lt;br /&gt;
&lt;br /&gt;
(At the time of this writing, the ESP8266 i&#039;m currently using with the proper voltage hasn&#039;t died yet - but i&#039;ll update this page if it turns out to be something other than overvoltage.)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
Now that the hard part of the build is done, let&#039;s go over the software i&#039;m using:&lt;br /&gt;
* [https://github.com/Aircoookie/WLED WLED]&lt;br /&gt;
* [https://github.com/hyperion-project/hyperion.ng Hyperion]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.abrenoch.hyperiongrabber&amp;amp;hl=en&amp;amp;gl=US Hyperion Android Grabber]&lt;br /&gt;
* [https://www.boxpirates.to/index.php?thread/206406-plugin-enigmalight-ambilight-f%C3%BCr-enigma2-receiver-oe1-6-oe2-0-oe2-2-oe2-5-dreamb/ Enigmalight]&lt;br /&gt;
&lt;br /&gt;
The star of the show is WLED. It receives data from Hyperion on my OSMC Vero 4K+ (my mediacenter running Kodi), from Hyperion Android Grabber on my Nvidia Shield TV Pro (which i use to stream games from my PC) and from Enigmalight on my VU+ Uno 4K SE (basically &amp;quot;just&amp;quot; cable television, on steroids).&lt;br /&gt;
&lt;br /&gt;
As WLED doesn&#039;t allow exporting its config (yet), here are the most important settings i changed from the stock setup:&lt;br /&gt;
* Wifi Setup: SSID &amp;amp; Key already set in the image i uploaded, so nothing to change here for me, but have a look at the [https://github.com/Aircoookie/WLED/wiki WLED wiki] how to connect to a stock image.&lt;br /&gt;
* LED Preferences: LED count = 298, Enable automatic brightness limiter = Off&lt;br /&gt;
* Sync Interface: Force max brightness = Off (this is important so that data from Hyperion can switch the relay on if it was off)&lt;br /&gt;
&lt;br /&gt;
For Hyperion, the most important settings are:&lt;br /&gt;
* LED Hardware / LED Controller&lt;br /&gt;
** Controller Type: udpraw&lt;br /&gt;
** Hardware LED count: 298&lt;br /&gt;
** Target IP: &amp;lt;the IP of your ESP8266&amp;gt;&lt;br /&gt;
** Target Port: 19446&lt;br /&gt;
* LED Hardware / LED Layout&lt;br /&gt;
** Top: 100&lt;br /&gt;
** Bottom: 100 (should be the same a Top)&lt;br /&gt;
** Left: 56&lt;br /&gt;
** Right: 56&lt;br /&gt;
** Gap Length: 14&lt;br /&gt;
** Gap Position: 199 (position, not count - so it starts from 0, not 1 - and is actually the 200th LED)&lt;br /&gt;
** Input Position: 199&lt;br /&gt;
** Reverse Direction: On&lt;br /&gt;
&lt;br /&gt;
Your exact layout depends on your number of LEDs and how you attach them, but this should give you a general idea of how to configure the layout. And always remember: this layout is viewed from the front of your TV!&lt;br /&gt;
Feel free to use a ruler or similar to measure the left and right bottom parts length on your computer screen when configuring the exact gap/input position of the layout - i know i did! ;-)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=467</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=467"/>
		<updated>2021-01-02T19:45:58Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;br /&gt;
&lt;br /&gt;
I did all of my testing using a bench power supply that provided exactly 5V, while also showing me how much current is being drawn, but when i moved the setup to the power supply i bought for this project, at least 2 of my ESP8266 died over night, and i was completely clueless why this was happening (as opposed to those that died with a puff of magic smoke, where it was rather obvious that something was wrong).&lt;br /&gt;
While replacing the old relay that didn&#039;t quite latch anymore after the last visit of the magic smoke monster, i used my multimeter (Aneng AN8009 - very cheap, but quite good!) to measure the voltage that was being delivered through the relay, and noticed that the power supply&#039;s output voltage was at a rather high 5.4V instead of the 5.0V i was looking for. While genuine Wemos D1 Mini boards are hard to come by, and may tolerate voltages higher that 5V, i highly recommend using that multimeter to dial the output voltage of the power supply down (or up) to something as close as 5.0V as you can.&lt;br /&gt;
&lt;br /&gt;
(At the time of this writing, the ESP8266 i&#039;m currently using with the proper voltage hasn&#039;t died yet - but i&#039;ll update this page if it turns out to be something other than overvoltage.)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
Now that the hard part of the build is done, let&#039;s go over the software i&#039;m using:&lt;br /&gt;
* [https://github.com/Aircoookie/WLED WLED]&lt;br /&gt;
* [https://github.com/hyperion-project/hyperion.ng Hyperion]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.abrenoch.hyperiongrabber&amp;amp;hl=en&amp;amp;gl=US Hyperion Android Grabber]&lt;br /&gt;
* [https://www.boxpirates.to/index.php?thread/206406-plugin-enigmalight-ambilight-f%C3%BCr-enigma2-receiver-oe1-6-oe2-0-oe2-2-oe2-5-dreamb/ Enigmalight]&lt;br /&gt;
&lt;br /&gt;
The star of the show is WLED. It receives data from Hyperion on my OSMC Vero 4K+ (my mediacenter running Kodi), from Hyperion Android Grabber on my Nvidia Shield TV Pro (which i use to stream games from my PC) and from Enigmalight on my VU+ Uno 4K SE (basically &amp;quot;just&amp;quot; cable television, on steroids).&lt;br /&gt;
&lt;br /&gt;
As WLED doesn&#039;t allow exporting its config (yet), here are the most important settings i changed from the stock setup:&lt;br /&gt;
* Wifi Setup: SSID &amp;amp; Key already set in the image i uploaded, so nothing to change here for me, but have a look at the [https://github.com/Aircoookie/WLED/wiki WLED wiki] how to connect to a stock image.&lt;br /&gt;
* LED Preferences: LED count = 298, Enable automatic brightness limiter = Off&lt;br /&gt;
* Sync Interface: Force max brightness = Off (this is important so that data from Hyperion can switch the relay on if it was off)&lt;br /&gt;
&lt;br /&gt;
For Hyperion, the most important settings are:&lt;br /&gt;
* LED Hardware / LED Controller&lt;br /&gt;
** Controller Type: udpraw&lt;br /&gt;
** Hardware LED count: 298&lt;br /&gt;
** Target IP: &amp;lt;the IP of your ESP8266&amp;gt;&lt;br /&gt;
** Target Port: 19446&lt;br /&gt;
* LED Hardware / LED Layout&lt;br /&gt;
** Top: 100&lt;br /&gt;
** Bottom: 100 (should be the same a Top)&lt;br /&gt;
** Left: 56&lt;br /&gt;
** Right: 56&lt;br /&gt;
** Gap Length: 14&lt;br /&gt;
** Gap Position: 199 (position, not count - so it starts from 0, not 1 - and is actually the 200th LED)&lt;br /&gt;
** Input Position: 199&lt;br /&gt;
** Reverse Direction: On&lt;br /&gt;
&lt;br /&gt;
Your exact layout depends on your number of LEDs and how you attach them, but this should give you a general idea of how to configure the layout. And always remember: this layout is viewed from the front of your TV! ;-)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=466</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=466"/>
		<updated>2021-01-02T19:35:10Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;br /&gt;
&lt;br /&gt;
I did all of my testing using a bench power supply that provided exactly 5V, while also showing me how much current is being drawn, but when i moved the setup to the power supply i bought for this project, at least 2 of my ESP8266 died over night, and i was completely clueless why this was happening (as opposed to those that died with a puff of magic smoke, where it was rather obvious that something was wrong).&lt;br /&gt;
While replacing the old relay that didn&#039;t quite latch anymore after the last visit of the magic smoke monster, i used my multimeter (Aneng AN8009 - very cheap, but quite good!) to measure the voltage that was being delivered through the relay, and noticed that the power supply&#039;s output voltage was at a rather high 5.4V instead of the 5.0V i was looking for. While genuine Wemos D1 Mini boards are hard to come by, and may tolerate voltages higher that 5V, i highly recommend using that multimeter to dial the output voltage of the power supply down (or up) to something as close as 5.0V as you can.&lt;br /&gt;
&lt;br /&gt;
(At the time of this writing, the ESP8266 i&#039;m currently using with the proper voltage hasn&#039;t died yet - but i&#039;ll update this page if it turns out to be something other than overvoltage.)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
Now that the hard part of the build is done, let&#039;s go over the software i&#039;m using:&lt;br /&gt;
* [https://github.com/Aircoookie/WLED WLED]&lt;br /&gt;
* [https://github.com/hyperion-project/hyperion.ng Hyperion]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.abrenoch.hyperiongrabber&amp;amp;hl=en&amp;amp;gl=US Hyperion Android Grabber]&lt;br /&gt;
* [https://www.boxpirates.to/index.php?thread/206406-plugin-enigmalight-ambilight-f%C3%BCr-enigma2-receiver-oe1-6-oe2-0-oe2-2-oe2-5-dreamb/ Enigmalight]&lt;br /&gt;
&lt;br /&gt;
The star of the show is WLED. It receives data from Hyperion on my OSMC Vero 4K+ (my mediacenter running Kodi), from Hyperion Android Grabber on my Nvidia Shield TV Pro (which i use to stream games from my PC) and from Enigmalight on my VU+ Uno 4K SE (basically &amp;quot;just&amp;quot; cable television, on steroids).&lt;br /&gt;
&lt;br /&gt;
As WLED doesn&#039;t allow exporting its config (yet), here are the most important settings i changed from the stock setup:&lt;br /&gt;
* Wifi Setup: SSID &amp;amp; Key already set in the image i uploaded, so nothing to change here for me, but have a look at the [https://github.com/Aircoookie/WLED/wiki WLED wiki] how to connect to a stock image.&lt;br /&gt;
* LED Preferences: LED count = 298, Enable automatic brightness limiter = Off&lt;br /&gt;
* Sync Interface: Force max brightness = Off (this is important so that data from Hyperion can switch the relay on if it was off)&lt;br /&gt;
&lt;br /&gt;
For Hyperion, the most important settings are:&lt;br /&gt;
* LED Hardware / LED Controller&lt;br /&gt;
** Controller Type: udpraw&lt;br /&gt;
** Hardware LED count: 298&lt;br /&gt;
** Target IP: &amp;lt;the IP of your ESP8266&amp;gt;&lt;br /&gt;
** Target Port: 19446&lt;br /&gt;
* LED Hardware / LED Layout&lt;br /&gt;
** Top: 100&lt;br /&gt;
** Bottom: 100&lt;br /&gt;
** Left: 56&lt;br /&gt;
** Right: 56&lt;br /&gt;
** Gap Length: 14&lt;br /&gt;
** Gap Position: 200&lt;br /&gt;
** Input Position: 200&lt;br /&gt;
** Reverse Direction: On&lt;br /&gt;
&lt;br /&gt;
Your exact layout depends on your number of LEDs and how you attach them, but this should give you a general idea of how to configure the layout. And always remember: this layout is viewed from the front of your TV! ;-)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=465</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=465"/>
		<updated>2021-01-02T19:26:02Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;br /&gt;
&lt;br /&gt;
I did all of my testing using a bench power supply that provided exactly 5V, while also showing me how much current is being drawn, but when i moved the setup to the power supply i bought for this project, at least 2 of my ESP8266 died over night, and i was completely clueless why this was happening (as opposed to those that died with a puff of magic smoke, where it was rather obvious that something was wrong).&lt;br /&gt;
While replacing the old relay that didn&#039;t quite latch anymore after the last visit of the magic smoke monster, i used my multimeter (Aneng AN8009 - very cheap, but quite good!) to measure the voltage that was being delivered through the relay, and noticed that the power supply&#039;s output voltage was at a rather high 5.4V instead of the 5.0V i was looking for. While genuine Wemos D1 Mini boards are hard to come by, and may tolerate voltages higher that 5V, i highly recommend using that multimeter to dial the output voltage of the power supply down (or up) to something as close as 5.0V as you can.&lt;br /&gt;
&lt;br /&gt;
(At the time of this writing, the ESP8266 i&#039;m currently using with the proper voltage hasn&#039;t died yet - but i&#039;ll update this page if it turns out to be something other than overvoltage.)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
Now that the hard part of the build is done, let&#039;s go over the software i&#039;m using:&lt;br /&gt;
* [https://github.com/Aircoookie/WLED WLED]&lt;br /&gt;
* [https://github.com/hyperion-project/hyperion.ng Hyperion]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.abrenoch.hyperiongrabber&amp;amp;hl=en&amp;amp;gl=US Hyperion Android Grabber]&lt;br /&gt;
* [https://www.boxpirates.to/index.php?thread/206406-plugin-enigmalight-ambilight-f%C3%BCr-enigma2-receiver-oe1-6-oe2-0-oe2-2-oe2-5-dreamb/ Enigmalight]&lt;br /&gt;
&lt;br /&gt;
The star of the show is WLED. It receives data from Hyperion on my OSMC Vero 4K+ (my mediacenter running Kodi), from Hyperion Android Grabber on my Nvidia Shield TV Pro (which i use to stream games from my PC) and from Enigmalight on my VU+ Uno 4K SE (basically &amp;quot;just&amp;quot; cable television, on steroids).&lt;br /&gt;
&lt;br /&gt;
As WLED doesn&#039;t allow exporting its config (yet), here are the most important settings i changed from the stock setup:&lt;br /&gt;
* Wifi Setup: SSID &amp;amp; Key already set in the image i uploaded, so nothing to change here for me, but have a look at the [https://github.com/Aircoookie/WLED/wiki WLED wiki] how to connect to a stock image.&lt;br /&gt;
* LED Preferences: LED count = 298, Enable automatic brightness limiter = Off&lt;br /&gt;
* Sync Interface: Force max brightness = Off (this is important so that data from Hyperion can switch the relay on if it was off)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=464</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=464"/>
		<updated>2021-01-02T19:20:31Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;br /&gt;
&lt;br /&gt;
I did all of my testing using a bench power supply that provided exactly 5V, while also showing me how much current is being drawn, but when i moved the setup to the power supply i bought for this project, at least 2 of my ESP8266 died over night, and i was completely clueless why this was happening (as opposed to those that died with a puff of magic smoke, where it was rather obvious that something was wrong).&lt;br /&gt;
While replacing the old relay that didn&#039;t quite latch anymore after the last visit of the magic smoke monster, i used my multimeter (Aneng AN8009 - very cheap, but quite good!) to measure the voltage that was being delivered through the relay, and noticed that the power supply&#039;s output voltage was at a rather high 5.4V instead of the 5.0V i was looking for. While genuine Wemos D1 Mini boards are hard to come by, and may tolerate voltages higher that 5V, i highly recommend using that multimeter to dial the output voltage of the power supply down (or up) to something as close as 5.0V as you can.&lt;br /&gt;
&lt;br /&gt;
(At the time of this writing, the ESP8266 i&#039;m currently using with the proper voltage hasn&#039;t died yet - but i&#039;ll update this page if it turns out to be something other than overvoltage.)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
Now that the hard part of the build is done, let&#039;s go over the software i&#039;m using:&lt;br /&gt;
* [WLED https://github.com/Aircoookie/WLED]&lt;br /&gt;
* [https://github.com/hyperion-project/hyperion.ng Hyperion]&lt;br /&gt;
* [https://play.google.com/store/apps/details?id=com.abrenoch.hyperiongrabber&amp;amp;hl=en&amp;amp;gl=US Hyperion Android Grabber]&lt;br /&gt;
* [https://www.boxpirates.to/index.php?thread/206406-plugin-enigmalight-ambilight-f%C3%BCr-enigma2-receiver-oe1-6-oe2-0-oe2-2-oe2-5-dreamb/ Enigmalight]&lt;br /&gt;
&lt;br /&gt;
The star of the show is WLED. It receives data from Hyperion on my OSMC Vero 4K+ (my mediacenter running Kodi), from Hyperion Android Grabber on my Nvidia Shield TV Pro (which i use to stream games from my PC) and from Enigmalight on my VU+ Uno 4K SE (basically &amp;quot;just&amp;quot; cable television, on steroids).&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=463</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=463"/>
		<updated>2021-01-02T19:13:10Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;br /&gt;
&lt;br /&gt;
I did all of my testing using a bench power supply that provided exactly 5V, while also showing me how much current is being drawn, but when i moved the setup to the power supply i bought for this project, at least 2 of my ESP8266 died over night, and i was completely clueless why this was happening (as opposed to those that died with a puff of magic smoke, where it was rather obvious that something was wrong).&lt;br /&gt;
While replacing the old relay that didn&#039;t quite latch anymore after the last visit of the magic smoke monster, i used my multimeter (Aneng AN8009 - very cheap, but quite good!) to measure the voltage that was being delivered through the relay, and noticed that the power supply&#039;s output voltage was at a rather high 5.4V instead of the 5.0V i was looking for. While genuine Wemos D1 Mini boards are hard to come by, and may tolerate voltages higher that 5V, i highly recommend using that multimeter to dial the output voltage of the power supply down (or up) to something as close as 5.0V as you can.&lt;br /&gt;
&lt;br /&gt;
(At the time of this writing, the ESP8266 i&#039;m currently using with the proper voltage hasn&#039;t died yet - but i&#039;ll update this page if it turns out to be something other than overvoltage.)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=462</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=462"/>
		<updated>2021-01-02T19:01:07Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should use a relay. Even when switched off, my ~300 LEDs draw ~0.25 amps, unless i completely cut the power with the a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip the further you get away from the powered end.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=461</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=461"/>
		<updated>2021-01-02T18:59:25Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should add the relay, because even when switched off, those 300 LEDs draw ~0.25 amps unless you completely cut the power by using a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from pretty much anywhere you like also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=460</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=460"/>
		<updated>2021-01-02T18:58:37Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should add the relay, because even when switched off, those 300 LEDs draw ~0.25 amps unless you completely cut the power by using a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from the level shifter also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [https://www.amazon.de/dp/B0728HZHTR/ perfboard] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=459</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=459"/>
		<updated>2021-01-02T18:57:56Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should add the relay, because even when switched off, those 300 LEDs draw ~0.25 amps unless you completely cut the power by using a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from the level shifter also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [perfboard https://www.amazon.de/dp/B0728HZHTR/] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;br /&gt;
[[File:ESP8266 WLED.jpg|thumb|center|ESP8266 + TXS0108E + KY-019]]&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=File:ESP8266_WLED.jpg&amp;diff=458</id>
		<title>File:ESP8266 WLED.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=File:ESP8266_WLED.jpg&amp;diff=458"/>
		<updated>2021-01-02T18:57:33Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ESP8266 + TXS0108E + KY-019&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=457</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=457"/>
		<updated>2021-01-02T18:56:26Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should add the relay, because even when switched off, those 300 LEDs draw ~0.25 amps unless you completely cut the power by using a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
&lt;br /&gt;
* The 5V connection from the power supply goes into &amp;quot;common&amp;quot; of the relay, and from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off) to the 1000 uF capacitor.&lt;br /&gt;
* The ground connection from the power supply goes straight to the 1000 uF capacitor.&lt;br /&gt;
* From the 1000 uF capacitor, both connections go to the power injection cables of the LED strip, on both ends.&lt;br /&gt;
&lt;br /&gt;
* The 5V for the electronics goes to &amp;quot;+&amp;quot; pin on the control side of the relay, the 5V pin of the ESP8266 and the &amp;quot;VCC B&amp;quot; reference input on the level shifter.&lt;br /&gt;
* The GND between all the electronics gets also connected, and is also wired up to the GND pin of the LED strip&#039;s plug. &lt;br /&gt;
* In short (no pun intended): all the electronics are on the same 5V and GND, except that the LED strip only gets GND (as it get its 5V from the relay).&lt;br /&gt;
&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A6)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A5). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B5 on the level shifter (the high-voltage output of input A5) gets connected to the signal pin on the relay.&lt;br /&gt;
&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
&lt;br /&gt;
* Again: GND from the level shifter also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* Again: The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
&lt;br /&gt;
After doing some first tests with a dead-bug-style setup, i eventually decided to build my &amp;quot;production&amp;quot; unit a bit more reliable, with pin headers for easy replacement of components (and i had to do that a lot, because:) and JST connectors for the power connections. A word of advice here: if you&#039;re going to add connectors, for the sake of everything that&#039;s holy to you, make sure that if you have two plugs that carry 5V and GND, do absolutely make sure that they&#039;re both wired identically, with 5V on the same pins. I think in total i wasted 3x ESP8266, 2x level shifters and at least one relay because it didn&#039;t notice early enough that the polarity of my power plugs didn&#039;t match. Oh well, sacrifices to the magical smoke monster.&lt;br /&gt;
&lt;br /&gt;
Anyways, so what it did is get a [perfboard https://www.amazon.de/dp/B0728HZHTR/] of the appropriate size to fit all 3 board onto, soldered the female pin headers into place (with 1 row of holes in between for making connections), then used some thin wire to connect all the pins to match my schematic and added two screw terminals (one for electronics power, one for data/GND to the LED strip), replaced the pins on the relay to point straight down instead of to the side (but you could do it any way you see fit, just make sure it all fits somehow).&lt;br /&gt;
The 1000 uF capacitor was added to the power plug for the LED strip (which is actually splitting up into another set of cables with a JST plug on one end for the &amp;quot;near end&amp;quot; power injection leads that have a JST socket now, and one half of a LED strip connector on the other end to inject power into the end of the LED strip that was cut off).&lt;br /&gt;
&lt;br /&gt;
The 470 Ohms resistor was already present in the data/GND cable with the socket for the LED strip&#039;s plug, so i just connected that into the screw terminal, but for another build i would probably move that right behind the screw terminal onto the perfboard, so i can just use any cable without having to add the resistor there first.&lt;br /&gt;
&lt;br /&gt;
And that&#039;s what it looked like in the end:&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=456</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=456"/>
		<updated>2021-01-02T18:21:43Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should add the relay, because even when switched off, those 300 LEDs draw ~0.25 amps unless you completely cut the power by using a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266_WLED_Steckplatine_final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
* Power to the LED strip goes to the 1000 uF capacitor and from there into the power injector cables of the LED strip, but the 5V line for this i also wired into the relay: from power supply into &amp;quot;common&amp;quot; or &amp;quot;middle&amp;quot;, and to the LED strip from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off).&lt;br /&gt;
* Power to the electronics first goes to the control pins of the relay (because they provide enough contact surface to solder multiple connections), and from there to the 5V and GND pins on the ESP8266 and the high-voltage (well, still 5V) reference input on the level shifter. The GND between the level shifter and the ESP8266 was still connected from my early testing, so i left that in place, but i could also have soldered a separate connection from the relay&#039;s GND to the level shifter&#039;s GND. In short: all the electronics are on the same 5V and GND.&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A4)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A6). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B4 on the level shifter (the high-voltage output of input A4) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) gets connected to the signal pin on the relay.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
* GND from the level shifter also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
* TODO: plugs on cables&lt;br /&gt;
* TODO: secondary power injection&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Main_Page&amp;diff=455</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Main_Page&amp;diff=455"/>
		<updated>2021-01-02T17:20:55Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Guides ===&lt;br /&gt;
* [[Asus_PCE-AC88_with_hostapd|Asus PCE-AC88 with hostapd]] - extracting the firmware and configuring hostapd&lt;br /&gt;
&lt;br /&gt;
=== Asterisk ===&lt;br /&gt;
*[[Asterisk/SMS|Asterisk SMS]] - Sending and receiving SMS from SIP phones and ISDN&lt;br /&gt;
*[[fcusb2_module|Fritz!Card USB on 2.6.32]] - Compiling the kernel module for a Fritz!Card USB v2.1 on Debian &amp;quot;squeeze&amp;quot; with kernel 2.6.32&lt;br /&gt;
*[[Siemens Gigaset S685IP/Troubleshooting|Troubleshooting]] - Some stuff about the VoIP capable Siemen Gigaset S685IP:&lt;br /&gt;
*[[Asterisk/Skype|Skype over Asterisk]] via [[Headless_Skype|headless Skype]]&lt;br /&gt;
&lt;br /&gt;
=== XenServer ===&lt;br /&gt;
* [[XenServer/USBIP|USB over IP]] on XenServer 5.5.0 (dom0) and Debian Lenny 2.5.29 (domU)&lt;br /&gt;
* [[XenServer/FritzUSB|Fritz!Card USB v2.1]] kernel module for Debian Lenny 2.5.29 (domU)&lt;br /&gt;
&lt;br /&gt;
=== Cacti ===&lt;br /&gt;
* Wifi signal strength/channel/speed of [[Cacti/OpenWRT|OpenWRT]] radio devices&lt;br /&gt;
* [[Cacti/Bcache|bcache]]&lt;br /&gt;
=== Builds ===&lt;br /&gt;
*[[DIY Ambilight]]&lt;br /&gt;
*[[DIY NAS]]&lt;br /&gt;
*[[FPV Racing Drone]]&lt;br /&gt;
&lt;br /&gt;
=== Stuff ===&lt;br /&gt;
==== Hacks ====&lt;br /&gt;
*How i hacked my [[Xbox360|Xbox 360]]&lt;br /&gt;
*Privilege Escalation in the [[Promise_VTrak_M500f|Promise VTrak M500f]]&lt;br /&gt;
==== Scripts ====&lt;br /&gt;
*[[Scripts/dynsupdate|Dynamic NSupdate]] (for Bind9)&lt;br /&gt;
*[[Scripts/dynpowerup|Dynamic Powerup]] (for PowerDNS)&lt;br /&gt;
==== Kludges ====&lt;br /&gt;
*[[Remote_Logstalgia|Logstalgia with multiple hosts]]&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=454</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=454"/>
		<updated>2020-12-24T17:14:27Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should add the relay, because even when switched off, those 300 LEDs draw ~0.25 amps unless you completely cut the power by using a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266 WLED Steckplatine final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
* Power to the LED strip goes to the 1000 uF capacitor and from there into the power injector cables of the LED strip, but the 5V line for this i also wired into the relay: from power supply into &amp;quot;common&amp;quot; or &amp;quot;middle&amp;quot;, and to the LED strip from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off).&lt;br /&gt;
* Power to the electronics first goes to the control pins of the relay (because they provide enough contact surface to solder multiple connections), and from there to the 5V and GND pins on the ESP8266 and the high-voltage (well, still 5V) reference input on the level shifter. The GND between the level shifter and the ESP8266 was still connected from my early testing, so i left that in place, but i could also have soldered a separate connection from the relay&#039;s GND to the level shifter&#039;s GND. In short: all the electronics are on the same 5V and GND.&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A4)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A6). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B4 on the level shifter (the high-voltage output of input A4) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) gets connected to the signal pin on the relay.&lt;br /&gt;
* Pin OE (Output Enable) on the level shifter gets connected to the 3.3V input, too, otherwise the outputs won&#039;t output. Don&#039;t ask me how long it took me to figure that out.&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
* GND from the level shifter also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
* TODO: plugs on cables&lt;br /&gt;
* TODO: secondary power injection&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=453</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=453"/>
		<updated>2020-12-24T17:08:09Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should add the relay, because even when switched off, those 300 LEDs draw ~0.25 amps unless you completely cut the power by using a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266 WLED Steckplatine final.png|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Let&#039;s go over the connections so you&#039;ll understand what they do: the 5V and Ground from the power supply is split into two cables each, one for the electronics and one for the LED strip. &lt;br /&gt;
* Power to the LED strip goes to the 1000 uF capacitor and from there into the power injector cables of the LED strip, but the 5V line for this i also wired into the relay: from power supply into &amp;quot;common&amp;quot; or &amp;quot;middle&amp;quot;, and to the LED strip from &amp;quot;NO&amp;quot; (&amp;quot;normally open&amp;quot;, as we want the power to be cut when the relay is off).&lt;br /&gt;
* Power to the electronics first goes to the control pins of the relay (because they provide enough contact surface to solder multiple connections), and from there to the 5V and GND pins on the ESP8266 and the high-voltage (well, still 5V) reference input on the level shifter. The GND between the level shifter and the ESP8266 was still connected from my early testing, so i left that in place, but i could also have soldered a separate connection from the relay&#039;s GND to the level shifter&#039;s GND. In short: all the electronics are on the same 5V and GND.&lt;br /&gt;
* The level shifter gets an additional connection from the ESP8266&#039;s 3.3V pin to the low-voltage reference input.&lt;br /&gt;
* Pin D4 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the LEDs, so that gets connected to any of the inputs on the level shifter (i used A4)&lt;br /&gt;
* Pin D6 of the ESP8266 is the &amp;quot;data&amp;quot; pin for the relay, and that also goes to any of the inputs on the level shifter (i used A6). Technically it&#039;s not really necessary to use the level shifter to control the relay, as it should also work with 3.3V, but as i have 8 channels on the level shifter, that additional connection is just added peace of mind.&lt;br /&gt;
* Pin B4 on the level shifter (the high-voltage output of input A4) goes to the 470 Ohms resistor.&lt;br /&gt;
* Pin B6 on the level shifter (the high-voltage output of input A6) gets connected to the signal pin on the relay.&lt;br /&gt;
* From the 470 Ohms resistor, split the cable into two connections: one for the main data pin of the LED strip connector, the other for the backup data pin (as the WS2813 has two data pins for redundancy).&lt;br /&gt;
* GND from the level shifter also goes to the GND pin of the LED strip connector.&lt;br /&gt;
* The 5V input of the LED strip connector is NOT connected, otherwise it would bypass the relay and still draw power when the relay is off.&lt;br /&gt;
* TODO: plugs on cables&lt;br /&gt;
* TODO: secondary power injection&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=452</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=452"/>
		<updated>2020-12-24T16:09:02Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should add the relay, because even when switched off, those 300 LEDs draw ~0.25 amps unless you completely cut the power by using a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;br /&gt;
&lt;br /&gt;
[[File:ESP8266 WLED Steckplatine final.png|thumb|center]]&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=File:ESP8266_WLED_Steckplatine_final.png&amp;diff=451</id>
		<title>File:ESP8266 WLED Steckplatine final.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=File:ESP8266_WLED_Steckplatine_final.png&amp;diff=451"/>
		<updated>2020-12-24T16:08:49Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiring for DIY Ambilight&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=450</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=450"/>
		<updated>2020-12-24T16:05:16Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
&lt;br /&gt;
# Yes, you should add the relay, because even when switched off, those 300 LEDs draw ~0.25 amps unless you completely cut the power by using a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;br /&gt;
&lt;br /&gt;
After wiring it up, i would have liked to see something like the image below, but real life is messy so i won&#039;t show any actual photos of the build:&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=449</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=449"/>
		<updated>2020-12-24T16:00:13Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
For the first proof-of-concept build i just went with the setup shown in the [https://github.com/Aircoookie/WLED/wiki WLED Wiki] and the hardware i had laying around: an ESP8266 Board, a TXS0108E Level Shifter and a short WS2813 LED Strip. That got wired up on a breadboard and connected to a 5V power supply (although the USB connection for uploading the firmware would probably have been sufficient for those few LEDs - just don&#039;t go full brightness), et voilà, we have blinkenlights. I was able to control the LEDs via the web interface, and the included effects looked like everything was working a intended, so i moved on to full build stage.&lt;br /&gt;
&lt;br /&gt;
Two things i&#039;d like to point out right away, because i only noticed them after the first prototype was finished and i connected the full 5 meter LED strip to it and had to integrate these fixes when i thought i was already done:&lt;br /&gt;
# Yes, you should add the relay, because even when switched off, those 300 LEDs draw ~0.25 amps unless you completely cut the power by using a relay.&lt;br /&gt;
# Yes, you should inject power also from the other end of the LED strip, as there will be a very noticeable drop in brightness along the LED strip.&lt;br /&gt;
&lt;br /&gt;
So here&#039;s the bill of materials for my DIY Ambilight:&lt;br /&gt;
* ESP8266 Board [https://www.amazon.de/dp/B0754N794H/ Amazon] 3 for ~12€&lt;br /&gt;
* TXS0108E Level Shifter [https://www.amazon.de/dp/B07NNRS8FS/ Amazon] 6 for ~10€&lt;br /&gt;
* KY-019 Relay [https://www.amazon.de/dp/B07CNR7K9B/ Amazon] 3 for ~5€&lt;br /&gt;
* WS2813 LED Strip [https://www.amazon.de/dp/B07DPJNMRP/ Amazon] 5m for ~47€ (60LED/m, black, IP30)&lt;br /&gt;
* 5V 20A Power Supply [https://www.amazon.de/dp/B07PQT2Q7L/ Amazon] ~16€&lt;br /&gt;
* 4 pin LED Strip Connectors [https://www.amazon.de/dp/B012UXUSP6/ Amazon] ~5€&lt;br /&gt;
* 1000 uF Capacitor [https://www.amazon.de/dp/B0734T3GJ9/ Amazon] Set of 125 for ~9€&lt;br /&gt;
* 470 Ohm Resistor [https://www.amazon.de/dp/B07PZ3M75Z/ Amazon] Set of 500 for ~7€&lt;br /&gt;
&lt;br /&gt;
Breaking the cost down into what was actually used for my build, i ended up at ~75€. This does not cover the cost of the wires, connectors, soldering tin and tools i used, let alone the time, but it should give you a general idea. ProTip: buy electronics in bulk. It&#039;s cheaper, and it&#039;s always good to have some ESP8266, level shifters and relays at home. ;-)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=448</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=448"/>
		<updated>2020-12-24T15:22:51Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much so i deciced to build my own Ambilight clone.&lt;br /&gt;
&lt;br /&gt;
Most solutions seem to go the way of using a HDMI splitter and a HDMI capture card connected to a Raspberry Pi, which interprets the grabbed video frames and controls the LEDs connected to one of its GPIO pins. This is not the way i wanted to go, first because that would require running another Raspberry Pi, and second because that&#039;s where it gets expensive if you want something that captures at 4K@60Hz and does not mess up the HDMI connection.&lt;br /&gt;
&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB like the Lightpack does was also not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=447</id>
		<title>DIY Ambilight</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=DIY_Ambilight&amp;diff=447"/>
		<updated>2020-12-24T15:14:24Z</updated>

		<summary type="html">&lt;p&gt;Jan: Created page with &amp;quot;== Introduction == I&amp;#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box running for years, but after getting a new TV, the old Lightpack setup wasn...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
I&#039;ve been using two Lightpack v1 modules connected via USB to my mediacenter box running for years, but after getting a new TV, the old Lightpack setup wasn&#039;t big enough anymore. Pretty much all products that can be bought ready-to-use cost way too much, so i deciced to build my own Ambilight clone.&lt;br /&gt;
As one of the requirements was being able to use it with Kodi (on a Vero 4K+), Enigma (on a VU+ Uno 4K SE) and Android TV (on a Nvidia Shield TV Pro), controlling it via USB was not an option, unless i wanted to move the USB cable between each device whenever i switch to it, so it needed to be something that can be controlled via network.&lt;br /&gt;
&lt;br /&gt;
The very first search result for &amp;quot;ws2812b wifi&amp;quot; is [https://github.com/Aircoookie/WLED WLED], so i started reading up on what it does and how to use it. The short version: it&#039;s a firmware for the wifi-capable ESP8266 board which can control addressable RGB LEDs (commonly referred to as &amp;quot;ws2812b&amp;quot;). And it has support for [https://github.com/hyperion-project/hyperion.ng Hyperion], which is a software that can grab the display output of a video device and convert it to instructions for LED controllers. &lt;br /&gt;
&lt;br /&gt;
=== WLED ===&lt;br /&gt;
WLED seems to be around for less than two years (as of this writing) but it looks like it is very mature and has lots of features and supports many common protocols already. Using ESP8266 boards also makes it very easy to set up, as those boards cost &amp;lt;$5, can be bought pretty much anywhere and you only need a USB cable to upload new firmware (disclaimer: i&#039;ve been using them for years, so i may be a bit biased regarding what would be considered &amp;quot;easy to use&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
=== Hyperion ===&lt;br /&gt;
Hyperion was also the software i have been running on my Kodi boxes, as it provided a very reliable video grabber and made it reasonably easy to set up the LED layout, which is something you have to do so Hyperion can covert the rectangular image from the video grabber into a command for the LEDs at the respective positions. (It basically looks at the video image, sees that e.g. the top left corner is red, so it refers to the LED layout you configured because it needs to know which LEDs in the LED strip are mapped to the top left corner, so that it can send a command to turn those red, too.)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=446</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=446"/>
		<updated>2018-12-10T21:28:03Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have a PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware file, called &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt;,is readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs the firmware file &amp;lt;code&amp;gt;brcmfmac4366c-pcie.bin&amp;lt;/code&amp;gt; - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory. This is not the firmware, but, as mentioned before, only a kernel module containing the firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Investigation ====&lt;br /&gt;
To figure out what the start of the firmware file looks like, we have a look at &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt; from  the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package to get the first four hex bytes:&lt;br /&gt;
&lt;br /&gt;
 $ xxd /lib/firmware/brcm/brcmfmac4366b-pcie.bin | head -n1&lt;br /&gt;
 00000000: 00f2 3eb8 04f2 b0bf 04f2 bbbf 04f2 c6bf  ..&amp;gt;.............&lt;br /&gt;
&lt;br /&gt;
Now that we know that we&#039;re looking for the bytes &amp;lt;code&amp;gt;00 F2 3E B8&amp;lt;/code&amp;gt;, we can use &amp;lt;code&amp;gt;binwalk&amp;lt;/code&amp;gt; to look for the position of those bytes in the kernel module:&lt;br /&gt;
&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do it once more and grab that offset to put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
 256904&lt;br /&gt;
&lt;br /&gt;
So now we know at what offset the firmware starts, but where does it end? This gets a bit tricky, but stay with me: Kernel modules are ELF files (which you can verify by running &amp;lt;code&amp;gt;file dhd.ko&amp;lt;/code&amp;gt;), so we can use &amp;lt;code&amp;gt;readelf&amp;lt;/code&amp;gt; to get some information about the kernel module&#039;s structure, especially the objects (ko = kernel object) inside it:&lt;br /&gt;
 $ readelf -s dhd.ko | grep OBJECT&lt;br /&gt;
 ...&lt;br /&gt;
   484: 00004220     4 OBJECT  GLOBAL DEFAULT   35 dhd_radio_up&lt;br /&gt;
   487: 0000442c    20 OBJECT  GLOBAL DEFAULT   35 dlimagedate_4366c0&lt;br /&gt;
   521: 00000654     4 OBJECT  GLOBAL DEFAULT   35 dhd_download_fw_on_driver&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
   527: 00004210     4 OBJECT  GLOBAL DEFAULT   35 dhd_console_ms&lt;br /&gt;
   544: 00001058     4 OBJECT  GLOBAL DEFAULT   45 dhd_found&lt;br /&gt;
   545: 00004218     4 OBJECT  GLOBAL DEFAULT   35 dhd_master_mode&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We see a long list of tiny objects (the third column is the size), but one that sticks out because of its size, and the name &amp;lt;code&amp;gt;dlarray_4366c0&amp;lt;/code&amp;gt; also implies that we have found the object we are looking for - and its size.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s do that again, and also grab the size and put it into an environment variable:&lt;br /&gt;
 $ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
 $ echo ${SIZE}&lt;br /&gt;
 1094481&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Extraction ====&lt;br /&gt;
We have the kernel module, we know where the firmware starts, and we know the size of it, so now we can use &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; to extract the section that we think is is the firmware from the kernel module: &lt;br /&gt;
 $ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
This is not necessary, but let&#039;s get the full details about the firmware we just extracted:&lt;br /&gt;
 $ strings brcmfmac4366c-pcie.bin_10.10.122.47 | grep Version&lt;br /&gt;
 4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 13f8b3a1 Date: Tue 2018-08-14 10:45:51 CST FWID 01-ef91d5ac&lt;br /&gt;
&lt;br /&gt;
Or in a more readable format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Features || pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon&lt;br /&gt;
|-&lt;br /&gt;
| Version || 10.10.122.47&lt;br /&gt;
|-&lt;br /&gt;
| CRC || 13f8b3a1 &lt;br /&gt;
|-&lt;br /&gt;
| Date || Tue 2018-08-14 10:45:51 CST &lt;br /&gt;
|- &lt;br /&gt;
| FWID || 01-ef91d5ac&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
The &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module is looking for its firmware files in a specific folder, so you need to copy the extracted firmware there:&lt;br /&gt;
  $ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Initialization ====&lt;br /&gt;
You probably have the &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module still loaded, so let&#039;s unload and reload it:&lt;br /&gt;
 $ modprobe -r brcmfmac&lt;br /&gt;
 $ modprobe brcmfmac&lt;br /&gt;
&lt;br /&gt;
If everything went well, &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; should show you that it was able to initialize the chip with the firmware, even though it complains about &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.clm_blob&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[62448.893550] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[62449.000758] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.002127] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[62449.002137] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.txt (-2)&lt;br /&gt;
[62449.002330] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2&lt;br /&gt;
[62449.753733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.753749] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[62449.753926] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[62449.753928] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[62449.754055] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Sep 12 2016 13:26:44 version 10.10.69.6908 (r658761) FWID 01-fed440e1&lt;br /&gt;
[62449.767104] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Verification ====&lt;br /&gt;
Run the command below, and if you get a similar output you now have a working PCE-AC88.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ iw phy#0 info&lt;br /&gt;
Wiphy phy0&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Versions ====&lt;br /&gt;
The first line is the version reported in dmesg, the second line the strings in the firmware:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 $ ls -1 brcmfmac4366c-pcie.bin* | xargs -i% strings % | grep -P &#039;\d+\.\d+\.\d+\.\d+&#039;&lt;br /&gt;
10.10.122.303 (r666429)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 9ebbf2e1 Date: Wed 2017-07-26 14:44:35 CST FWID 01-fb27523d&lt;br /&gt;
10.10.122.303 (r666429)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 13f8b3a1 Date: Tue 2018-08-14 10:45:51 CST FWID 01-ef91d5ac&lt;br /&gt;
10.10.69.6908 (r658761)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-hostpmac-txpwr Version: 10.10.69.252 CRC: 9fa88ab1 Date: Mon 2016-09-12 13:28:49 CST Ucode Ver: 1073.579 FWID: 01-fed440e1&lt;br /&gt;
10.10.69.69017 (r730013)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-hostpmac-txpwr-stamon Version: 10.10.69.69017 (r730013) CRC: cf0b5621 Date: Tue 2017-11-07 12:34:00 CST Ucode Ver: 1073.579 FWID: 01-e258597c&lt;br /&gt;
10.10.69.69027 (r766943)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-hostpmac-txpwr-stamon Version: 10.10.69.69027 (r766943) CRC: 9055790c Date: Thu 2018-08-23 14:36:02 CST Ucode Ver: 1073.579 FWID: 01-15a952d6&lt;br /&gt;
10.10.69.69 (r625687)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-hostpmac Version: 10.10.69.69 CRC: 34d30c8c Date: Tue 2016-08-23 17:31:24 PDT FWID 01-8438621f&lt;br /&gt;
10.10.69.74 (r629731 WLTEST)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfgtest-seqcmds-phydbg-phydump-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-11nprop-dbgam-dbgams-ringer-dmaindex16-bgdfs-hostpmac Version: 10.10.69.74 CRC: a6268b76 Date: Mon 2016-09-12 16:39:23 CST FWID 01-5c0166fa&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== hostapd ==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
interface=wlp66s0&lt;br /&gt;
bridge=br0&lt;br /&gt;
driver=nl80211&lt;br /&gt;
&lt;br /&gt;
ctrl_interface=/var/run/hostapd&lt;br /&gt;
ctrl_interface_group=0&lt;br /&gt;
&lt;br /&gt;
##### IEEE 802.11&lt;br /&gt;
ssid=ThisIsMySSID&lt;br /&gt;
country_code=DE&lt;br /&gt;
ieee80211d=1&lt;br /&gt;
ieee80211h=1&lt;br /&gt;
hw_mode=a&lt;br /&gt;
channel=60&lt;br /&gt;
auth_algs=1&lt;br /&gt;
wmm_enabled=1&lt;br /&gt;
&lt;br /&gt;
##### IEEE 802.11n&lt;br /&gt;
ieee80211n=1&lt;br /&gt;
ht_capab=[HT40-] [SHORT-GI-40] [DSSS_CCK-40]&lt;br /&gt;
&lt;br /&gt;
##### IEEE 802.11ac&lt;br /&gt;
ieee80211ac=1&lt;br /&gt;
vht_capab=[VHT160] [SHORT-GI-80] [SHORT-GI-160] [BF-ANTENNA-4] [SOUNDING-DIMENSION-4] [MU-BEAMFORMER] [MU-BEAMFORMEE]&lt;br /&gt;
vht_oper_chwidth=1&lt;br /&gt;
vht_oper_centr_freq_seg0_idx=66&lt;br /&gt;
&lt;br /&gt;
##### WPA/IEEE 802.11i&lt;br /&gt;
wpa=2&lt;br /&gt;
wpa_passphrase=ThisIsMyPassword&lt;br /&gt;
wpa_key_mgmt=WPA-PSK&lt;br /&gt;
rsn_pairwise=CCMP&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=445</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=445"/>
		<updated>2018-12-09T13:03:00Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have a PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware file, called &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt;,is readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs the firmware file &amp;lt;code&amp;gt;brcmfmac4366c-pcie.bin&amp;lt;/code&amp;gt; - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory. This is not the firmware, but, as mentioned before, only a kernel module containing the firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Investigation ====&lt;br /&gt;
To figure out what the start of the firmware file looks like, we have a look at &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt; from  the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package to get the first four hex bytes:&lt;br /&gt;
&lt;br /&gt;
 $ xxd /lib/firmware/brcm/brcmfmac4366b-pcie.bin | head -n1&lt;br /&gt;
 00000000: 00f2 3eb8 04f2 b0bf 04f2 bbbf 04f2 c6bf  ..&amp;gt;.............&lt;br /&gt;
&lt;br /&gt;
Now that we know that we&#039;re looking for the bytes &amp;lt;code&amp;gt;00 F2 3E B8&amp;lt;/code&amp;gt;, we can use &amp;lt;code&amp;gt;binwalk&amp;lt;/code&amp;gt; to look for the position of those bytes in the kernel module:&lt;br /&gt;
&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do it once more and grab that offset to put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
 256904&lt;br /&gt;
&lt;br /&gt;
So now we know at what offset the firmware starts, but where does it end? This gets a bit tricky, but stay with me: Kernel modules are ELF files (which you can verify by running &amp;lt;code&amp;gt;file dhd.ko&amp;lt;/code&amp;gt;), so we can use &amp;lt;code&amp;gt;readelf&amp;lt;/code&amp;gt; to get some information about the kernel module&#039;s structure, especially the objects (ko = kernel object) inside it:&lt;br /&gt;
 $ readelf -s dhd.ko | grep OBJECT&lt;br /&gt;
 ...&lt;br /&gt;
   484: 00004220     4 OBJECT  GLOBAL DEFAULT   35 dhd_radio_up&lt;br /&gt;
   487: 0000442c    20 OBJECT  GLOBAL DEFAULT   35 dlimagedate_4366c0&lt;br /&gt;
   521: 00000654     4 OBJECT  GLOBAL DEFAULT   35 dhd_download_fw_on_driver&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
   527: 00004210     4 OBJECT  GLOBAL DEFAULT   35 dhd_console_ms&lt;br /&gt;
   544: 00001058     4 OBJECT  GLOBAL DEFAULT   45 dhd_found&lt;br /&gt;
   545: 00004218     4 OBJECT  GLOBAL DEFAULT   35 dhd_master_mode&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We see a long list of tiny objects (the third column is the size), but one that sticks out because of its size, and the name &amp;lt;code&amp;gt;dlarray_4366c0&amp;lt;/code&amp;gt; also implies that we have found the object we are looking for - and its size.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s do that again, and also grab the size and put it into an environment variable:&lt;br /&gt;
 $ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
 $ echo ${SIZE}&lt;br /&gt;
 1094481&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Extraction ====&lt;br /&gt;
We have the kernel module, we know where the firmware starts, and we know the size of it, so now we can use &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; to extract the section that we think is is the firmware from the kernel module: &lt;br /&gt;
 $ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
This is not necessary, but let&#039;s get the full details about the firmware we just extracted:&lt;br /&gt;
 $ strings brcmfmac4366c-pcie.bin_10.10.122.47 | grep Version&lt;br /&gt;
 4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 13f8b3a1 Date: Tue 2018-08-14 10:45:51 CST FWID 01-ef91d5ac&lt;br /&gt;
&lt;br /&gt;
Or in a more readable format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Features || pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon&lt;br /&gt;
|-&lt;br /&gt;
| Version || 10.10.122.47&lt;br /&gt;
|-&lt;br /&gt;
| CRC || 13f8b3a1 &lt;br /&gt;
|-&lt;br /&gt;
| Date || Tue 2018-08-14 10:45:51 CST &lt;br /&gt;
|- &lt;br /&gt;
| FWID || 01-ef91d5ac&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
The &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module is looking for its firmware files in a specific folder, so you need to copy the extracted firmware there:&lt;br /&gt;
  $ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Initialization ====&lt;br /&gt;
You probably have the &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module still loaded, so let&#039;s unload and reload it:&lt;br /&gt;
 $ modprobe -r brcmfmac&lt;br /&gt;
 $ modprobe brcmfmac&lt;br /&gt;
&lt;br /&gt;
If everything went well, &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; should show you that it was able to initialize the chip with the firmware, even though it complains about &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.clm_blob&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[62448.893550] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[62449.000758] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.002127] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[62449.002137] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.txt (-2)&lt;br /&gt;
[62449.002330] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2&lt;br /&gt;
[62449.753733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.753749] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[62449.753926] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[62449.753928] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[62449.754055] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Sep 12 2016 13:26:44 version 10.10.69.6908 (r658761) FWID 01-fed440e1&lt;br /&gt;
[62449.767104] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Verification ====&lt;br /&gt;
Run the command below, and if you get a similar output you now have a working PCE-AC88.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ iw phy#0 info&lt;br /&gt;
Wiphy phy0&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Versions ====&lt;br /&gt;
The first line is the version reported in dmesg, the second line the strings in the firmware:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 $ ls -1 brcmfmac4366c-pcie.bin* | xargs -i% strings % | grep -P &#039;\d+\.\d+\.\d+\.\d+&#039;&lt;br /&gt;
10.10.122.303 (r666429)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 9ebbf2e1 Date: Wed 2017-07-26 14:44:35 CST FWID 01-fb27523d&lt;br /&gt;
10.10.122.303 (r666429)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 13f8b3a1 Date: Tue 2018-08-14 10:45:51 CST FWID 01-ef91d5ac&lt;br /&gt;
10.10.69.6908 (r658761)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-hostpmac-txpwr Version: 10.10.69.252 CRC: 9fa88ab1 Date: Mon 2016-09-12 13:28:49 CST Ucode Ver: 1073.579 FWID: 01-fed440e1&lt;br /&gt;
10.10.69.69017 (r730013)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-hostpmac-txpwr-stamon Version: 10.10.69.69017 (r730013) CRC: cf0b5621 Date: Tue 2017-11-07 12:34:00 CST Ucode Ver: 1073.579 FWID: 01-e258597c&lt;br /&gt;
10.10.69.69027 (r766943)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-hostpmac-txpwr-stamon Version: 10.10.69.69027 (r766943) CRC: 9055790c Date: Thu 2018-08-23 14:36:02 CST Ucode Ver: 1073.579 FWID: 01-15a952d6&lt;br /&gt;
10.10.69.69 (r625687)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-hostpmac Version: 10.10.69.69 CRC: 34d30c8c Date: Tue 2016-08-23 17:31:24 PDT FWID 01-8438621f&lt;br /&gt;
10.10.69.74 (r629731 WLTEST)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfgtest-seqcmds-phydbg-phydump-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-11nprop-dbgam-dbgams-ringer-dmaindex16-bgdfs-hostpmac Version: 10.10.69.74 CRC: a6268b76 Date: Mon 2016-09-12 16:39:23 CST FWID 01-5c0166fa&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== hostapd ==&lt;br /&gt;
Not yet...&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=444</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=444"/>
		<updated>2018-12-09T13:01:54Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have an PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware file, called &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt;,is readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs the firmware file &amp;lt;code&amp;gt;brcmfmac4366c-pcie.bin&amp;lt;/code&amp;gt; - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory. This is not the firmware, but, as mentioned before, only a kernel module containing the firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Investigation ====&lt;br /&gt;
To figure out what the start of the firmware file looks like, we have a look at &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt; from  the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package to get the first four hex bytes:&lt;br /&gt;
&lt;br /&gt;
 $ xxd /lib/firmware/brcm/brcmfmac4366b-pcie.bin | head -n1&lt;br /&gt;
 00000000: 00f2 3eb8 04f2 b0bf 04f2 bbbf 04f2 c6bf  ..&amp;gt;.............&lt;br /&gt;
&lt;br /&gt;
Now that we know that we&#039;re looking for the bytes &amp;lt;code&amp;gt;00 F2 3E B8&amp;lt;/code&amp;gt;, we can use &amp;lt;code&amp;gt;binwalk&amp;lt;/code&amp;gt; to look for the position of those bytes in the kernel module:&lt;br /&gt;
&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do it once more and grab that offset to put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
 256904&lt;br /&gt;
&lt;br /&gt;
So now we know at what offset the firmware starts, but where does it end? This gets a bit tricky, but stay with me: Kernel modules are ELF files (which you can verify by running &amp;lt;code&amp;gt;file dhd.ko&amp;lt;/code&amp;gt;), so we can use &amp;lt;code&amp;gt;readelf&amp;lt;/code&amp;gt; to get some information about the kernel module&#039;s structure, especially the objects (ko = kernel object) inside it:&lt;br /&gt;
 $ readelf -s dhd.ko | grep OBJECT&lt;br /&gt;
 ...&lt;br /&gt;
   484: 00004220     4 OBJECT  GLOBAL DEFAULT   35 dhd_radio_up&lt;br /&gt;
   487: 0000442c    20 OBJECT  GLOBAL DEFAULT   35 dlimagedate_4366c0&lt;br /&gt;
   521: 00000654     4 OBJECT  GLOBAL DEFAULT   35 dhd_download_fw_on_driver&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
   527: 00004210     4 OBJECT  GLOBAL DEFAULT   35 dhd_console_ms&lt;br /&gt;
   544: 00001058     4 OBJECT  GLOBAL DEFAULT   45 dhd_found&lt;br /&gt;
   545: 00004218     4 OBJECT  GLOBAL DEFAULT   35 dhd_master_mode&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We see a long list of tiny objects (the third column is the size), but one that sticks out because of its size, and the name &amp;lt;code&amp;gt;dlarray_4366c0&amp;lt;/code&amp;gt; also implies that we have found the object we are looking for - and its size.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s do that again, and also grab the size and put it into an environment variable:&lt;br /&gt;
 $ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
 $ echo ${SIZE}&lt;br /&gt;
 1094481&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Extraction ====&lt;br /&gt;
We have the kernel module, we know where the firmware starts, and we know the size of it, so now we can use &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; to extract the section that we think is is the firmware from the kernel module: &lt;br /&gt;
 $ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
This is not necessary, but let&#039;s get the full details about the firmware we just extracted:&lt;br /&gt;
 $ strings brcmfmac4366c-pcie.bin_10.10.122.47 | grep Version&lt;br /&gt;
 4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 13f8b3a1 Date: Tue 2018-08-14 10:45:51 CST FWID 01-ef91d5ac&lt;br /&gt;
&lt;br /&gt;
Or in a more readable format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Features || pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon&lt;br /&gt;
|-&lt;br /&gt;
| Version || 10.10.122.47&lt;br /&gt;
|-&lt;br /&gt;
| CRC || 13f8b3a1 &lt;br /&gt;
|-&lt;br /&gt;
| Date || Tue 2018-08-14 10:45:51 CST &lt;br /&gt;
|- &lt;br /&gt;
| FWID || 01-ef91d5ac&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
The &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module is looking for its firmware files in a specific folder, so you need to copy the extracted firmware there:&lt;br /&gt;
  $ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Initialization ====&lt;br /&gt;
You probably have the &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module still loaded, so let&#039;s unload and reload it:&lt;br /&gt;
 $ modprobe -r brcmfmac&lt;br /&gt;
 $ modprobe brcmfmac&lt;br /&gt;
&lt;br /&gt;
If everything went well, &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; should show you that it was able to initialize the chip with the firmware, even though it complains about &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.clm_blob&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[62448.893550] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[62449.000758] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.002127] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[62449.002137] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.txt (-2)&lt;br /&gt;
[62449.002330] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2&lt;br /&gt;
[62449.753733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.753749] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[62449.753926] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[62449.753928] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[62449.754055] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Sep 12 2016 13:26:44 version 10.10.69.6908 (r658761) FWID 01-fed440e1&lt;br /&gt;
[62449.767104] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Verification ====&lt;br /&gt;
Run the command below, and if you get a similar output you now have a working PCE-AC88.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ iw phy#0 info&lt;br /&gt;
Wiphy phy0&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Versions ====&lt;br /&gt;
The first line is the version reported in dmesg, the second line the strings in the firmware:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 $ ls -1 brcmfmac4366c-pcie.bin* | xargs -i% strings % | grep -P &#039;\d+\.\d+\.\d+\.\d+&#039;&lt;br /&gt;
10.10.122.303 (r666429)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 9ebbf2e1 Date: Wed 2017-07-26 14:44:35 CST FWID 01-fb27523d&lt;br /&gt;
10.10.122.303 (r666429)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 13f8b3a1 Date: Tue 2018-08-14 10:45:51 CST FWID 01-ef91d5ac&lt;br /&gt;
10.10.69.6908 (r658761)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-hostpmac-txpwr Version: 10.10.69.252 CRC: 9fa88ab1 Date: Mon 2016-09-12 13:28:49 CST Ucode Ver: 1073.579 FWID: 01-fed440e1&lt;br /&gt;
10.10.69.69017 (r730013)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-hostpmac-txpwr-stamon Version: 10.10.69.69017 (r730013) CRC: cf0b5621 Date: Tue 2017-11-07 12:34:00 CST Ucode Ver: 1073.579 FWID: 01-e258597c&lt;br /&gt;
10.10.69.69027 (r766943)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-hostpmac-txpwr-stamon Version: 10.10.69.69027 (r766943) CRC: 9055790c Date: Thu 2018-08-23 14:36:02 CST Ucode Ver: 1073.579 FWID: 01-15a952d6&lt;br /&gt;
10.10.69.69 (r625687)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-hostpmac Version: 10.10.69.69 CRC: 34d30c8c Date: Tue 2016-08-23 17:31:24 PDT FWID 01-8438621f&lt;br /&gt;
10.10.69.74 (r629731 WLTEST)&lt;br /&gt;
4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfgtest-seqcmds-phydbg-phydump-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-11nprop-dbgam-dbgams-ringer-dmaindex16-bgdfs-hostpmac Version: 10.10.69.74 CRC: a6268b76 Date: Mon 2016-09-12 16:39:23 CST FWID 01-5c0166fa&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== hostapd ==&lt;br /&gt;
Not yet...&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=443</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=443"/>
		<updated>2018-12-09T10:12:30Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have an PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware file, called &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt;,is readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs the firmware file &amp;lt;code&amp;gt;brcmfmac4366c-pcie.bin&amp;lt;/code&amp;gt; - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory. This is not the firmware, but, as mentioned before, only a kernel module containing the firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Investigation ====&lt;br /&gt;
To figure out what the start of the firmware file looks like, we have a look at &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt; from  the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package to get the first four hex bytes:&lt;br /&gt;
&lt;br /&gt;
 $ xxd /lib/firmware/brcm/brcmfmac4366b-pcie.bin | head -n1&lt;br /&gt;
 00000000: 00f2 3eb8 04f2 b0bf 04f2 bbbf 04f2 c6bf  ..&amp;gt;.............&lt;br /&gt;
&lt;br /&gt;
Now that we know that we&#039;re looking for the bytes &amp;lt;code&amp;gt;00 F2 3E B8&amp;lt;/code&amp;gt;, we can use &amp;lt;code&amp;gt;binwalk&amp;lt;/code&amp;gt; to look for the position of those bytes in the kernel module:&lt;br /&gt;
&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do it once more and grab that offset to put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
 256904&lt;br /&gt;
&lt;br /&gt;
So now we know at what offset the firmware starts, but where does it end? This gets a bit tricky, but stay with me: Kernel modules are ELF files (which you can verify by running &amp;lt;code&amp;gt;file dhd.ko&amp;lt;/code&amp;gt;), so we can use &amp;lt;code&amp;gt;readelf&amp;lt;/code&amp;gt; to get some information about the kernel module&#039;s structure, especially the objects (ko = kernel object) inside it:&lt;br /&gt;
 $ readelf -s dhd.ko | grep OBJECT&lt;br /&gt;
 ...&lt;br /&gt;
   484: 00004220     4 OBJECT  GLOBAL DEFAULT   35 dhd_radio_up&lt;br /&gt;
   487: 0000442c    20 OBJECT  GLOBAL DEFAULT   35 dlimagedate_4366c0&lt;br /&gt;
   521: 00000654     4 OBJECT  GLOBAL DEFAULT   35 dhd_download_fw_on_driver&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
   527: 00004210     4 OBJECT  GLOBAL DEFAULT   35 dhd_console_ms&lt;br /&gt;
   544: 00001058     4 OBJECT  GLOBAL DEFAULT   45 dhd_found&lt;br /&gt;
   545: 00004218     4 OBJECT  GLOBAL DEFAULT   35 dhd_master_mode&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We see a long list of tiny objects (the third column is the size), but one that sticks out because of its size, and the name &amp;lt;code&amp;gt;dlarray_4366c0&amp;lt;/code&amp;gt; also implies that we have found the object we are looking for - and its size.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s do that again, and also grab the size and put it into an environment variable:&lt;br /&gt;
 $ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
 $ echo ${SIZE}&lt;br /&gt;
 1094481&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Extraction ====&lt;br /&gt;
We have the kernel module, we know where the firmware starts, and we know the size of it, so now we can use &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; to extract the section that we think is is the firmware from the kernel module: &lt;br /&gt;
 $ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
This is not necessary, but let&#039;s get the full details about the firmware we just extracted:&lt;br /&gt;
 $ strings brcmfmac4366c-pcie.bin_10.10.122.47 | grep Version&lt;br /&gt;
 4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 13f8b3a1 Date: Tue 2018-08-14 10:45:51 CST FWID 01-ef91d5ac&lt;br /&gt;
&lt;br /&gt;
Or in a more readable format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Features || pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon&lt;br /&gt;
|-&lt;br /&gt;
| Version || 10.10.122.47&lt;br /&gt;
|-&lt;br /&gt;
| CRC || 13f8b3a1 &lt;br /&gt;
|-&lt;br /&gt;
| Date || Tue 2018-08-14 10:45:51 CST &lt;br /&gt;
|- &lt;br /&gt;
| FWID || 01-ef91d5ac&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
The &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module is looking for its firmware files in a specific folder, so you need to copy the extracted firmware there:&lt;br /&gt;
  $ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Initialization ====&lt;br /&gt;
You probably have the &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module still loaded, so let&#039;s unload and reload it:&lt;br /&gt;
 $ modprobe -r brcmfmac&lt;br /&gt;
 $ modprobe brcmfmac&lt;br /&gt;
&lt;br /&gt;
If everything went well, &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; should show you that it was able to initialize the chip with the firmware, even though it complains about &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.clm_blob&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[62448.893550] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[62449.000758] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.002127] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[62449.002137] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.txt (-2)&lt;br /&gt;
[62449.002330] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2&lt;br /&gt;
[62449.753733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.753749] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[62449.753926] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[62449.753928] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[62449.754055] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Sep 12 2016 13:26:44 version 10.10.69.6908 (r658761) FWID 01-fed440e1&lt;br /&gt;
[62449.767104] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Verification ====&lt;br /&gt;
Run the command below, and if you get a similar output you now have a working PCE-AC88.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ iw phy#0 info&lt;br /&gt;
Wiphy phy0&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== hostapd ==&lt;br /&gt;
Not yet...&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=442</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=442"/>
		<updated>2018-12-08T16:11:41Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have an PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware file, called &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt;,is readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs the firmware file &amp;lt;code&amp;gt;brcmfmac4366c-pcie.bin&amp;lt;/code&amp;gt; - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory. This is not the firmware, but, as mentioned before, only a kernel module containing the firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Investigation ====&lt;br /&gt;
To figure out what the start of the firmware file looks like, we have a look at &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt; from  the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package to get the first four hex bytes:&lt;br /&gt;
&lt;br /&gt;
 $ xxd /lib/firmware/brcm/brcmfmac4366b-pcie.bin | head -n1&lt;br /&gt;
 00000000: 00f2 3eb8 04f2 b0bf 04f2 bbbf 04f2 c6bf  ..&amp;gt;.............&lt;br /&gt;
&lt;br /&gt;
Now that we know that we&#039;re looking for the bytes &amp;lt;code&amp;gt;00 F2 3E B8&amp;lt;/code&amp;gt;, we can use &amp;lt;code&amp;gt;binwalk&amp;lt;/code&amp;gt; to look for those bytes in the kernel module we extracted:&lt;br /&gt;
&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do it once more and grab that offset to put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
 256904&lt;br /&gt;
&lt;br /&gt;
So now we know at what offset the firmware starts, but where does it end? This gets a bit tricky, but stay with me: Kernel modules are ELF files (which you can verify by running &amp;lt;code&amp;gt;file dhd.ko&amp;lt;/code&amp;gt;), so we can use &amp;lt;code&amp;gt;readelf&amp;lt;/code&amp;gt; to get some information about the kernel module&#039;s structure, especially the objects (ko = kernel object) inside it:&lt;br /&gt;
 $ readelf -s dhd.ko | grep OBJECT&lt;br /&gt;
 ...&lt;br /&gt;
   484: 00004220     4 OBJECT  GLOBAL DEFAULT   35 dhd_radio_up&lt;br /&gt;
   487: 0000442c    20 OBJECT  GLOBAL DEFAULT   35 dlimagedate_4366c0&lt;br /&gt;
   521: 00000654     4 OBJECT  GLOBAL DEFAULT   35 dhd_download_fw_on_driver&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
   527: 00004210     4 OBJECT  GLOBAL DEFAULT   35 dhd_console_ms&lt;br /&gt;
   544: 00001058     4 OBJECT  GLOBAL DEFAULT   45 dhd_found&lt;br /&gt;
   545: 00004218     4 OBJECT  GLOBAL DEFAULT   35 dhd_master_mode&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We see a long list of tiny objects (the third column is the size), but one that sticks out because of its size, and the name &amp;lt;code&amp;gt;dlarray_4366c0&amp;lt;/code&amp;gt; also implies that we have found the object we are looking for - and its size.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s do that again, and also grab the size and put it into an environment variable:&lt;br /&gt;
 $ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
 $ echo ${SIZE}&lt;br /&gt;
 1094481&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Extraction ====&lt;br /&gt;
We have the kernel module, we know where the firmware starts, and we know the size of it, so now we can use &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; to extract the section that we think is is the firmware from the kernel module: &lt;br /&gt;
 $ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
This is not necessary, but let&#039;s get the full details about the firmware we just extracted:&lt;br /&gt;
 $ strings brcmfmac4366c-pcie.bin_10.10.122.47 | grep Version&lt;br /&gt;
 4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 13f8b3a1 Date: Tue 2018-08-14 10:45:51 CST FWID 01-ef91d5ac&lt;br /&gt;
&lt;br /&gt;
Or in a more readable format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Features || pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon&lt;br /&gt;
|-&lt;br /&gt;
| Version || 10.10.122.47&lt;br /&gt;
|-&lt;br /&gt;
| CRC || 13f8b3a1 &lt;br /&gt;
|-&lt;br /&gt;
| Date || Tue 2018-08-14 10:45:51 CST &lt;br /&gt;
|- &lt;br /&gt;
| FWID || 01-ef91d5ac&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
The &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module is looking for its firmware files in a specific folder, so you need to copy the extracted firmware there:&lt;br /&gt;
  $ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Initialization ====&lt;br /&gt;
You probably have the &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module still loaded, so let&#039;s unload and reload it:&lt;br /&gt;
 $ modprobe -r brcmfmac&lt;br /&gt;
 $ modprobe brcmfmac&lt;br /&gt;
&lt;br /&gt;
If everything went well, &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; should show you that it was able to initialize the chip with the firmware, even though it complains about &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.clm_blob&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[62448.893550] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[62449.000758] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.002127] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[62449.002137] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.txt (-2)&lt;br /&gt;
[62449.002330] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2&lt;br /&gt;
[62449.753733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.753749] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[62449.753926] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[62449.753928] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[62449.754055] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Sep 12 2016 13:26:44 version 10.10.69.6908 (r658761) FWID 01-fed440e1&lt;br /&gt;
[62449.767104] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Verification ====&lt;br /&gt;
Run the command below, and if you get a similar output you now have a working PCE-AC88.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ iw phy#0 info&lt;br /&gt;
Wiphy phy0&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== hostapd ==&lt;br /&gt;
Not yet...&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=441</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=441"/>
		<updated>2018-12-08T13:30:53Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have an PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware file, called &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt;,is readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs the firmware file &amp;lt;code&amp;gt;brcmfmac4366c-pcie.bin&amp;lt;/code&amp;gt; - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory. This is not the firmware, but, as mentioned before, only a kernel module containing the firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Investigation ====&lt;br /&gt;
To figure out what the start of the firmware file looks like, we have a look at &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt; from  the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package to get the first four hex bytes:&lt;br /&gt;
&lt;br /&gt;
 $ xxd /lib/firmware/brcm/brcmfmac4366b-pcie.bin | head -n1&lt;br /&gt;
 00000000: 00f2 3eb8 04f2 b0bf 04f2 bbbf 04f2 c6bf  ..&amp;gt;.............&lt;br /&gt;
&lt;br /&gt;
Now that we know that we&#039;re looking for the bytes &amp;lt;code&amp;gt;00 F2 3E B8&amp;lt;/code&amp;gt;, we can use &amp;lt;code&amp;gt;binwalk&amp;lt;/code&amp;gt; to look for those bytes in the kernel module we extracted:&lt;br /&gt;
&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do it once more and grab that offset to put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
 256904&lt;br /&gt;
&lt;br /&gt;
So now we know at what offset the firmware starts, but where does it end? This gets a bit tricky, but stay with me: Kernel modules are ELF files (which you can verify by running &amp;lt;code&amp;gt;file dhd.ko&amp;lt;/code&amp;gt;), so we can use &amp;lt;code&amp;gt;readelf&amp;lt;/code&amp;gt; to get some information about the kernel module&#039;s structure, especially the objects (ko = kernel object) inside it:&lt;br /&gt;
 $ readelf -s dhd.ko | grep OBJECT&lt;br /&gt;
 ...&lt;br /&gt;
   484: 00004220     4 OBJECT  GLOBAL DEFAULT   35 dhd_radio_up&lt;br /&gt;
   487: 0000442c    20 OBJECT  GLOBAL DEFAULT   35 dlimagedate_4366c0&lt;br /&gt;
   521: 00000654     4 OBJECT  GLOBAL DEFAULT   35 dhd_download_fw_on_driver&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
   527: 00004210     4 OBJECT  GLOBAL DEFAULT   35 dhd_console_ms&lt;br /&gt;
   544: 00001058     4 OBJECT  GLOBAL DEFAULT   45 dhd_found&lt;br /&gt;
   545: 00004218     4 OBJECT  GLOBAL DEFAULT   35 dhd_master_mode&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We see a long list of tiny objects (the third column is the size), but one that sticks out because of its size, and the name &amp;lt;code&amp;gt;dlarray_4366c0&amp;lt;/code&amp;gt; also implies that we have found the object we are looking for - and its size.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s do that again, and also grab the size and put it into an environment variable:&lt;br /&gt;
 $ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
 $ echo ${SIZE}&lt;br /&gt;
 1094481&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Extraction ====&lt;br /&gt;
We have the kernel module, we know where the firmware starts, and we know the size of it, so now we can use &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; to extract the section that we think is is the firmware from the kernel module: &lt;br /&gt;
 $ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
This is not necessary, but let&#039;s get the full details about the firmware we just extracted:&lt;br /&gt;
 $ strings brcmfmac4366c-pcie.bin_10.10.122.47 | grep Version&lt;br /&gt;
 4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 13f8b3a1 Date: Tue 2018-08-14 10:45:51 CST FWID 01-ef91d5ac&lt;br /&gt;
&lt;br /&gt;
Or in a more readable format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Features || pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon&lt;br /&gt;
|-&lt;br /&gt;
| Version || 10.10.122.47&lt;br /&gt;
|-&lt;br /&gt;
| CRC || 13f8b3a1 &lt;br /&gt;
|-&lt;br /&gt;
| Date || Tue 2018-08-14 10:45:51 CST &lt;br /&gt;
|- &lt;br /&gt;
| FWID || 01-ef91d5ac&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
The &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module is looking for its firmware files in a specific folder, so you need to copy the extracted firmware there:&lt;br /&gt;
  $ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Initialization ====&lt;br /&gt;
You probably have the &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module still loaded, so let&#039;s unload and reload it:&lt;br /&gt;
 $ modprobe -r brcmfmac&lt;br /&gt;
 $ modprobe brcmfmac&lt;br /&gt;
&lt;br /&gt;
If everything went well, &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; should show you that it was able to initialize the chip with the firmware, even though it complains about &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.clm_blob&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[62448.893550] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[62449.000758] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.002127] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[62449.002137] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.txt (-2)&lt;br /&gt;
[62449.002330] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2&lt;br /&gt;
[62449.753733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.753749] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[62449.753926] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[62449.753928] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[62449.754055] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Sep 12 2016 13:26:44 version 10.10.69.6908 (r658761) FWID 01-fed440e1&lt;br /&gt;
[62449.767104] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Verification ====&lt;br /&gt;
Run the command below, and if you get a similar output you now have a working PCE-AC88.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ iw phy#0 info&lt;br /&gt;
Wiphy phy0&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=440</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=440"/>
		<updated>2018-12-08T13:30:34Z</updated>

		<summary type="html">&lt;p&gt;Jan: /* Extraction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have an PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware file, called &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt;,is readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs the firmware file &amp;lt;code&amp;gt;brcmfmac4366c-pcie.bin&amp;lt;/code&amp;gt; - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory. This is not the firmware, but, as mentioned before, only a kernel module containing the firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Investigation ====&lt;br /&gt;
To figure out what the start of the firmware file looks like, we have a look at &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt; from  the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package to get the first four hex bytes:&lt;br /&gt;
&lt;br /&gt;
 $ xxd /lib/firmware/brcm/brcmfmac4366b-pcie.bin | head -n1&lt;br /&gt;
 00000000: 00f2 3eb8 04f2 b0bf 04f2 bbbf 04f2 c6bf  ..&amp;gt;.............&lt;br /&gt;
&lt;br /&gt;
Now that we know that we&#039;re looking for the bytes &amp;lt;code&amp;gt;00 F2 3E B8&amp;lt;/code&amp;gt;, we can use &amp;lt;code&amp;gt;binwalk&amp;lt;/code&amp;gt; to look for those bytes in the kernel module we extracted:&lt;br /&gt;
&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do it once more and grab that offset to put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
 256904&lt;br /&gt;
&lt;br /&gt;
So now we know at what offset the firmware starts, but where does it end? This gets a bit tricky, but stay with me: Kernel modules are ELF files (which you can verify by running &amp;lt;code&amp;gt;file dhd.ko&amp;lt;/code&amp;gt;), so we can use &amp;lt;code&amp;gt;readelf&amp;lt;/code&amp;gt; to get some information about the kernel module&#039;s structure, especially the objects (ko = kernel object) inside it:&lt;br /&gt;
 $ readelf -s dhd.ko | grep OBJECT&lt;br /&gt;
 ...&lt;br /&gt;
   484: 00004220     4 OBJECT  GLOBAL DEFAULT   35 dhd_radio_up&lt;br /&gt;
   487: 0000442c    20 OBJECT  GLOBAL DEFAULT   35 dlimagedate_4366c0&lt;br /&gt;
   521: 00000654     4 OBJECT  GLOBAL DEFAULT   35 dhd_download_fw_on_driver&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
   527: 00004210     4 OBJECT  GLOBAL DEFAULT   35 dhd_console_ms&lt;br /&gt;
   544: 00001058     4 OBJECT  GLOBAL DEFAULT   45 dhd_found&lt;br /&gt;
   545: 00004218     4 OBJECT  GLOBAL DEFAULT   35 dhd_master_mode&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We see a long list of tiny objects (the third column is the size), but one that sticks out because of its size, and the name &amp;lt;code&amp;gt;dlarray_4366c0&amp;lt;/code&amp;gt; also implies that we have found the object we are looking for - and its size.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s do that again, and also grab the size and put it into an environment variable:&lt;br /&gt;
 $ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
 $ echo ${SIZE}&lt;br /&gt;
 1094481&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Extraction ====&lt;br /&gt;
We have the kernel module, we know where the firmware starts, and we know the size of it, so now we can use &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; to extract the section that we think is is the firmware from the kernel module: &lt;br /&gt;
 $ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
This is not necessary, but let&#039;s get the full details about the firmware we just extracted:&lt;br /&gt;
 $ strings brcmfmac4366c-pcie.bin_10.10.122.47 | grep Version&lt;br /&gt;
 4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 13f8b3a1 Date: Tue 2018-08-14 10:45:51 CST FWID 01-ef91d5ac&lt;br /&gt;
&lt;br /&gt;
Or in a more readable format:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Features || pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon&lt;br /&gt;
|-&lt;br /&gt;
| Version || 10.10.122.47&lt;br /&gt;
|-&lt;br /&gt;
| CRC || 13f8b3a1 &lt;br /&gt;
|-&lt;br /&gt;
| Date || Tue 2018-08-14 10:45:51 CST &lt;br /&gt;
|- &lt;br /&gt;
| FWID || 01-ef91d5ac&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
The &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module is looking for its firmware files in a specific folder, so you need to copy the extracted firmware there:&lt;br /&gt;
  $ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Initialization ====&lt;br /&gt;
You probably have the &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module still loaded, so let&#039;s unload and reload it:&lt;br /&gt;
 $ modprobe -r brcmfmac&lt;br /&gt;
 $ modprobe brcmfmac&lt;br /&gt;
&lt;br /&gt;
If everything went well, &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; should show you that it was able to initialize the chip with the firmware, even though it complains about &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.clm_blob&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[62448.893550] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[62449.000758] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.002127] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[62449.002137] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.txt (-2)&lt;br /&gt;
[62449.002330] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2&lt;br /&gt;
[62449.753733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.753749] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[62449.753926] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[62449.753928] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[62449.754055] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Sep 12 2016 13:26:44 version 10.10.69.6908 (r658761) FWID 01-fed440e1&lt;br /&gt;
[62449.767104] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Verification ====&lt;br /&gt;
Run the command below, and if you get a similar output you now have a working PCE-AC88.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ iw phy#0 info&lt;br /&gt;
Wiphy phy0&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=439</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=439"/>
		<updated>2018-12-08T13:26:28Z</updated>

		<summary type="html">&lt;p&gt;Jan: /* Extraction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have an PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware file, called &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt;,is readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs the firmware file &amp;lt;code&amp;gt;brcmfmac4366c-pcie.bin&amp;lt;/code&amp;gt; - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory. This is not the firmware, but, as mentioned before, only a kernel module containing the firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Investigation ====&lt;br /&gt;
To figure out what the start of the firmware file looks like, we have a look at &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt; from  the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package to get the first four hex bytes:&lt;br /&gt;
&lt;br /&gt;
 $ xxd /lib/firmware/brcm/brcmfmac4366b-pcie.bin | head -n1&lt;br /&gt;
 00000000: 00f2 3eb8 04f2 b0bf 04f2 bbbf 04f2 c6bf  ..&amp;gt;.............&lt;br /&gt;
&lt;br /&gt;
Now that we know that we&#039;re looking for the bytes &amp;lt;code&amp;gt;00 F2 3E B8&amp;lt;/code&amp;gt;, we can use &amp;lt;code&amp;gt;binwalk&amp;lt;/code&amp;gt; to look for those bytes in the kernel module we extracted:&lt;br /&gt;
&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do it once more and grab that offset to put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
 256904&lt;br /&gt;
&lt;br /&gt;
So now we know at what offset the firmware starts, but where does it end? This gets a bit tricky, but stay with me: Kernel modules are ELF files (which you can verify by running &amp;lt;code&amp;gt;file dhd.ko&amp;lt;/code&amp;gt;), so we can use &amp;lt;code&amp;gt;readelf&amp;lt;/code&amp;gt; to get some information about the kernel module&#039;s structure, especially the objects (ko = kernel object) inside it:&lt;br /&gt;
 $ readelf -s dhd.ko | grep OBJECT&lt;br /&gt;
 ...&lt;br /&gt;
   484: 00004220     4 OBJECT  GLOBAL DEFAULT   35 dhd_radio_up&lt;br /&gt;
   487: 0000442c    20 OBJECT  GLOBAL DEFAULT   35 dlimagedate_4366c0&lt;br /&gt;
   521: 00000654     4 OBJECT  GLOBAL DEFAULT   35 dhd_download_fw_on_driver&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
   527: 00004210     4 OBJECT  GLOBAL DEFAULT   35 dhd_console_ms&lt;br /&gt;
   544: 00001058     4 OBJECT  GLOBAL DEFAULT   45 dhd_found&lt;br /&gt;
   545: 00004218     4 OBJECT  GLOBAL DEFAULT   35 dhd_master_mode&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We see a long list of tiny objects (the third column is the size), but one that sticks out because of its size, and the name &amp;lt;code&amp;gt;dlarray_4366c0&amp;lt;/code&amp;gt; also implies that we have found the object we are looking for - and its size.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s do that again, and also grab the size and put it into an environment variable:&lt;br /&gt;
 $ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
 $ echo ${SIZE}&lt;br /&gt;
 1094481&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Extraction ====&lt;br /&gt;
We have the kernel module, we know where the firmware starts, and we know the size of it, so now we can use &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; to extract the section that we think is is the firmware from the kernel module: &lt;br /&gt;
 $ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
This is not necessary, but let&#039;s get the full details about the firmware we just extracted:&lt;br /&gt;
 $ strings brcmfmac4366c-pcie.bin_10.10.122.47 | grep Version&lt;br /&gt;
 4366c0-roml/pcie-ag-splitrx-fdap-mbss-mfp-wnm-osen-wl11k-wl11u-txbf-pktctx-amsdutx-ampduretry-chkd2hdma-proptxstatus-11nprop-obss-dbwsw-ringer-dmaindex16-bgdfs-stamon-hostpmac-murx-splitassoc-hostmemucode-dyn160-txpwr-stamon Version: 10.10.122.47 CRC: 13f8b3a1 Date: Tue 2018-08-14 10:45:51 CST FWID 01-ef91d5ac&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
The &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module is looking for its firmware files in a specific folder, so you need to copy the extracted firmware there:&lt;br /&gt;
  $ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Initialization ====&lt;br /&gt;
You probably have the &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module still loaded, so let&#039;s unload and reload it:&lt;br /&gt;
 $ modprobe -r brcmfmac&lt;br /&gt;
 $ modprobe brcmfmac&lt;br /&gt;
&lt;br /&gt;
If everything went well, &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; should show you that it was able to initialize the chip with the firmware, even though it complains about &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.clm_blob&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[62448.893550] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[62449.000758] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.002127] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[62449.002137] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.txt (-2)&lt;br /&gt;
[62449.002330] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2&lt;br /&gt;
[62449.753733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.753749] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[62449.753926] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[62449.753928] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[62449.754055] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Sep 12 2016 13:26:44 version 10.10.69.6908 (r658761) FWID 01-fed440e1&lt;br /&gt;
[62449.767104] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Verification ====&lt;br /&gt;
Run the command below, and if you get a similar output you now have a working PCE-AC88.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ iw phy#0 info&lt;br /&gt;
Wiphy phy0&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Main_Page&amp;diff=438</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Main_Page&amp;diff=438"/>
		<updated>2018-12-08T13:21:50Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Guides ===&lt;br /&gt;
* [[Asus_PCE-AC88_with_hostapd|Asus PCE-AC88 with hostapd]] - extracting the firmware and configuring hostapd&lt;br /&gt;
&lt;br /&gt;
=== Asterisk ===&lt;br /&gt;
*[[Asterisk/SMS|Asterisk SMS]] - Sending and receiving SMS from SIP phones and ISDN&lt;br /&gt;
*[[fcusb2_module|Fritz!Card USB on 2.6.32]] - Compiling the kernel module for a Fritz!Card USB v2.1 on Debian &amp;quot;squeeze&amp;quot; with kernel 2.6.32&lt;br /&gt;
*[[Siemens Gigaset S685IP/Troubleshooting|Troubleshooting]] - Some stuff about the VoIP capable Siemen Gigaset S685IP:&lt;br /&gt;
*[[Asterisk/Skype|Skype over Asterisk]] via [[Headless_Skype|headless Skype]]&lt;br /&gt;
&lt;br /&gt;
=== XenServer ===&lt;br /&gt;
* [[XenServer/USBIP|USB over IP]] on XenServer 5.5.0 (dom0) and Debian Lenny 2.5.29 (domU)&lt;br /&gt;
* [[XenServer/FritzUSB|Fritz!Card USB v2.1]] kernel module for Debian Lenny 2.5.29 (domU)&lt;br /&gt;
&lt;br /&gt;
=== Cacti ===&lt;br /&gt;
* Wifi signal strength/channel/speed of [[Cacti/OpenWRT|OpenWRT]] radio devices&lt;br /&gt;
* [[Cacti/Bcache|bcache]]&lt;br /&gt;
=== Builds ===&lt;br /&gt;
*[[DIY NAS]]&lt;br /&gt;
*[[FPV Racing Drone]]&lt;br /&gt;
&lt;br /&gt;
=== Stuff ===&lt;br /&gt;
==== Hacks ====&lt;br /&gt;
*How i hacked my [[Xbox360|Xbox 360]]&lt;br /&gt;
*Privilege Escalation in the [[Promise_VTrak_M500f|Promise VTrak M500f]]&lt;br /&gt;
==== Scripts ====&lt;br /&gt;
*[[Scripts/dynsupdate|Dynamic NSupdate]] (for Bind9)&lt;br /&gt;
*[[Scripts/dynpowerup|Dynamic Powerup]] (for PowerDNS)&lt;br /&gt;
==== Kludges ====&lt;br /&gt;
*[[Remote_Logstalgia|Logstalgia with multiple hosts]]&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=437</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=437"/>
		<updated>2018-12-08T13:18:01Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have an PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware file, called &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt;,is readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs the firmware file &amp;lt;code&amp;gt;brcmfmac4366c-pcie.bin&amp;lt;/code&amp;gt; - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Firmware ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory. This is not the firmware, but, as mentioned before, only a kernel module containing the firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Investigation ====&lt;br /&gt;
To figure out what the start of the firmware file looks like, we have a look at &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt; from  the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package to get the first four hex bytes:&lt;br /&gt;
&lt;br /&gt;
 $ xxd /lib/firmware/brcm/brcmfmac4366b-pcie.bin | head -n1&lt;br /&gt;
 00000000: 00f2 3eb8 04f2 b0bf 04f2 bbbf 04f2 c6bf  ..&amp;gt;.............&lt;br /&gt;
&lt;br /&gt;
Now that we know that we&#039;re looking for the bytes &amp;lt;code&amp;gt;00 F2 3E B8&amp;lt;/code&amp;gt;, we can use &amp;lt;code&amp;gt;binwalk&amp;lt;/code&amp;gt; to look for those bytes in the kernel module we extracted:&lt;br /&gt;
&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do it once more and grab that offset to put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
 256904&lt;br /&gt;
&lt;br /&gt;
So now we know at what offset the firmware starts, but where does it end? This gets a bit tricky, but stay with me: Kernel modules are ELF files (which you can verify by running &amp;lt;code&amp;gt;file dhd.ko&amp;lt;/code&amp;gt;), so we can use &amp;lt;code&amp;gt;readelf&amp;lt;/code&amp;gt; to get some information about the kernel module&#039;s structure, especially the objects (ko = kernel object) inside it:&lt;br /&gt;
 $ readelf -s dhd.ko | grep OBJECT&lt;br /&gt;
 ...&lt;br /&gt;
   484: 00004220     4 OBJECT  GLOBAL DEFAULT   35 dhd_radio_up&lt;br /&gt;
   487: 0000442c    20 OBJECT  GLOBAL DEFAULT   35 dlimagedate_4366c0&lt;br /&gt;
   521: 00000654     4 OBJECT  GLOBAL DEFAULT   35 dhd_download_fw_on_driver&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
   527: 00004210     4 OBJECT  GLOBAL DEFAULT   35 dhd_console_ms&lt;br /&gt;
   544: 00001058     4 OBJECT  GLOBAL DEFAULT   45 dhd_found&lt;br /&gt;
   545: 00004218     4 OBJECT  GLOBAL DEFAULT   35 dhd_master_mode&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We see a long list of tiny objects (the third column is the size), but one that sticks out because of its size, and the name &amp;lt;code&amp;gt;dlarray_4366c0&amp;lt;/code&amp;gt; also implies that we have found the object we are looking for - and its size.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s do that again, and also grab the size and put it into an environment variable:&lt;br /&gt;
 $ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
 $ echo ${SIZE}&lt;br /&gt;
 1094481&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Extraction ====&lt;br /&gt;
We have the kernel module, we know where the firmware starts, and we know the size of it, so now we can use &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; to extract the section that we think is is the firmware from the kernel module: &lt;br /&gt;
  $ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
The &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module is looking for its firmware files in a specific folder, so you need to copy the extracted firmware there:&lt;br /&gt;
  $ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Initialization ====&lt;br /&gt;
You probably have the &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module still loaded, so let&#039;s unload and reload it:&lt;br /&gt;
 $ modprobe -r brcmfmac&lt;br /&gt;
 $ modprobe brcmfmac&lt;br /&gt;
&lt;br /&gt;
If everything went well, &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; should show you that it was able to initialize the chip with the firmware, even though it complains about &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.clm_blob&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[62448.893550] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[62449.000758] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.002127] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[62449.002137] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.txt (-2)&lt;br /&gt;
[62449.002330] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2&lt;br /&gt;
[62449.753733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.753749] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[62449.753926] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[62449.753928] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[62449.754055] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Sep 12 2016 13:26:44 version 10.10.69.6908 (r658761) FWID 01-fed440e1&lt;br /&gt;
[62449.767104] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Verification ====&lt;br /&gt;
Run the command below, and if you get a similar output you now have a working PCE-AC88.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ iw phy#0 info&lt;br /&gt;
Wiphy phy0&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=436</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=436"/>
		<updated>2018-12-08T13:11:12Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have an PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware file, called &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt;,is readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs the firmware file &amp;lt;code&amp;gt;brcmfmac4366c-pcie.bin&amp;lt;/code&amp;gt; - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Howto ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory. This is not the firmware, but, as mentioned before, only a kernel module containing the firmware.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Investigation ====&lt;br /&gt;
To figure out what the start of the firmware file looks like, we have a look at &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt; from  the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package to get the first four hex bytes:&lt;br /&gt;
&lt;br /&gt;
 $ xxd /lib/firmware/brcm/brcmfmac4366b-pcie.bin | head -n1&lt;br /&gt;
 00000000: 00f2 3eb8 04f2 b0bf 04f2 bbbf 04f2 c6bf  ..&amp;gt;.............&lt;br /&gt;
&lt;br /&gt;
Now that we know that we&#039;re looking for the bytes &amp;lt;code&amp;gt;00 F2 3E B8&amp;lt;/code&amp;gt;, we can use &amp;lt;code&amp;gt;binwalk&amp;lt;/code&amp;gt; to look for those bytes in the kernel module we extracted:&lt;br /&gt;
&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do it once more and grab that offset to put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
 256904&lt;br /&gt;
&lt;br /&gt;
So now we know at what offset the firmware starts, but where does it end? This gets a bit tricky, but stay with me: Kernel modules are ELF files (which you can verify by running &amp;lt;code&amp;gt;file dhd.ko&amp;lt;/code&amp;gt;), so we can use &amp;lt;code&amp;gt;readelf&amp;lt;/code&amp;gt; to get some information about the kernel module&#039;s structure, especially the objects (ko = kernel object) inside it:&lt;br /&gt;
 $ readelf -s dhd.ko | grep OBJECT&lt;br /&gt;
 ...&lt;br /&gt;
   484: 00004220     4 OBJECT  GLOBAL DEFAULT   35 dhd_radio_up&lt;br /&gt;
   487: 0000442c    20 OBJECT  GLOBAL DEFAULT   35 dlimagedate_4366c0&lt;br /&gt;
   521: 00000654     4 OBJECT  GLOBAL DEFAULT   35 dhd_download_fw_on_driver&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
   527: 00004210     4 OBJECT  GLOBAL DEFAULT   35 dhd_console_ms&lt;br /&gt;
   544: 00001058     4 OBJECT  GLOBAL DEFAULT   45 dhd_found&lt;br /&gt;
   545: 00004218     4 OBJECT  GLOBAL DEFAULT   35 dhd_master_mode&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We see a long list of tiny objects (the third column is the size), but one that sticks out because of its size, and the name &amp;lt;code&amp;gt;dlarray_4366c0&amp;lt;/code&amp;gt; also implies that we have found the object we are looking for - and its size.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s do that again, and also grab the size and put it into an environment variable:&lt;br /&gt;
 $ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
 $ echo ${SIZE}&lt;br /&gt;
 1094481&lt;br /&gt;
&lt;br /&gt;
==== Extraction ====&lt;br /&gt;
We have the kernel module, we know where the firmware starts, and we know the size of it, so now we can use &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; to extract the section that we think is is the firmware from the kernel module: &lt;br /&gt;
  $ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
The &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module is looking for its firmware files in a specific folder, so you need to copy the extracted firmware there:&lt;br /&gt;
  $ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Initialization ====&lt;br /&gt;
You probably have the &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module still loaded, so let&#039;s unload and reload it:&lt;br /&gt;
 $ modprobe -r brcmfmac&lt;br /&gt;
 $ modprobe brcmfmac&lt;br /&gt;
&lt;br /&gt;
If everything went well, &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; should show you that it was able to initialize the chip with the firmware, even though it complains about &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.clm_blob&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[62448.893550] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[62449.000758] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.002127] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[62449.002137] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.txt (-2)&lt;br /&gt;
[62449.002330] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2&lt;br /&gt;
[62449.753733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.753749] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[62449.753926] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[62449.753928] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[62449.754055] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Sep 12 2016 13:26:44 version 10.10.69.6908 (r658761) FWID 01-fed440e1&lt;br /&gt;
[62449.767104] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Verification ====&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ iw phy#1 info&lt;br /&gt;
Wiphy phy1&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=435</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=435"/>
		<updated>2018-12-08T13:06:21Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have an PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware file, called &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt;,is readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs the firmware file &amp;lt;code&amp;gt;brcmfmac4366c-pcie.bin&amp;lt;/code&amp;gt; - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
== Howto ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
==== Preparation ====&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory. This is not the firmware, but, as mentioned before, only a kernel module containing the firmware.&lt;br /&gt;
&lt;br /&gt;
==== Investigation ====&lt;br /&gt;
To figure out what the start of the firmware file looks like, we have a look at &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt; from  the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package to get the first four hex bytes:&lt;br /&gt;
&lt;br /&gt;
 $ xxd /lib/firmware/brcm/brcmfmac4366b-pcie.bin | head -n1&lt;br /&gt;
 00000000: 00f2 3eb8 04f2 b0bf 04f2 bbbf 04f2 c6bf  ..&amp;gt;.............&lt;br /&gt;
&lt;br /&gt;
Now that we know that we&#039;re looking for the bytes &amp;lt;code&amp;gt;00 F2 3E B8&amp;lt;/code&amp;gt;, we can use &amp;lt;code&amp;gt;binwalk&amp;lt;/code&amp;gt; to look for those bytes in the kernel module we extracted:&lt;br /&gt;
&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do it once more and grab that offset to put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
 256904&lt;br /&gt;
&lt;br /&gt;
So now we know at what offset the firmware starts, but where does it end? This gets a bit tricky, but stay with me: Kernel modules are ELF files (which you can verify by running &amp;lt;code&amp;gt;file dhd.ko&amp;lt;/code&amp;gt;), so we can use &amp;lt;code&amp;gt;readelf&amp;lt;/code&amp;gt; to get some information about the kernel module&#039;s structure, especially the objects (ko = kernel object) inside it:&lt;br /&gt;
 $ readelf -s dhd.ko | grep OBJECT&lt;br /&gt;
 ...&lt;br /&gt;
   484: 00004220     4 OBJECT  GLOBAL DEFAULT   35 dhd_radio_up&lt;br /&gt;
   487: 0000442c    20 OBJECT  GLOBAL DEFAULT   35 dlimagedate_4366c0&lt;br /&gt;
   521: 00000654     4 OBJECT  GLOBAL DEFAULT   35 dhd_download_fw_on_driver&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
   527: 00004210     4 OBJECT  GLOBAL DEFAULT   35 dhd_console_ms&lt;br /&gt;
   544: 00001058     4 OBJECT  GLOBAL DEFAULT   45 dhd_found&lt;br /&gt;
   545: 00004218     4 OBJECT  GLOBAL DEFAULT   35 dhd_master_mode&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We see a long list of tiny objects (the third column is the size), but one that sticks out because of its size, and the name &amp;lt;code&amp;gt;dlarray_4366c0&amp;lt;/code&amp;gt; also implies that we have found the object we are looking for - and its size.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s do that again, and also grab the size and put it into an environment variable:&lt;br /&gt;
 $ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
 $ echo ${SIZE}&lt;br /&gt;
 1094481&lt;br /&gt;
&lt;br /&gt;
==== Extraction ====&lt;br /&gt;
We have the kernel module, we know where the firmware starts, and we know the size of it, so now we can use &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt; to extract the section that we think is is the firmware from the kernel module: &lt;br /&gt;
  $ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
==== Installation ====&lt;br /&gt;
The &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module is looking for its firmware files in a specific folder, so you need to copy the extracted firmware there:&lt;br /&gt;
  $ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
&lt;br /&gt;
==== Initialization ===&lt;br /&gt;
You probably have the &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; module still loaded, so let&#039;s unload and reload it:&lt;br /&gt;
 $ modprobe -r brcmfmac&lt;br /&gt;
 $ modprobe brcmfmac&lt;br /&gt;
&lt;br /&gt;
If everything went well, &amp;lt;code&amp;gt;dmesg&amp;lt;/code&amp;gt; should show you that it was able to initialize the chip with the firmware, even though it complains about &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;brcm/brcmfmac4366c-pcie.clm_blob&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[62448.893550] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[62449.000758] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.002127] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[62449.002137] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.txt (-2)&lt;br /&gt;
[62449.002330] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2&lt;br /&gt;
[62449.753733] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[62449.753749] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[62449.753926] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[62449.753928] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[62449.754055] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Sep 12 2016 13:26:44 version 10.10.69.6908 (r658761) FWID 01-fed440e1&lt;br /&gt;
[62449.767104] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ iw phy#1 info&lt;br /&gt;
Wiphy phy1&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=434</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=434"/>
		<updated>2018-12-08T12:54:04Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have an PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware file, called &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt;,is readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs the firmware file &amp;lt;code&amp;gt;brcmfmac4366c-pcie.bin&amp;lt;/code&amp;gt; - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
== Howto ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory. This is not the firmware, but, as mentioned before, only a kernel module containing the firmware.&lt;br /&gt;
&lt;br /&gt;
To figure out what the start of the firmware file looks like, we have a look at &amp;lt;code&amp;gt;brcmfmac4366b-pcie.bin&amp;lt;/code&amp;gt; from  the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package to get the first four hex bytes:&lt;br /&gt;
&lt;br /&gt;
 $ xxd /lib/firmware/brcm/brcmfmac4366b-pcie.bin | head -n1&lt;br /&gt;
 00000000: 00f2 3eb8 04f2 b0bf 04f2 bbbf 04f2 c6bf  ..&amp;gt;.............&lt;br /&gt;
&lt;br /&gt;
Now that we know that we&#039;re looking for the bytes &amp;lt;code&amp;gt;00 F2 3E B8&amp;lt;/code&amp;gt;, we can use &amp;lt;code&amp;gt;binwalk&amp;lt;/code&amp;gt; to look for those bytes in the kernel module we extracted:&lt;br /&gt;
&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do it once more and grab that offset to put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
 256904&lt;br /&gt;
&lt;br /&gt;
So now we know at what offset the firmware starts, but where does it end? This gets a bit tricky, but stay with me: Kernel modules are ELF files (which you can verify by running &amp;lt;code&amp;gt;file dhd.ko&amp;lt;/code&amp;gt;), so we can use &amp;lt;code&amp;gt;readelf&amp;lt;/code&amp;gt; to get some information about the kernel module&#039;s structure, especially the objects (ko = kernel object) inside it:&lt;br /&gt;
 $ readelf -s dhd.ko | grep OBJECT&lt;br /&gt;
 ...&lt;br /&gt;
   484: 00004220     4 OBJECT  GLOBAL DEFAULT   35 dhd_radio_up&lt;br /&gt;
   487: 0000442c    20 OBJECT  GLOBAL DEFAULT   35 dlimagedate_4366c0&lt;br /&gt;
   521: 00000654     4 OBJECT  GLOBAL DEFAULT   35 dhd_download_fw_on_driver&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
   527: 00004210     4 OBJECT  GLOBAL DEFAULT   35 dhd_console_ms&lt;br /&gt;
   544: 00001058     4 OBJECT  GLOBAL DEFAULT   45 dhd_found&lt;br /&gt;
   545: 00004218     4 OBJECT  GLOBAL DEFAULT   35 dhd_master_mode&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
We see a long list of tiny objects (the third column is the size), but one that sticks out because of its size, and the name &amp;lt;code&amp;gt;dlarray_4366c0&amp;lt;/code&amp;gt; also implies that we have found the object we are looking for - and its size.&lt;br /&gt;
&lt;br /&gt;
So let&#039;s do that again, and also grab the size and put it into an environment variable:&lt;br /&gt;
 $ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
 $ echo ${SIZE}&lt;br /&gt;
 1094481&lt;br /&gt;
&lt;br /&gt;
$ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
$ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
$ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.txt&lt;br /&gt;
&lt;br /&gt;
[ 4254.199723] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[ 4254.306332] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[ 4254.307882] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[ 4254.308213] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.txt&lt;br /&gt;
[ 4255.083576] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[ 4255.083600] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[ 4255.083616] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[ 4255.083618] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[ 4255.083843] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Aug 14 2018 10:35:53 version 10.10.122.303 (r666429) FWID 01-ef91d5ac&lt;br /&gt;
[ 4255.096622] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&lt;br /&gt;
&lt;br /&gt;
$ iw phy#1 info&lt;br /&gt;
Wiphy phy1&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=433</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=433"/>
		<updated>2018-12-08T12:18:28Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have an PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware is, acording to my previous research, readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs different firmware - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
== Howto ==&lt;br /&gt;
The first step is to download the current [https://www.asus.com/us/Networking/RT-AC88U/HelpDesk_Download/ firmware package] for the Asus RT-AC88U - which is the Asus Wifi router with the same chip in it. Why? It also runs Linux, so it obviously also needs the firmware for that chip! You can pick any OS (e.g. &amp;quot;Others&amp;quot;) from the dropdown menu, as long as you download the file below &amp;quot;Firmware&amp;quot;. For me that was version &amp;lt;code&amp;gt;3.0.0.4.384.45149&amp;lt;/code&amp;gt;, released just 2 days ago.&lt;br /&gt;
&lt;br /&gt;
Download that file to a folder, make sure you have &amp;lt;code&amp;gt;p7zip&amp;lt;/code&amp;gt; installed, then run the following to extract the kernel module that contains the firmware somewhere inside it:&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory.&lt;br /&gt;
The firmware&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8\x04\xf2&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8\x04\xf2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Let&#039;s grab that offset and put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$ readelf -s dhd.ko | grep dlarray_4366c0&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
&lt;br /&gt;
$ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
$ echo ${SIZE}&lt;br /&gt;
&lt;br /&gt;
$ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
$ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
$ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.txt&lt;br /&gt;
&lt;br /&gt;
[ 4254.199723] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[ 4254.306332] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[ 4254.307882] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[ 4254.308213] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.txt&lt;br /&gt;
[ 4255.083576] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[ 4255.083600] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[ 4255.083616] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[ 4255.083618] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[ 4255.083843] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Aug 14 2018 10:35:53 version 10.10.122.303 (r666429) FWID 01-ef91d5ac&lt;br /&gt;
[ 4255.096622] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&lt;br /&gt;
&lt;br /&gt;
$ iw phy#1 info&lt;br /&gt;
Wiphy phy1&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=432</id>
		<title>Asus PCE-AC88 with hostapd</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Asus_PCE-AC88_with_hostapd&amp;diff=432"/>
		<updated>2018-12-08T11:57:13Z</updated>

		<summary type="html">&lt;p&gt;Jan: Created page with &amp;quot;== Intro == For several years i&amp;#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacem...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Intro ==&lt;br /&gt;
For several years i&#039;ve been using [https://w1.fi/hostapd/ hostapd] on my home server to create a Wifi access point for all my devices, but due to a recent replacement of the server&#039;s hardware, i needed to get a new Wifi adapter as the new mainboard didn&#039;t have an PCI slot anymore.&lt;br /&gt;
&lt;br /&gt;
After initially buying a [https://www.tp-link.com/us/products/details/cat-11_Archer-T9E.html TP-Link Archer T9E], which needs a closed-source driver and doesn&#039;t even support master (AP) mode, i (finally!) did a bit more research and found the [https://www.asus.com/Networking/PCE-AC88/ Asus PCE-AC88] to be a worthy, albeit expensive, candidate.&lt;br /&gt;
&lt;br /&gt;
The PCE-AC88 uses the Broadcom BCM4366 chip, which is supported by the open-source &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver - if you feed it the proper (still proprietary) firmware. Luckily that firmware is, acording to my previous research, readily available for Debian 9 in the &amp;lt;code&amp;gt;firmware-brcm80211&amp;lt;/code&amp;gt; package - so &#039;&#039;what could possibly go wrong&#039;&#039;?&lt;br /&gt;
&lt;br /&gt;
Well, getting a card with a newer hardware revision (v4), which needs different firmware - that&#039;s what &#039;&#039;could possibly go wrong&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Fortunately i&#039;m not the only person with issues like this, so there were other people who figured out ways how to get a firmware if there is no official source for it. So here&#039;s how i did it...&lt;br /&gt;
&lt;br /&gt;
== Howto ==&lt;br /&gt;
&lt;br /&gt;
 7z x FW_RT_AC88U_300438445149.zip&lt;br /&gt;
 7z x RT-AC88U/RT-AC88U_3.0.0.4_384_45149-g467037b.trx lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko&lt;br /&gt;
 mv lib/modules/2.6.36.4brcmarm/kernel/drivers/net/dhd/dhd.ko ./&lt;br /&gt;
 rm -r ./RT-AC88U ./lib&lt;br /&gt;
&lt;br /&gt;
This will give you the file &amp;lt;code&amp;gt;dhd.ko&amp;lt;/code&amp;gt; in the current directory.&lt;br /&gt;
The firmware&lt;br /&gt;
 $ binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko&lt;br /&gt;
&lt;br /&gt;
DECIMAL       HEXADECIMAL     DESCRIPTION&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
256904        0x3EB88         \x00\xf2\x3e\xb8\x04\xf2&lt;br /&gt;
256936        0x3EBA8         \x00\xf2\x3e\xb8\x04\xf2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Let&#039;s grab that offset and put it into an environment variable:&lt;br /&gt;
 $ OFFSET=$(binwalk -R &amp;quot;\x00\xf2\x3e\xb8\x04\xf2&amp;quot; dhd.ko | sed &#039;4!d&#039; | awk &#039;{print $1}&#039;)&lt;br /&gt;
 $ echo ${OFFSET}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$ readelf -s dhd.ko | grep dlarray_4366c0&lt;br /&gt;
   526: 00004448 0x10b351 OBJECT  GLOBAL DEFAULT   35 dlarray_4366c0&lt;br /&gt;
&lt;br /&gt;
$ SIZE=$(readelf -s dhd.ko | grep dlarray_4366c0 | awk &#039;{print $3}&#039; | xargs printf &amp;quot;%d\n&amp;quot;)&lt;br /&gt;
$ echo ${SIZE}&lt;br /&gt;
&lt;br /&gt;
$ dd if=dhd.ko skip=${OFFSET} ibs=1 count=${SIZE} of=brcmfmac4366c-pcie.bin&lt;br /&gt;
$ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
$ cp brcmfmac4366c-pcie.bin /lib/firmware/brcm/brcmfmac4366c-pcie.txt&lt;br /&gt;
&lt;br /&gt;
[ 4254.199723] usbcore: registered new interface driver brcmfmac&lt;br /&gt;
[ 4254.306332] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[ 4254.307882] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.bin&lt;br /&gt;
[ 4254.308213] brcmfmac 0000:42:00.0: firmware: direct-loading firmware brcm/brcmfmac4366c-pcie.txt&lt;br /&gt;
[ 4255.083576] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM4366/4&lt;br /&gt;
[ 4255.083600] brcmfmac 0000:42:00.0: firmware: failed to load brcm/brcmfmac4366c-pcie.clm_blob (-2)&lt;br /&gt;
[ 4255.083616] brcmfmac 0000:42:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.clm_blob failed with error -2&lt;br /&gt;
[ 4255.083618] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available&lt;br /&gt;
[ 4255.083843] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4366/4 wl0: Aug 14 2018 10:35:53 version 10.10.122.303 (r666429) FWID 01-ef91d5ac&lt;br /&gt;
[ 4255.096622] brcmfmac 0000:42:00.0 wlp66s0: renamed from wlan0&lt;br /&gt;
&lt;br /&gt;
$ iw phy#1 info&lt;br /&gt;
Wiphy phy1&lt;br /&gt;
        max # scan SSIDs: 10&lt;br /&gt;
        max scan IEs length: 2048 bytes&lt;br /&gt;
        max # sched scan SSIDs: 0&lt;br /&gt;
        max # match sets: 0&lt;br /&gt;
        max # scan plans: 1&lt;br /&gt;
        max scan plan interval: -1&lt;br /&gt;
        max scan plan iterations: 0&lt;br /&gt;
        Retry short limit: 7&lt;br /&gt;
        Retry long limit: 4&lt;br /&gt;
        Coverage class: 0 (up to 0m)&lt;br /&gt;
        Device supports roaming.&lt;br /&gt;
        Supported Ciphers:&lt;br /&gt;
                * WEP40 (00-0f-ac:1)&lt;br /&gt;
                * WEP104 (00-0f-ac:5)&lt;br /&gt;
                * TKIP (00-0f-ac:2)&lt;br /&gt;
                * CCMP-128 (00-0f-ac:4)&lt;br /&gt;
                * CMAC (00-0f-ac:6)&lt;br /&gt;
        Available Antennas: TX 0 RX 0&lt;br /&gt;
        Supported interface modes:&lt;br /&gt;
                 * IBSS&lt;br /&gt;
                 * managed&lt;br /&gt;
                 * AP&lt;br /&gt;
                 * P2P-client&lt;br /&gt;
                 * P2P-GO&lt;br /&gt;
                 * P2P-device&lt;br /&gt;
        Band 1:&lt;br /&gt;
                Capabilities: 0x1022&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 1.0 Mbps&lt;br /&gt;
                        * 2.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 5.5 Mbps (short preamble supported)&lt;br /&gt;
                        * 11.0 Mbps (short preamble supported)&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 2412 MHz [1] (20.0 dBm)&lt;br /&gt;
                        * 2417 MHz [2] (20.0 dBm)&lt;br /&gt;
                        * 2422 MHz [3] (20.0 dBm)&lt;br /&gt;
                        * 2427 MHz [4] (20.0 dBm)&lt;br /&gt;
                        * 2432 MHz [5] (20.0 dBm)&lt;br /&gt;
                        * 2437 MHz [6] (20.0 dBm)&lt;br /&gt;
                        * 2442 MHz [7] (20.0 dBm)&lt;br /&gt;
                        * 2447 MHz [8] (20.0 dBm)&lt;br /&gt;
                        * 2452 MHz [9] (20.0 dBm)&lt;br /&gt;
                        * 2457 MHz [10] (20.0 dBm)&lt;br /&gt;
                        * 2462 MHz [11] (20.0 dBm)&lt;br /&gt;
                        * 2467 MHz [12] (20.0 dBm)&lt;br /&gt;
                        * 2472 MHz [13] (20.0 dBm)&lt;br /&gt;
                        * 2484 MHz [14] (disabled)&lt;br /&gt;
        Band 2:&lt;br /&gt;
                Capabilities: 0x1062&lt;br /&gt;
                        HT20/HT40&lt;br /&gt;
                        Static SM Power Save&lt;br /&gt;
                        RX HT20 SGI&lt;br /&gt;
                        RX HT40 SGI&lt;br /&gt;
                        No RX STBC&lt;br /&gt;
                        Max AMSDU length: 3839 bytes&lt;br /&gt;
                        DSSS/CCK HT40&lt;br /&gt;
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)&lt;br /&gt;
                Minimum RX AMPDU time spacing: 16 usec (0x07)&lt;br /&gt;
                HT TX/RX MCS rate indexes supported: 0-31&lt;br /&gt;
                VHT Capabilities (0x0c1b4064):&lt;br /&gt;
                        Max MPDU length: 3895&lt;br /&gt;
                        Supported Channel Width: 160 MHz&lt;br /&gt;
                        short GI (80 MHz)&lt;br /&gt;
                        short GI (160/80+80 MHz)&lt;br /&gt;
                        MU Beamformer&lt;br /&gt;
                        MU Beamformee&lt;br /&gt;
                VHT RX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT RX highest supported: 0 Mbps&lt;br /&gt;
                VHT TX MCS set:&lt;br /&gt;
                        1 streams: MCS 0-9&lt;br /&gt;
                        2 streams: MCS 0-9&lt;br /&gt;
                        3 streams: MCS 0-9&lt;br /&gt;
                        4 streams: MCS 0-9&lt;br /&gt;
                        5 streams: not supported&lt;br /&gt;
                        6 streams: not supported&lt;br /&gt;
                        7 streams: not supported&lt;br /&gt;
                        8 streams: not supported&lt;br /&gt;
                VHT TX highest supported: 0 Mbps&lt;br /&gt;
                Bitrates (non-HT):&lt;br /&gt;
                        * 6.0 Mbps&lt;br /&gt;
                        * 9.0 Mbps&lt;br /&gt;
                        * 12.0 Mbps&lt;br /&gt;
                        * 18.0 Mbps&lt;br /&gt;
                        * 24.0 Mbps&lt;br /&gt;
                        * 36.0 Mbps&lt;br /&gt;
                        * 48.0 Mbps&lt;br /&gt;
                        * 54.0 Mbps&lt;br /&gt;
                Frequencies:&lt;br /&gt;
                        * 5170 MHz [34] (disabled)&lt;br /&gt;
                        * 5180 MHz [36] (20.0 dBm)&lt;br /&gt;
                        * 5190 MHz [38] (disabled)&lt;br /&gt;
                        * 5200 MHz [40] (20.0 dBm)&lt;br /&gt;
                        * 5210 MHz [42] (disabled)&lt;br /&gt;
                        * 5220 MHz [44] (20.0 dBm)&lt;br /&gt;
                        * 5230 MHz [46] (disabled)&lt;br /&gt;
                        * 5240 MHz [48] (20.0 dBm)&lt;br /&gt;
                        * 5260 MHz [52] (disabled)&lt;br /&gt;
                        * 5280 MHz [56] (disabled)&lt;br /&gt;
                        * 5300 MHz [60] (disabled)&lt;br /&gt;
                        * 5320 MHz [64] (disabled)&lt;br /&gt;
                        * 5500 MHz [100] (disabled)&lt;br /&gt;
                        * 5520 MHz [104] (disabled)&lt;br /&gt;
                        * 5540 MHz [108] (disabled)&lt;br /&gt;
                        * 5560 MHz [112] (disabled)&lt;br /&gt;
                        * 5580 MHz [116] (disabled)&lt;br /&gt;
                        * 5600 MHz [120] (disabled)&lt;br /&gt;
                        * 5620 MHz [124] (disabled)&lt;br /&gt;
                        * 5640 MHz [128] (disabled)&lt;br /&gt;
                        * 5660 MHz [132] (disabled)&lt;br /&gt;
                        * 5680 MHz [136] (disabled)&lt;br /&gt;
                        * 5700 MHz [140] (disabled)&lt;br /&gt;
                        * 5720 MHz [144] (disabled)&lt;br /&gt;
                        * 5745 MHz [149] (disabled)&lt;br /&gt;
                        * 5765 MHz [153] (disabled)&lt;br /&gt;
                        * 5785 MHz [157] (disabled)&lt;br /&gt;
                        * 5805 MHz [161] (disabled)&lt;br /&gt;
                        * 5825 MHz [165] (disabled)&lt;br /&gt;
        Supported commands:&lt;br /&gt;
                 * new_interface&lt;br /&gt;
                 * set_interface&lt;br /&gt;
                 * new_key&lt;br /&gt;
                 * start_ap&lt;br /&gt;
                 * join_ibss&lt;br /&gt;
                 * set_pmksa&lt;br /&gt;
                 * del_pmksa&lt;br /&gt;
                 * flush_pmksa&lt;br /&gt;
                 * remain_on_channel&lt;br /&gt;
                 * frame&lt;br /&gt;
                 * set_wiphy_netns&lt;br /&gt;
                 * set_channel&lt;br /&gt;
                 * start_p2p_device&lt;br /&gt;
                 * connect&lt;br /&gt;
                 * disconnect&lt;br /&gt;
                 * crit_protocol_start&lt;br /&gt;
                 * crit_protocol_stop&lt;br /&gt;
                 * Unknown command (122)&lt;br /&gt;
        Supported TX frame types:&lt;br /&gt;
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0&lt;br /&gt;
        Supported RX frame types:&lt;br /&gt;
                 * managed: 0x40 0xd0&lt;br /&gt;
                 * P2P-client: 0x40 0xd0&lt;br /&gt;
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0&lt;br /&gt;
                 * P2P-device: 0x40 0xd0&lt;br /&gt;
        WoWLAN support:&lt;br /&gt;
                 * wake up on disconnect&lt;br /&gt;
                 * wake up on magic packet&lt;br /&gt;
                 * wake up on pattern match, up to 8 patterns of 1-128 bytes,&lt;br /&gt;
                   maximum packet offset 1500 bytes&lt;br /&gt;
        software interface modes (can always be added):&lt;br /&gt;
        valid interface combinations:&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1, #{ P2P-client, P2P-GO } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 3, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ managed } &amp;lt;= 1, #{ AP } &amp;lt;= 1, #{ P2P-client } &amp;lt;= 1, #{ P2P-device } &amp;lt;= 1,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1&lt;br /&gt;
                 * #{ AP } &amp;lt;= 4,&lt;br /&gt;
                   total &amp;lt;= 4, #channels &amp;lt;= 1, STA/AP BI must match&lt;br /&gt;
        Device supports scan flush.&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Kodi&amp;diff=429</id>
		<title>Kodi</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Kodi&amp;diff=429"/>
		<updated>2017-11-12T18:04:14Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Standalone Kodi from Scratch =&lt;br /&gt;
&lt;br /&gt;
This is how i installed a standalone Kodi &amp;quot;Krypton&amp;quot; 17 on a Gigabyte GA-F2A88XN-WIFI Mini-ITX board with an AMD A8-7600 APU and a Samsung EVO 850 SSD.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve skipped the Wifi setup because i&#039;m using a wired connection (high quality 1080p streaming is nicer without buffering).&lt;br /&gt;
&lt;br /&gt;
== Install OS ==&lt;br /&gt;
* Ubuntu 16.04 (netboot via PXE is perfect, but you can use whatever you want, preferably Ubuntu Server)&lt;br /&gt;
* New User: kodi&lt;br /&gt;
* In the software selection dialog choose:&lt;br /&gt;
** [x] Basic Ubuntu server&lt;br /&gt;
** [x] OpenSSH server&lt;br /&gt;
&lt;br /&gt;
== Install Kodi ==&lt;br /&gt;
* i used the &amp;quot;unstable&amp;quot; PPA, but if you prefer final releases just replace the &amp;quot;unstable&amp;quot; with &amp;quot;ppa&amp;quot;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo add-apt-repository -y ppa:team-xbmc/unstable&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y xinit alsa-utils avahi-daemon libva-glx1 libva-egl1 upower libcurl3 mysql-client mesa-utils mesa-vdpau-drivers vdpauinfo xserver-xorg-video-radeon kodi &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* allow &amp;quot;anybody&amp;quot; to start the X server&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo apt-get install xserver-xorg-legacy&lt;br /&gt;
sudo dpkg-reconfigure xserver-xorg-legacy&lt;br /&gt;
sudo sed -i &#039;s/allowed_users=console/allowed_users=anybody/&#039; /etc/X11/Xwrapper.config&lt;br /&gt;
echo needs_root_rights=yes | sudo tee -a /etc/X11/Xwrapper.config&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* grant the &amp;quot;kodi&amp;quot; user access to serial devices (CEC), the soundcard and to shutdown, reboot, etc.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo usermod -aG users,dialout,audio,video,sudo kodi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* grant the audio thread a higher priority&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;echo &amp;quot;kodi             -       nice            -1&amp;quot; | sudo tee -a /etc/security/limits.conf&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* add some tweaks to &#039;&#039;&#039;/etc/X11/xorg.conf&#039;&#039;&#039; to eliminate tearing&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Section &amp;quot;Device&amp;quot;&lt;br /&gt;
  Identifier &amp;quot;Radeon&amp;quot;&lt;br /&gt;
  Driver &amp;quot;radeon&amp;quot;&lt;br /&gt;
  Option &amp;quot;ColorTiling&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
  Option &amp;quot;ColorTiling2D&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
  Option &amp;quot;DRI&amp;quot; &amp;quot;3&amp;quot;&lt;br /&gt;
  Option &amp;quot;TearFree&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
  Option &amp;quot;AccelMethod&amp;quot; &amp;quot;glamor&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Allow Shutdown/Reboot ==&lt;br /&gt;
* create &#039;&#039;&#039;/etc/polkit-1/localauthority/50-local.d/custom-actions.pkla&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[Actions for kodi user]&lt;br /&gt;
Identity=unix-user:kodi&lt;br /&gt;
Action=org.freedesktop.login1.reboot;org.freedesktop.login1.reboot-multiple-sessions;org.freedesktop.login1.power-off;org.freedesktop.login1.power-off-multiple-sessions;org.freedesktop.login1.suspend;org.freedesktop.login1.suspend-multiple-sessions;org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions&lt;br /&gt;
ResultAny=yes&lt;br /&gt;
ResultInactive=yes&lt;br /&gt;
ResultActive=yes&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Splashscreen (optional) ==&lt;br /&gt;
This only started working as expexted after i disabled the &amp;quot;Fullscreen BIOS Logo&amp;quot; in my BIOS.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo apt-get install -y plymouth-label v86d&lt;br /&gt;
wget https://dl.dropboxusercontent.com/u/22410524/xbmc/plymouth-theme/plymouth-theme-kodi-logo.deb&lt;br /&gt;
sudo dpkg -i plymouth-theme-kodi-logo.deb&lt;br /&gt;
echo &amp;quot;GRUB_GFXMODE=1920x1080&amp;quot; | sudo tee -a /etc/default/grub&lt;br /&gt;
echo &amp;quot;GRUB_GFXPAYLOAD_LINUX=keep&amp;quot; | sudo tee -a /etc/default/grub&lt;br /&gt;
sudo update-grub&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Autostart Kodi ==&lt;br /&gt;
* create &#039;&#039;&#039;/etc/systemd/system/kodi.service&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[Unit]&lt;br /&gt;
Description=Job that runs Kodi&lt;br /&gt;
After=getty.target sound.target network.target&lt;br /&gt;
Wants=network-online.target&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
User=kodi&lt;br /&gt;
Restart=always&lt;br /&gt;
RestartSec=1s&lt;br /&gt;
ExecStart=/usr/bin/xinit /usr/bin/kodi --standalone -- /usr/bin/X -bs -nocursor -nolisten tcp :0&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* enable the startup script&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo systemctl daemon-reload&lt;br /&gt;
sudo systemctl enable kodi.service&lt;br /&gt;
sudo systemctl enable systemd-networkd.service&lt;br /&gt;
sudo systemctl enable systemd-networkd-wait-online.service&lt;br /&gt;
sudo ln -s /etc/systemd/system/kodi.service /etc/systemd/system/display-manager.service&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* reboot. now. Kodi won&#039;t start with the new driver unless you reboot&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo reboot&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Custom Tweaks =&lt;br /&gt;
== ALSA Dual Audio (Digital &amp;amp; Analog) ==&lt;br /&gt;
I have a pair of Bass Shakers (a.k.a. Butt Kickers) that need receive audio output, too. Usually you&#039;d use the LFE channel of surround content, but as some content (e.g. Music) is only in Stereo, i want all audio always output via S/PDIF to my AV receiver and additionally via jack to the subwoofer amp (which does the low-pass filtering itself).&lt;br /&gt;
Surround content stays surround for the digital output, but will also be converted to stereo for the analog output, and stereo gets output as is.&lt;br /&gt;
&lt;br /&gt;
This is what my &#039;&#039;&#039;/etc/asound.conf&#039;&#039;&#039; looks like:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;pcm.main {&lt;br /&gt;
  #type    hw&lt;br /&gt;
  #card    1&lt;br /&gt;
  #device  1&lt;br /&gt;
  type plug&lt;br /&gt;
  slave.pcm &amp;quot;iec958:CARD=Generic,DEV=0&amp;quot;&lt;br /&gt;
  slave.rate 48000&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pcm.shaker {&lt;br /&gt;
  type    hw&lt;br /&gt;
  card    1&lt;br /&gt;
  device  0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
pcm.!default {&lt;br /&gt;
  type plug&lt;br /&gt;
  hint.show on&lt;br /&gt;
  hint.description &amp;quot;S/PDIF 2.0 &amp;amp; Analog 2.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  slave.channels 2&lt;br /&gt;
  slave.pcm {&lt;br /&gt;
    type route&lt;br /&gt;
&lt;br /&gt;
    ttable.0.0 1.0&lt;br /&gt;
    ttable.1.1 1.0&lt;br /&gt;
&lt;br /&gt;
    ttable.0.2 1.0&lt;br /&gt;
    ttable.1.3 1.0&lt;br /&gt;
&lt;br /&gt;
    slave.channels 4&lt;br /&gt;
    slave.pcm {&lt;br /&gt;
      type multi&lt;br /&gt;
&lt;br /&gt;
      slaves.a.pcm       &amp;quot;main&amp;quot;&lt;br /&gt;
      slaves.a.channels  2&lt;br /&gt;
      slaves.b.pcm       &amp;quot;shaker&amp;quot;&lt;br /&gt;
      slaves.b.channels  2&lt;br /&gt;
&lt;br /&gt;
      bindings.0.slave   a&lt;br /&gt;
      bindings.0.channel 0&lt;br /&gt;
      bindings.1.slave   a&lt;br /&gt;
      bindings.1.channel 1&lt;br /&gt;
&lt;br /&gt;
      bindings.2.slave   b&lt;br /&gt;
      bindings.2.channel 0&lt;br /&gt;
      bindings.3.slave   b&lt;br /&gt;
      bindings.3.channel 1&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pcm.!surround51 {&lt;br /&gt;
  type plug&lt;br /&gt;
  hint.show on&lt;br /&gt;
  hint.description &amp;quot;S/PDIF 5.1 &amp;amp; Analog 2.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  slave.channels 6&lt;br /&gt;
  slave.pcm {&lt;br /&gt;
    type route&lt;br /&gt;
&lt;br /&gt;
    ttable.0.0 1.0&lt;br /&gt;
    ttable.1.1 1.0&lt;br /&gt;
    ttable.2.2 1.0&lt;br /&gt;
    ttable.3.3 1.0&lt;br /&gt;
    ttable.4.4 1.0&lt;br /&gt;
    ttable.5.5 1.0&lt;br /&gt;
&lt;br /&gt;
    ttable.0.6 1.0&lt;br /&gt;
    ttable.2.6 -0.87177978870813471044739639677192&lt;br /&gt;
    ttable.3.6 -0.48989794855663561963945681494118&lt;br /&gt;
    ttable.4.6 0.70710678118654752440084436210485&lt;br /&gt;
    ttable.5.6 0.70710678118654752440084436210485&lt;br /&gt;
&lt;br /&gt;
    ttable.1.7 1.0&lt;br /&gt;
    ttable.2.7 0.48989794855663561963945681494118&lt;br /&gt;
    ttable.3.7 0.87177978870813471044739639677192&lt;br /&gt;
    ttable.4.7 0.70710678118654752440084436210485&lt;br /&gt;
    ttable.5.7 0.70710678118654752440084436210485&lt;br /&gt;
&lt;br /&gt;
    slave.channels 8&lt;br /&gt;
    slave.pcm {&lt;br /&gt;
      type multi&lt;br /&gt;
&lt;br /&gt;
      slaves.a.pcm      &amp;quot;main&amp;quot;&lt;br /&gt;
      slaves.a.channels 6&lt;br /&gt;
      slaves.b.pcm      &amp;quot;shaker&amp;quot;&lt;br /&gt;
      slaves.b.channels 2&lt;br /&gt;
&lt;br /&gt;
      bindings.0.slave   a&lt;br /&gt;
      bindings.0.channel 0&lt;br /&gt;
      bindings.1.slave   a&lt;br /&gt;
      bindings.1.channel 1&lt;br /&gt;
      bindings.2.slave   a&lt;br /&gt;
      bindings.2.channel 2&lt;br /&gt;
      bindings.3.slave   a&lt;br /&gt;
      bindings.3.channel 3&lt;br /&gt;
      bindings.4.slave   a&lt;br /&gt;
      bindings.4.channel 4&lt;br /&gt;
      bindings.5.slave   a&lt;br /&gt;
      bindings.5.channel 5&lt;br /&gt;
&lt;br /&gt;
      bindings.6.slave   b&lt;br /&gt;
      bindings.6.channel 0&lt;br /&gt;
      bindings.7.slave   b&lt;br /&gt;
      bindings.7.channel 1&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
If you&#039;re interested in something similar, i can recommend the BS-200 bass shakers and the A-408 amp from [https://reckhorn.com/ Reckhorn] - they&#039;re also offering a sets with 2 shakers and an amp. The A-500 is basically the same amp with less controls, but i guess that would have been more that sufficient, too.&lt;br /&gt;
&lt;br /&gt;
== Lightpack ==&lt;br /&gt;
&amp;lt;nowiki&amp;gt;git clone --recursive https://github.com/hyperion-project/hyperion.git&lt;br /&gt;
cd hyperion&lt;br /&gt;
cmake -DPLATFORM=x86 -DCMAKE_BUILD_TYPE=Release&lt;br /&gt;
make -j $(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;/etc/systemd/system/hyperion.service&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[Unit]&lt;br /&gt;
Description=Job that starts Hyperion&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
User=root&lt;br /&gt;
Restart=always&lt;br /&gt;
RestartSec=1s&lt;br /&gt;
ExecStart=/usr/local/bin/hyperiond /etc/hyperion.config.json&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;/etc/systemd/system/hyperion-x11.service&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[Unit]&lt;br /&gt;
Description=Job that starts Hyperion-X11&lt;br /&gt;
After=kodi.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
User=root&lt;br /&gt;
Restart=always&lt;br /&gt;
RestartSec=1s&lt;br /&gt;
Environment=DISPLAY=:0&lt;br /&gt;
ExecStart=/usr/local/bin/hyperion-x11&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* enable units&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
systemctl enable hyperion&lt;br /&gt;
systemctl enable hyperion-x11&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use HyperCon to generate a config file and save it to /etc/hyperion.config.json&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=Kodi&amp;diff=428</id>
		<title>Kodi</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=Kodi&amp;diff=428"/>
		<updated>2017-11-12T18:01:51Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Standalone Kodi from Scratch =&lt;br /&gt;
&lt;br /&gt;
This is how i installed a standalone Kodi &amp;quot;Krypton&amp;quot; 17 on a Gigabyte GA-F2A88XN-WIFI Mini-ITX board with an AMD A8-7600 APU and a Samsung EVO 850 SSD.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve skipped the Wifi setup because i&#039;m using a wired connection (high quality 1080p streaming is nicer without buffering).&lt;br /&gt;
&lt;br /&gt;
== Install OS ==&lt;br /&gt;
* Ubuntu 16.04 (netboot via PXE is perfect, but you can use whatever you want, preferably Ubuntu Server)&lt;br /&gt;
* New User: kodi&lt;br /&gt;
* In the software selection dialog choose:&lt;br /&gt;
** [x] Basic Ubuntu server&lt;br /&gt;
** [x] OpenSSH server&lt;br /&gt;
&lt;br /&gt;
== Install Kodi ==&lt;br /&gt;
* i used the &amp;quot;unstable&amp;quot; PPA, but if you prefer final releases just replace the &amp;quot;unstable&amp;quot; with &amp;quot;ppa&amp;quot;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo add-apt-repository -y ppa:team-xbmc/unstable&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install -y xinit alsa-utils avahi-daemon libva-glx1 libva-egl1 upower libcurl3 mysql-client mesa-utils mesa-vdpau-drivers vdpauinfo xserver-xorg-video-radeon kodi &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* allow &amp;quot;anybody&amp;quot; to start the X server&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo apt-get install xserver-xorg-legacy&lt;br /&gt;
sudo dpkg-reconfigure xserver-xorg-legacy&lt;br /&gt;
sudo sed -i &#039;s/allowed_users=console/allowed_users=anybody/&#039; /etc/X11/Xwrapper.config&lt;br /&gt;
echo needs_root_rights=yes | sudo tee -a /etc/X11/Xwrapper.config&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* grant the &amp;quot;kodi&amp;quot; user access to serial devices (CEC), the soundcard and to shutdown, reboot, etc.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo usermod -aG users,dialout,audio,video,sudo kodi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* grant the audio thread a higher priority&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;echo &amp;quot;kodi             -       nice            -1&amp;quot; | sudo tee -a /etc/security/limits.conf&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* add some tweaks to &#039;&#039;&#039;/etc/X11/xorg.conf&#039;&#039;&#039; to eliminate tearing&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Section &amp;quot;Device&amp;quot;&lt;br /&gt;
  Identifier &amp;quot;Radeon&amp;quot;&lt;br /&gt;
  Driver &amp;quot;radeon&amp;quot;&lt;br /&gt;
  Option &amp;quot;ColorTiling&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
  Option &amp;quot;ColorTiling2D&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
  Option &amp;quot;DRI&amp;quot; &amp;quot;3&amp;quot;&lt;br /&gt;
  Option &amp;quot;TearFree&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
  Option &amp;quot;AccelMethod&amp;quot; &amp;quot;glamor&amp;quot;&lt;br /&gt;
EndSection&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Allow Shutdown/Reboot ==&lt;br /&gt;
* create &#039;&#039;&#039;/etc/polkit-1/localauthority/50-local.d/custom-actions.pkla&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[Actions for kodi user]&lt;br /&gt;
Identity=unix-user:kodi&lt;br /&gt;
Action=org.freedesktop.login1.reboot;org.freedesktop.login1.reboot-multiple-sessions;org.freedesktop.login1.power-off;org.freedesktop.login1.power-off-multiple-sessions;org.freedesktop.login1.suspend;org.freedesktop.login1.suspend-multiple-sessions;org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions&lt;br /&gt;
ResultAny=yes&lt;br /&gt;
ResultInactive=yes&lt;br /&gt;
ResultActive=yes&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Splashscreen (optional) ==&lt;br /&gt;
This only started working as expexted after i disabled the &amp;quot;Fullscreen BIOS Logo&amp;quot; in my BIOS.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo apt-get install -y plymouth-label v86d&lt;br /&gt;
wget https://dl.dropboxusercontent.com/u/22410524/xbmc/plymouth-theme/plymouth-theme-kodi-logo.deb&lt;br /&gt;
sudo dpkg -i plymouth-theme-kodi-logo.deb&lt;br /&gt;
echo &amp;quot;GRUB_GFXMODE=1920x1080&amp;quot; | sudo tee -a /etc/default/grub&lt;br /&gt;
echo &amp;quot;GRUB_GFXPAYLOAD_LINUX=keep&amp;quot; | sudo tee -a /etc/default/grub&lt;br /&gt;
sudo update-grub&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Autostart Kodi ==&lt;br /&gt;
* create &#039;&#039;&#039;/etc/systemd/system/kodi.service&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[Unit]&lt;br /&gt;
Description=Job that runs Kodi&lt;br /&gt;
After=getty.target sound.target network.target&lt;br /&gt;
Wants=network-online.target&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
User=kodi&lt;br /&gt;
Restart=always&lt;br /&gt;
RestartSec=1s&lt;br /&gt;
ExecStart=/usr/bin/xinit /usr/bin/kodi --standalone -- /usr/bin/X -bs -nocursor -nolisten tcp :0&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* enable the startup script&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo systemctl daemon-reload&lt;br /&gt;
sudo systemctl enable kodi.service&lt;br /&gt;
sudo systemctl enable systemd-networkd.service&lt;br /&gt;
sudo systemctl enable systemd-networkd-wait-online.service&lt;br /&gt;
sudo ln -s /etc/systemd/system/kodi.service /etc/systemd/system/display-manager.service&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* reboot. now. Kodi won&#039;t start with the new driver unless you reboot&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;sudo reboot&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Custom Tweaks =&lt;br /&gt;
== ALSA Dual Audio (Digital &amp;amp; Analog) ==&lt;br /&gt;
I have a pair of Bass Shakers (a.k.a. Butt Kickers) that need receive audio output, too. Usually you&#039;d use the LFE channel of surround content, but as some content (e.g. Music) is only in Stereo, i want all audio always output via S/PDIF to my AV receiver and additionally via jack to the subwoofer amp (which does the low-pass filtering itself).&lt;br /&gt;
Surround content stays surround for the digital output, but will also be converted to stereo for the analog output, and stereo gets output as is.&lt;br /&gt;
&lt;br /&gt;
This is what my &#039;&#039;&#039;/etc/asound.conf&#039;&#039;&#039; looks like:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;pcm.main {&lt;br /&gt;
  #type    hw&lt;br /&gt;
  #card    1&lt;br /&gt;
  #device  1&lt;br /&gt;
  type plug&lt;br /&gt;
  slave.pcm &amp;quot;iec958:CARD=Generic,DEV=0&amp;quot;&lt;br /&gt;
  slave.rate 48000&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pcm.shaker {&lt;br /&gt;
  type    hw&lt;br /&gt;
  card    1&lt;br /&gt;
  device  0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
pcm.!default {&lt;br /&gt;
  type plug&lt;br /&gt;
  hint.show on&lt;br /&gt;
  hint.description &amp;quot;S/PDIF 2.0 &amp;amp; Analog 2.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  slave.channels 2&lt;br /&gt;
  slave.pcm {&lt;br /&gt;
    type route&lt;br /&gt;
&lt;br /&gt;
    ttable.0.0 1.0&lt;br /&gt;
    ttable.1.1 1.0&lt;br /&gt;
&lt;br /&gt;
    ttable.0.2 1.0&lt;br /&gt;
    ttable.1.3 1.0&lt;br /&gt;
&lt;br /&gt;
    slave.channels 4&lt;br /&gt;
    slave.pcm {&lt;br /&gt;
      type multi&lt;br /&gt;
&lt;br /&gt;
      slaves.a.pcm       &amp;quot;main&amp;quot;&lt;br /&gt;
      slaves.a.channels  2&lt;br /&gt;
      slaves.b.pcm       &amp;quot;shaker&amp;quot;&lt;br /&gt;
      slaves.b.channels  2&lt;br /&gt;
&lt;br /&gt;
      bindings.0.slave   a&lt;br /&gt;
      bindings.0.channel 0&lt;br /&gt;
      bindings.1.slave   a&lt;br /&gt;
      bindings.1.channel 1&lt;br /&gt;
&lt;br /&gt;
      bindings.2.slave   b&lt;br /&gt;
      bindings.2.channel 0&lt;br /&gt;
      bindings.3.slave   b&lt;br /&gt;
      bindings.3.channel 1&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
pcm.!surround51 {&lt;br /&gt;
  type plug&lt;br /&gt;
  hint.show on&lt;br /&gt;
  hint.description &amp;quot;S/PDIF 5.1 &amp;amp; Analog 2.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  slave.channels 6&lt;br /&gt;
  slave.pcm {&lt;br /&gt;
    type route&lt;br /&gt;
&lt;br /&gt;
    ttable.0.0 1.0&lt;br /&gt;
    ttable.1.1 1.0&lt;br /&gt;
    ttable.2.2 1.0&lt;br /&gt;
    ttable.3.3 1.0&lt;br /&gt;
    ttable.4.4 1.0&lt;br /&gt;
    ttable.5.5 1.0&lt;br /&gt;
&lt;br /&gt;
    ttable.0.6 1.0&lt;br /&gt;
    ttable.2.6 -0.87177978870813471044739639677192&lt;br /&gt;
    ttable.3.6 -0.48989794855663561963945681494118&lt;br /&gt;
    ttable.4.6 0.70710678118654752440084436210485&lt;br /&gt;
    ttable.5.6 0.70710678118654752440084436210485&lt;br /&gt;
&lt;br /&gt;
    ttable.1.7 1.0&lt;br /&gt;
    ttable.2.7 0.48989794855663561963945681494118&lt;br /&gt;
    ttable.3.7 0.87177978870813471044739639677192&lt;br /&gt;
    ttable.4.7 0.70710678118654752440084436210485&lt;br /&gt;
    ttable.5.7 0.70710678118654752440084436210485&lt;br /&gt;
&lt;br /&gt;
    slave.channels 8&lt;br /&gt;
    slave.pcm {&lt;br /&gt;
      type multi&lt;br /&gt;
&lt;br /&gt;
      slaves.a.pcm      &amp;quot;main&amp;quot;&lt;br /&gt;
      slaves.a.channels 6&lt;br /&gt;
      slaves.b.pcm      &amp;quot;shaker&amp;quot;&lt;br /&gt;
      slaves.b.channels 2&lt;br /&gt;
&lt;br /&gt;
      bindings.0.slave   a&lt;br /&gt;
      bindings.0.channel 0&lt;br /&gt;
      bindings.1.slave   a&lt;br /&gt;
      bindings.1.channel 1&lt;br /&gt;
      bindings.2.slave   a&lt;br /&gt;
      bindings.2.channel 2&lt;br /&gt;
      bindings.3.slave   a&lt;br /&gt;
      bindings.3.channel 3&lt;br /&gt;
      bindings.4.slave   a&lt;br /&gt;
      bindings.4.channel 4&lt;br /&gt;
      bindings.5.slave   a&lt;br /&gt;
      bindings.5.channel 5&lt;br /&gt;
&lt;br /&gt;
      bindings.6.slave   b&lt;br /&gt;
      bindings.6.channel 0&lt;br /&gt;
      bindings.7.slave   b&lt;br /&gt;
      bindings.7.channel 1&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
If you&#039;re interested in something similar, i can recommend the BS-200 bass shakers and the A-408 amp from [https://reckhorn.com/ Reckhorn] - they&#039;re also offering a sets with 2 shakers and an amp. The A-500 is basically the same amp with less controls, but i guess that would have been more that sufficient, too.&lt;br /&gt;
&lt;br /&gt;
== Lightpack ==&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git clone --recursive https://github.com/hyperion-project/hyperion.git&lt;br /&gt;
cd hyperion&lt;br /&gt;
cmake -DPLATFORM=x86 -DCMAKE_BUILD_TYPE=Release&lt;br /&gt;
make -j $(nproc)&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;/etc/systemd/system/hyperion.service&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[Unit]&lt;br /&gt;
Description=Job that starts Hyperion&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
User=root&lt;br /&gt;
Restart=always&lt;br /&gt;
RestartSec=1s&lt;br /&gt;
ExecStart=/usr/local/bin/hyperiond /etc/hyperion.config.json&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;/etc/systemd/system/hyperion-x11.service&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;[Unit]&lt;br /&gt;
Description=Job that starts Hyperion-X11&lt;br /&gt;
After=kodi.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
User=root&lt;br /&gt;
Restart=always&lt;br /&gt;
RestartSec=1s&lt;br /&gt;
Environment=DISPLAY=:0&lt;br /&gt;
ExecStart=/usr/local/bin/hyperion-x11&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* enable units&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
systemctl enable hyperion&lt;br /&gt;
systemctl enable hyperion-x11&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use HyperCon to generate a config file and save it to /etc/hyperion.config.json&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=FPV_Racing_Drone&amp;diff=427</id>
		<title>FPV Racing Drone</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=FPV_Racing_Drone&amp;diff=427"/>
		<updated>2017-07-01T19:37:00Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cheap 3S motor/ESC setup to get started, upgrade to 4S later.&lt;br /&gt;
&lt;br /&gt;
==== Frame ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://www.thingiverse.com/thing:511668 Hovership MHQ2]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://www.thingiverse.com/thing:1163884 Firefly Pro]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* [http://www.armattanquads.com/chameleon/ Armattan Chameleon (silver)] - not 3D printed, but lifetime warranty&lt;br /&gt;
&lt;br /&gt;
==== Flight Controller ====&lt;br /&gt;
* [http://www.holybro.com/product/46 HolyBro Kakute F4 AIO] - with PDB and OSD&lt;br /&gt;
&lt;br /&gt;
==== ESCs ====&lt;br /&gt;
* [https://n-factory.de/Lumenier-BLHeli_S-35A-4-in-1-Regler-OPTO-ESC_1 Lumenier BLHeli_S 35A 4-in-4]&lt;br /&gt;
&lt;br /&gt;
==== Motors ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;2x [https://hobbyking.com/en_us/black-widow-2204-18a-16d-cw-2300kv.html ZTW Black Widow 2204-2300kv CW] - with internal ESCs&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;2x [https://hobbyking.com/en_us/black-widow-2204-18a-16d-cww-2300kv.html ZTW Black Widow 2204-2300kv CCW] - with internal ESCs&amp;lt;/strike&amp;gt;&lt;br /&gt;
* 4x [https://n-factory.de/EMAX-RS2205S-2300kv-Motor_1 EMAX RS2205S 2300kV]&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
* 4x [https://hobbyking.com/en_us/gemfan-propeller-5x4-black-cw-ccw-2pcs.html Gemfan 5x4 (CW/CCW)] (2 sets + 2 spare sets)&lt;br /&gt;
&lt;br /&gt;
==== Low Voltage Warner ====&lt;br /&gt;
* [https://hobbyking.com/en_us/hobbykingtm-lipoly-low-voltage-alarm-2s-4s.html HK Lipoly Low Voltage Warner 2S-4S]&lt;br /&gt;
&lt;br /&gt;
==== LiPos ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;2x [https://hobbyking.com/en_us/turnigy-nano-tech-1500mah-3s-35-70c-lipo-pack.html Turnigy Nano-Tech 1500mAh 3S 35-70C] - for drone&amp;lt;/strike&amp;gt;&lt;br /&gt;
* 2x [https://hobbyking.com/en_us/graphene-1500mah-4s-65c-w-xt60.html Turnigy Graphene 1500mAh 4S 65C] - for drone&lt;br /&gt;
* 1x [https://hobbyking.com/en_us/turnigy-nano-tech-1500mah-2s-35-70c-lipo-pack.html Turnigy Nano-Tech 1500mAh 2S 35-70C] - for FPV goggles&lt;br /&gt;
&lt;br /&gt;
==== VTX ====&lt;br /&gt;
* [https://n-factory.de/58GHz-TBS-Unify-Pro-HV-RACE-SMA_1 TBS Unify Pro HV - RACE (SMA)]&lt;br /&gt;
&lt;br /&gt;
==== FPV Camera ====&lt;br /&gt;
* [https://n-factory.de/RunCam-Swift-2-25-Linse-600TVL-FPV-Kamera_1 RunCam Swift 2] - with 2.5mm lens (FOV: 130°)&lt;br /&gt;
&lt;br /&gt;
==== VTX/VRX Antenna ====&lt;br /&gt;
* [https://n-factory.de/58GHz-FOXEER-Antenna-kit-RHCP-SMA Foxeer RHCP SMA Antenna kit]&lt;br /&gt;
&lt;br /&gt;
==== TX/RX ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://hobbyking.com/en_us/i6s-afhds-2a-black-mode2-6ch-radio-with-colour-box.html Turnigy TGY-i6S Digital Proportional Radio Control System (Mode 2)]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* [http://rclife.co.uk/FrSky-Taranis-X9D-Plus-Special-Edition-Carbon FrSky Taranis X9D Plus Special Edition (Carbon)]&lt;br /&gt;
* [http://rclife.co.uk/X8R-Receiver FrSky X8R Receiver]&lt;br /&gt;
&lt;br /&gt;
==== FPV Goggles ====&lt;br /&gt;
* [https://hobbyking.com/de_de/quanum-cyclops-v2-fpv-goggle.html Quanum Cyclops v2]&lt;br /&gt;
&lt;br /&gt;
==== GPS/Compass ====&lt;br /&gt;
* [https://www.banggood.com/Ublox-NEO-M8N-Flight-Controller-GPS-with-Protective-Shell-for-PIX-PX4-Pixhawk-p-1005394.html Ublox NEO-M8N] (Compass not usable with Kakute F4, i think - no i2c)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=FPV_Racing_Drone&amp;diff=426</id>
		<title>FPV Racing Drone</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=FPV_Racing_Drone&amp;diff=426"/>
		<updated>2017-07-01T19:36:46Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cheap 3S motor/ESC setup to get started, upgrade to 4S later.&lt;br /&gt;
&lt;br /&gt;
==== Frame ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://www.thingiverse.com/thing:511668 Hovership MHQ2]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://www.thingiverse.com/thing:1163884 Firefly Pro]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* [http://www.armattanquads.com/chameleon/ Armattan Chameleon (silver)] - not 3D printed, but lifetime warranty&lt;br /&gt;
&lt;br /&gt;
==== Flight Controller ====&lt;br /&gt;
* [http://www.holybro.com/product/46 HolyBro Kakute F4 AIO] - with PDB and OSD&lt;br /&gt;
&lt;br /&gt;
==== ESCs ====&lt;br /&gt;
* [https://n-factory.de/Lumenier-BLHeli_S-35A-4-in-1-Regler-OPTO-ESC_1 Lumenier BLHeli_S 35A 4-in-4]&lt;br /&gt;
&lt;br /&gt;
==== Motors ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;2x [https://hobbyking.com/en_us/black-widow-2204-18a-16d-cw-2300kv.html ZTW Black Widow 2204-2300kv CW] - with internal ESCs&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;2x [https://hobbyking.com/en_us/black-widow-2204-18a-16d-cww-2300kv.html ZTW Black Widow 2204-2300kv CCW] - with internal ESCs&amp;lt;/strike&amp;gt;&lt;br /&gt;
* 4x [https://n-factory.de/EMAX-RS2205S-2300kv-Motor_1 EMAX RS2205S 2300kV]&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
* 4x [https://hobbyking.com/en_us/gemfan-propeller-5x4-black-cw-ccw-2pcs.html Gemfan 5x4 (CW/CCW)] (2 sets + 2 spare sets)&lt;br /&gt;
&lt;br /&gt;
==== Low Voltage Warner ====&lt;br /&gt;
* [https://hobbyking.com/en_us/hobbykingtm-lipoly-low-voltage-alarm-2s-4s.html HK Lipoly Low Voltage Warner 2S-4S]&lt;br /&gt;
&lt;br /&gt;
==== LiPos ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;2x [https://hobbyking.com/en_us/turnigy-nano-tech-1500mah-3s-35-70c-lipo-pack.html Turnigy Nano-Tech 1500mAh 3S 35-70C] - for drone&amp;lt;/strike&amp;gt;&lt;br /&gt;
* 2x [https://hobbyking.com/en_us/graphene-1500mah-4s-65c-w-xt60.html Turnigy Graphene 1500mAh 4S 65C]&lt;br /&gt;
* 1x [https://hobbyking.com/en_us/turnigy-nano-tech-1500mah-2s-35-70c-lipo-pack.html Turnigy Nano-Tech 1500mAh 2S 35-70C] - for FPV goggles&lt;br /&gt;
&lt;br /&gt;
==== VTX ====&lt;br /&gt;
* [https://n-factory.de/58GHz-TBS-Unify-Pro-HV-RACE-SMA_1 TBS Unify Pro HV - RACE (SMA)]&lt;br /&gt;
&lt;br /&gt;
==== FPV Camera ====&lt;br /&gt;
* [https://n-factory.de/RunCam-Swift-2-25-Linse-600TVL-FPV-Kamera_1 RunCam Swift 2] - with 2.5mm lens (FOV: 130°)&lt;br /&gt;
&lt;br /&gt;
==== VTX/VRX Antenna ====&lt;br /&gt;
* [https://n-factory.de/58GHz-FOXEER-Antenna-kit-RHCP-SMA Foxeer RHCP SMA Antenna kit]&lt;br /&gt;
&lt;br /&gt;
==== TX/RX ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://hobbyking.com/en_us/i6s-afhds-2a-black-mode2-6ch-radio-with-colour-box.html Turnigy TGY-i6S Digital Proportional Radio Control System (Mode 2)]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* [http://rclife.co.uk/FrSky-Taranis-X9D-Plus-Special-Edition-Carbon FrSky Taranis X9D Plus Special Edition (Carbon)]&lt;br /&gt;
* [http://rclife.co.uk/X8R-Receiver FrSky X8R Receiver]&lt;br /&gt;
&lt;br /&gt;
==== FPV Goggles ====&lt;br /&gt;
* [https://hobbyking.com/de_de/quanum-cyclops-v2-fpv-goggle.html Quanum Cyclops v2]&lt;br /&gt;
&lt;br /&gt;
==== GPS/Compass ====&lt;br /&gt;
* [https://www.banggood.com/Ublox-NEO-M8N-Flight-Controller-GPS-with-Protective-Shell-for-PIX-PX4-Pixhawk-p-1005394.html Ublox NEO-M8N] (Compass not usable with Kakute F4, i think - no i2c)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=FPV_Racing_Drone&amp;diff=425</id>
		<title>FPV Racing Drone</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=FPV_Racing_Drone&amp;diff=425"/>
		<updated>2017-07-01T19:15:48Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cheap 3S motor/ESC setup to get started, upgrade to 4S later.&lt;br /&gt;
&lt;br /&gt;
==== Frame ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://www.thingiverse.com/thing:511668 Hovership MHQ2]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://www.thingiverse.com/thing:1163884 Firefly Pro]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* [http://www.armattanquads.com/chameleon/ Armattan Chameleon (silver)] - not 3D printed, but lifetime warranty&lt;br /&gt;
&lt;br /&gt;
==== Flight Controller ====&lt;br /&gt;
* [http://www.holybro.com/product/46 HolyBro Kakute F4 AIO] - with PDB and OSD&lt;br /&gt;
&lt;br /&gt;
==== ESCs ====&lt;br /&gt;
* [https://n-factory.de/Lumenier-BLHeli_S-35A-4-in-1-Regler-OPTO-ESC_1 Lumenier BLHeli_S 35A 4-in-4]&lt;br /&gt;
&lt;br /&gt;
==== Motors ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;2x [https://hobbyking.com/en_us/black-widow-2204-18a-16d-cw-2300kv.html ZTW Black Widow 2204-2300kv CW] - with internal ESCs&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;2x [https://hobbyking.com/en_us/black-widow-2204-18a-16d-cww-2300kv.html ZTW Black Widow 2204-2300kv CCW] - with internal ESCs&amp;lt;/strike&amp;gt;&lt;br /&gt;
* 4x [https://n-factory.de/EMAX-RS2205S-2300kv-Motor_1 EMAX RS2205S 2300kV]&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
* 4x [https://hobbyking.com/en_us/gemfan-propeller-5x4-black-cw-ccw-2pcs.html Gemfan 5x4 (CW/CCW)] (2 sets + 2 spare sets)&lt;br /&gt;
&lt;br /&gt;
==== Low Voltage Warner ====&lt;br /&gt;
* [https://hobbyking.com/en_us/hobbykingtm-lipoly-low-voltage-alarm-2s-4s.html HK Lipoly Low Voltage Warner 2S-4S]&lt;br /&gt;
&lt;br /&gt;
==== LiPos ====&lt;br /&gt;
* 2x [https://hobbyking.com/en_us/turnigy-nano-tech-1500mah-3s-35-70c-lipo-pack.html Turnigy Nano-Tech 1500mAh 3S 35-70C] - for drone&lt;br /&gt;
* 1x [https://hobbyking.com/en_us/turnigy-nano-tech-1500mah-2s-35-70c-lipo-pack.html Turnigy Nano-Tech 1500mAh 2S 35-70C] - for FPV goggles&lt;br /&gt;
&lt;br /&gt;
==== VTX ====&lt;br /&gt;
* [https://n-factory.de/58GHz-TBS-Unify-Pro-HV-RACE-SMA_1 TBS Unify Pro HV - RACE (SMA)]&lt;br /&gt;
&lt;br /&gt;
==== FPV Camera ====&lt;br /&gt;
* [https://n-factory.de/RunCam-Swift-2-25-Linse-600TVL-FPV-Kamera_1 RunCam Swift 2] - with 2.5mm lens (FOV: 130°)&lt;br /&gt;
&lt;br /&gt;
==== VTX/VRX Antenna ====&lt;br /&gt;
* [https://n-factory.de/58GHz-FOXEER-Antenna-kit-RHCP-SMA Foxeer RHCP SMA Antenna kit]&lt;br /&gt;
&lt;br /&gt;
==== TX/RX ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://hobbyking.com/en_us/i6s-afhds-2a-black-mode2-6ch-radio-with-colour-box.html Turnigy TGY-i6S Digital Proportional Radio Control System (Mode 2)]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* [http://rclife.co.uk/FrSky-Taranis-X9D-Plus-Special-Edition-Carbon FrSky Taranis X9D Plus Special Edition (Carbon)]&lt;br /&gt;
* [http://rclife.co.uk/X8R-Receiver FrSky X8R Receiver]&lt;br /&gt;
&lt;br /&gt;
==== FPV Goggles ====&lt;br /&gt;
* [https://hobbyking.com/de_de/quanum-cyclops-v2-fpv-goggle.html Quanum Cyclops v2]&lt;br /&gt;
&lt;br /&gt;
==== GPS/Compass ====&lt;br /&gt;
* [https://www.banggood.com/Ublox-NEO-M8N-Flight-Controller-GPS-with-Protective-Shell-for-PIX-PX4-Pixhawk-p-1005394.html Ublox NEO-M8N] (Compass not usable with Kakute F4, i think - no i2c)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=FPV_Racing_Drone&amp;diff=424</id>
		<title>FPV Racing Drone</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=FPV_Racing_Drone&amp;diff=424"/>
		<updated>2017-06-30T17:51:39Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cheap 3S motor/ESC setup to get started, upgrade to 4S later.&lt;br /&gt;
&lt;br /&gt;
==== Frame ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://www.thingiverse.com/thing:511668 Hovership MHQ2]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://www.thingiverse.com/thing:1163884 Firefly Pro]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* [http://www.armattanquads.com/chameleon/ Armattan Chameleon (silver)] - not 3D printed, but lifetime warranty&lt;br /&gt;
&lt;br /&gt;
==== Flight Controller ====&lt;br /&gt;
* [http://www.holybro.com/product/46 HolyBro Kakute F4 AIO] - with PDB and OSD&lt;br /&gt;
&lt;br /&gt;
==== Motors ====&lt;br /&gt;
* 2x [https://hobbyking.com/en_us/black-widow-2204-18a-16d-cw-2300kv.html ZTW Black Widow 2204-2300kv CW] - with internal ESCs&lt;br /&gt;
* 2x [https://hobbyking.com/en_us/black-widow-2204-18a-16d-cww-2300kv.html ZTW Black Widow 2204-2300kv CCW] - with internal ESCs&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
* 4x [https://hobbyking.com/en_us/gemfan-propeller-5x4-black-cw-ccw-2pcs.html Gemfan 5x4 (CW/CCW)] (2 sets + 2 spare sets)&lt;br /&gt;
&lt;br /&gt;
==== Low Voltage Warner ====&lt;br /&gt;
* [https://hobbyking.com/en_us/hobbykingtm-lipoly-low-voltage-alarm-2s-4s.html HK Lipoly Low Voltage Warner 2S-4S]&lt;br /&gt;
&lt;br /&gt;
==== LiPos ====&lt;br /&gt;
* 2x [https://hobbyking.com/en_us/turnigy-nano-tech-1500mah-3s-35-70c-lipo-pack.html Turnigy Nano-Tech 1500mAh 3S 35-70C] - for drone&lt;br /&gt;
* 1x [https://hobbyking.com/en_us/turnigy-nano-tech-1500mah-2s-35-70c-lipo-pack.html Turnigy Nano-Tech 1500mAh 2S 35-70C] - for FPV goggles&lt;br /&gt;
&lt;br /&gt;
==== VTX ====&lt;br /&gt;
* [https://n-factory.de/58GHz-TBS-Unify-Pro-HV-RACE-SMA_1 TBS Unify Pro HV - RACE (SMA)]&lt;br /&gt;
&lt;br /&gt;
==== FPV Camera ====&lt;br /&gt;
* [https://n-factory.de/RunCam-Swift-2-25-Linse-600TVL-FPV-Kamera_1 RunCam Swift 2] - with 2.5mm lens (FOV: 130°)&lt;br /&gt;
&lt;br /&gt;
==== VTX/VRX Antenna ====&lt;br /&gt;
* [https://n-factory.de/58GHz-FOXEER-Antenna-kit-RHCP-SMA Foxeer RHCP SMA Antenna kit]&lt;br /&gt;
&lt;br /&gt;
==== TX/RX ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://hobbyking.com/en_us/i6s-afhds-2a-black-mode2-6ch-radio-with-colour-box.html Turnigy TGY-i6S Digital Proportional Radio Control System (Mode 2)]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* [http://rclife.co.uk/FrSky-Taranis-X9D-Plus-Special-Edition-Carbon FrSky Taranis X9D Plus Special Edition (Carbon)]&lt;br /&gt;
* [http://rclife.co.uk/X8R-Receiver FrSky X8R Receiver]&lt;br /&gt;
&lt;br /&gt;
==== FPV Goggles ====&lt;br /&gt;
* [https://hobbyking.com/de_de/quanum-cyclops-v2-fpv-goggle.html Quanum Cyclops v2]&lt;br /&gt;
&lt;br /&gt;
==== GPS/Compass ====&lt;br /&gt;
* [https://www.banggood.com/Ublox-NEO-M8N-Flight-Controller-GPS-with-Protective-Shell-for-PIX-PX4-Pixhawk-p-1005394.html Ublox NEO-M8N] (Compass not usable with Kakute F4, i think - no i2c)&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
	<entry>
		<id>https://wiki.faked.org/index.php?title=FPV_Racing_Drone&amp;diff=423</id>
		<title>FPV Racing Drone</title>
		<link rel="alternate" type="text/html" href="https://wiki.faked.org/index.php?title=FPV_Racing_Drone&amp;diff=423"/>
		<updated>2017-06-30T16:42:13Z</updated>

		<summary type="html">&lt;p&gt;Jan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Frame ====&lt;br /&gt;
Should be 3D printed, current options:&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://www.thingiverse.com/thing:511668 Hovership MHQ2]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://www.thingiverse.com/thing:1163884 Firefly Pro]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* [http://www.armattanquads.com/chameleon/ Armattan Chameleon (silver)] - not 3D printed, but lifetime warranty&lt;br /&gt;
&lt;br /&gt;
==== Flight Controller ====&lt;br /&gt;
* [http://www.holybro.com/product/46 HolyBro Kakute F4 AIO] - with PDB and OSD&lt;br /&gt;
&lt;br /&gt;
==== Motors ====&lt;br /&gt;
* 2x [https://hobbyking.com/en_us/black-widow-2204-18a-16d-cw-2300kv.html ZTW Black Widow 2204-2300kv CW] - with internal ESCs&lt;br /&gt;
* 2x [https://hobbyking.com/en_us/black-widow-2204-18a-16d-cww-2300kv.html ZTW Black Widow 2204-2300kv CCW] - with internal ESCs&lt;br /&gt;
&lt;br /&gt;
==== Props ====&lt;br /&gt;
* 4x [https://hobbyking.com/en_us/gemfan-propeller-5x4-black-cw-ccw-2pcs.html Gemfan 5x4 (CW/CCW)] (2 sets + 2 spare sets)&lt;br /&gt;
&lt;br /&gt;
==== Low Voltage Warner ====&lt;br /&gt;
* [https://hobbyking.com/en_us/hobbykingtm-lipoly-low-voltage-alarm-2s-4s.html HK Lipoly Low Voltage Warner 2S-4S]&lt;br /&gt;
&lt;br /&gt;
==== LiPos ====&lt;br /&gt;
* 2x [https://hobbyking.com/en_us/turnigy-nano-tech-1500mah-3s-35-70c-lipo-pack.html Turnigy Nano-Tech 1500mAh 3S 35-70C] - for drone&lt;br /&gt;
* 1x [https://hobbyking.com/en_us/turnigy-nano-tech-1500mah-2s-35-70c-lipo-pack.html Turnigy Nano-Tech 1500mAh 2S 35-70C] - for FPV goggles&lt;br /&gt;
&lt;br /&gt;
==== VTX ====&lt;br /&gt;
* [https://n-factory.de/58GHz-TBS-Unify-Pro-HV-RACE-SMA_1 TBS Unify Pro HV - RACE (SMA)]&lt;br /&gt;
&lt;br /&gt;
==== FPV Camera ====&lt;br /&gt;
* [https://n-factory.de/RunCam-Swift-2-25-Linse-600TVL-FPV-Kamera_1 RunCam Swift 2] - with 2.5mm lens (FOV: 130°)&lt;br /&gt;
&lt;br /&gt;
==== VTX/VRX Antenna ====&lt;br /&gt;
* [https://n-factory.de/58GHz-FOXEER-Antenna-kit-RHCP-SMA Foxeer RHCP SMA Antenna kit]&lt;br /&gt;
&lt;br /&gt;
==== TX/RX ====&lt;br /&gt;
* &amp;lt;strike&amp;gt;[https://hobbyking.com/en_us/i6s-afhds-2a-black-mode2-6ch-radio-with-colour-box.html Turnigy TGY-i6S Digital Proportional Radio Control System (Mode 2)]&amp;lt;/strike&amp;gt;&lt;br /&gt;
* [http://rclife.co.uk/FrSky-Taranis-X9D-Plus-Special-Edition-Carbon FrSky Taranis X9D Plus Special Edition (Carbon)]&lt;br /&gt;
* [http://rclife.co.uk/X8R-Receiver FrSky X8R Receiver]&lt;br /&gt;
&lt;br /&gt;
==== FPV Goggles ====&lt;br /&gt;
* [https://hobbyking.com/de_de/quanum-cyclops-v2-fpv-goggle.html Quanum Cyclops v2]&lt;br /&gt;
&lt;br /&gt;
==== GPS/Compass ====&lt;br /&gt;
* [https://www.banggood.com/Ublox-NEO-M8N-Flight-Controller-GPS-with-Protective-Shell-for-PIX-PX4-Pixhawk-p-1005394.html Ublox NEO-M8N]&lt;/div&gt;</summary>
		<author><name>Jan</name></author>
	</entry>
</feed>