 Remember everyone to use the hashtag FOSSAsia or FOSSAsia2017, make sure we get lots of likes and retweets on that back to the FOSSAsia event. Next up we have Mike. Your full name is... Qin Fengling. Qin Fengling. Yeah. Okay. You can also call him Mike. I was told. He's going to be speaking about software security on his hardware specifically for the Avalon miner. So, without further ado, thank you. Thank you. Yeah. Good afternoon everyone. Yeah. Thank you. Thank you. Thank you. Yeah. I will give you a talk about the blockchain software for the hardware. I think maybe it's so big to talk about the hardware because a lot of Bitcoin hardware is different which shows open source solution for the hardware. I think it's not only for our miner, it's also for every embedded system, I think. So we will talk about the solution. The Canon Avalon miner open source embedded system. So I will first introduce about me and my company. Sorry. About me, Qin Fengling, because it's a Chinese name, so it's hard to pronounce maybe in some western countries. So, Mike, maybe for short. You can find Mr. Turner of GitHub with his name. Later, yeah, I live in Beijing for 10 years working on open source product on open source software and hardware. And also I like Linux program. I have a lot of experience in embedded software through the setup box and then the IoT gateway. So I always use some software from the open source community. So then in 2014, I joined the blockchain company, Canon. So I started to learn like a total embedded solution in the embedded hardware. From the OpenWRT, it's an embedded Linux system and Lucy, a web framework, is used for embedded, if someone knows. And a converter is a protocol converter for the hardware to convert the USB protocol to an SQLC device. And the MAM is an FPGA hardware, yeah. And I started developing the firmware from Avalon 3, yeah, this is Canon. Canon is maybe a new name for everyone. If someone knows the Avalon minor, maybe Avalon, yeah, they may know, yeah. Because this is the same, the guys from Avalon then create this brand, yeah. So we have done a lot of products before creating this company. So I will talk about some of this, maybe we'll clear about this. So if someone search the miners through the network, maybe find this, a lot of stuff is called e-class, yeah, it's the very, very beginning FPGA Bitcoin miner, yeah. It's open hardware, it's GitHub, so everyone can find this through GitHub. If someone want to, yeah, I think if someone want to learn the Bitcoin how it works, yeah, this is a good solution to start. But it's just the FPGA-based, it's not fast, it's, I think there are few devices used these days. But it's very, I think it's great, it's very great. Another Lancelot is, how to say, it's super fast than previous and also it's FPGA-based. These people from Canon found it's very hard to make a very fast device if they use FPGA. So they try to make ASICs. So later we made the first ASICs out of one. It's not beautiful today, but it's the first generation we made ASICs and then we made products through ASICs. So the next, we also make another, a new generation, the second generation, like this, seems a little beautiful than previous. But also, yeah, we need to change because a lot of competition and a lot of products. Not later, a new ASICs we made and then like the same hardware. So you say a lot of hardware. So just everyone do not know what it is or how does it work, what it works for what. So it's just for proven works. Next, so we try this. This is simple and this is very simple for portable. So we have chance to let maybe some hobby and some research to know how to start using small devices and it's also very cheaper. Later, big machine, yeah, using new generation, the fourth generation, ASICs, I think, I will quick look this because it's just made and this, this is the same generation with this but maybe pretty for portable. Another is, we also want to improve the user experience because maybe it's hard to use because if someone, many before, they just along the city manner and compel, it's hard to use. So we create this, it's a device, it's HID device, so it can use on Linux, Windows and OS 10. So we made this. Today we only have 20 devices here, so if anyone follows the Canon Twitter, first follow first guide, yeah, only 20. This is a sixth generation. It's super powerful and it's the stable products we made, I think, and it's still used in somewhere in maybe in American Europe and China and a lot of place. Okay, this is the latest product we made, it's a super fast device we've made in these days, so it's also the latest ASIC chips we've used. So totally I will say how can we build a software for this device because you know you can see this table, maybe we will release one or two products every year, so if we can't find a solution to support all these devices because the ASIC is different, so we must find a way to fix this. This is from Ecos to the latest, so we find a way to use the protocol, only two main protocols we use, Ecos and MM. Ecos is public and also MM is also public. We'll talk about MM first because it's used for the latest miners, for the fast miners. If we use the miners like this, the nano, it will use the Ecos, so it only used for low miners, but it's very helpful to learn how the miner works, it's easy protocol. So I will show a connection to describe how this works, how the machine works. In the left side is a controller, maybe cannot see clearly, it's controller, I will show this controller, it's called our miner controller, so it will control all the miners and then it's the converter, this is converter, it's a microprocessor we used to convert to USB to SQC, and then connect all the devices through the chain, so this is in the miner, this is an SQC slave device, if someone knows, it's SQC, we can support five miners max in one chain, if you want to support more devices, more miners, just connect more AUC converter, it's enough, it's easy. So one controller maybe can control 60 miners, it's super powerful, so maybe you can use to other products. I will talk about the firmware run on every device, like the controller, AUC C3 and in the miner, it's different, but the first is the controller, so this is a simple architecture for the software, so we base the OpenWT, does anyone know this or play sound? Okay, so since a few people, so I just, I just to talk a little about this, brief about this, it's embodied Linux release for like router, it's mainly use this, so it can support a lot of hardware, you just like, if you want to use more or custom your functions on the router, like you want to build yourself firmware for the router, maybe you find this or some DDWT like that, then we use this, so it has package system, we do not need, need, need too much about this, so just create two packages for our miner, we use cdminer to control all the miners, and this is for upgrade, upgrade the miners firmware, and the top is a web framework, so users will use a simple web interface to control all the devices, all the miners, this is a very important part in the system, it's also open source, they, what they do, just add some drivers here, it will support all the, all different manners, yeah, it's very easy, then later this is a web interface, this is a configuration, it's very easy, just fill this and then apply, you will manage the manner, the manner status will here, and also some important for the manner, so this is like the other manner controller, so next I will talk about the AUC, why we use this device, maybe someone knows there are few devices with I2C, so we use a converter to convert the USB to S2C, so that's it, why we use USB or not, why we use USB in the manner, because it's very, you need a lot of work to do in the software, so just the I2C is enough for the manner, so just the I2C slave, this means the manner, and this is the converter, so we use a firmware for the converter, it's based on an open source framework here, so you can use the device I think, if someone want to program some S2C flash or S2C like devices can use this device, they do not just use in the manner, so you can also change the firmware to other like SPI and also other, so this is also open source, I also think you do not need to the, you do not need the, do not need to pay the SDK for this, later I will show how to compile the firmware for it, and this is important and very important thing in the manner, in that board, in the big chip, it's a Sennix, it's a PGA, so this is architecture, we use C program language in the device, so we need some something to do, like we add a CPU, this is CPU, yes this is CPU, and this hardware just communicates through this wishbone bars, if someone know IPGA is open bars for the open cars, so you can see a lot of this, and this tool part is for minor, if someone just want to use this to like, to convert some protocol and do something like programmer, you can use this part for free because this also open source, and this is the SH8256 car, it's only used to generate the task for the manner, and this is a communicator interface for only for the specific ASX, so this is the special one, and this is the common, so everyone can use it, maybe if you want to use a hardware accelerator, it's good, it's also good, so it's a full-faction hardware core, yeah, this is MAM, I think MAM made it, it's a full name, it's called minor manager, it's used for generate tasks, so do you think we, maybe someone think it will be enough to generate the task in the controller, in this way, in this side, but the software is not very fast, they just need to know what's the result, so we can use a very cheap controller to control the super powerful manner, so we use the hardware to generate the task for miners, it only supports the three-term protocol, if someone knows, so it's usually used in Bitcoin, if you use MAM, I say if you use this, if you maybe if you want to change it to an art coin, maybe you just change this hardware, it's enough, then yeah, I just quickly talk about this, this about how to generate, generate for the controller and AUC and MAM, so first is open W base, just clone the source, add the face from Canon and if someone want to maybe clone and add your own face, yeah, choose a target and compile, yeah, it's all, this is the controller, we also add some automatically way to support the devices, we use the build script to support a lot of hardware, so just use these two and build for the device and if someone do not know, just use a daily build and also we have a build bolt, it's every year's buildable, it's open WTCI system, let's see here, I will show, yeah, you can see the status of the building, so if someone want to know how the firmware is build for different device, just click every shell here, it's okay, so we build for Raspberry Pi and on controller, yeah, so it's super easy to find the status, so next is AUC because we use a chip from NXP, so we must install SDK first and clone the source and then build it, the next is MAM, first because MAM is a selling device, so we must install the IRC and like this, so more details here, I just list all the replets we used, so it's easy to find for every manor and controller and like CG manor, this is the MAM protocol and this is ECOS, it's a slow manor, so we talk about the contribute, we try everything in the open source way, so we want to keep everything we made to upstream, so this is what we contribute to the community, this is the CG manor, you can say we, it's not clear, we are top three contributors to the CG manor, this means we have the biggest contributor except the two creators, the author of the CG manor and OpenWRT, we also try to synchronize with the latest, so a lot of contribute and we support all of this device default if you use a build script, also if you have another hardware it supports OpenWRT then you can change little in the build script, it can support and we also wrote some documents in VK, Bitcoin VK and OpenWRT and also VK PDF, so if it's okay why don't we open it up for some questions, okay anyone have any questions for Mike, yep, can you click through the rest of your slides, okay look, so this is for Kenner, how to contribute to Kenner, this is an easy way just click on fork and request, like hot start, you can read documents through VK form and talk through the LLC and the bulk is musting the Bitcoin, so the last is demo, easy, I will show you how to use crumb to control this device, the small manor, here we'll use crumb, so in the apps, web store, here search, here just add to the, just add this, so this is minor and also we'll try this, here when you open it will show this because you need to plug your device, just plug to the USB adapter, here easy, the inner, if these status so active it will many will say this is the hot reach hard and this is the status, this temperature device and this is the heart rate, so it's super simple, you can also use command line to control this device, like CD minor, like BFG minor, so just follow Kenner, you will get the free nano, so any questions? Any other questions? Any questions about the hardware, maybe OpenDomperty and some Converter? Okay, great, the one we wrap it up, thank you very much, Mike. Great, thank you. Thank you. Hi, the minors are right here, if you followed come up here show that you followed and we give you one, okay, right there. Great, round of applause for Mike.