Implementation of HTPC + NAS + ROUTER (wifi)
Introduction to hardware environment
An N3700 motherboard With Three intel network ports has a mini-pci interface, a msata interface, a sata interface, and three USB3 interfaces (one external device, 2), an USB2 interface and an HDMI interface. With a 4G DDR3 notebook memory, a 64G msata SSD disk (as a system disk), a 1 TB 3.5 ordinary hard disk (as a data disk ), A wi-fi network card with the mini-pci interface provides the ap function (rtl8192ce is used at the beginning ).
Introduction to software environment
- Basic System: Debian8.7 64bit
- HTPC implementation: Install LXDE desktop environment and smplayer (kodi can also be installed, but I don't know why, the current kodi-17.1 system crashes in this environment)
- NAS implementation: OpenMediaVault3
- Implementation of a wireless router: LEDE17 + hostapd installed on the vitrulBox
Installation Process
Hardware installation (omitted );
Debian8.7 installation (Omitted ):
- Note: Only the basic system is installed, the network and ssh services are configured, And the LXDE environment is installed after the restart. In this way, the installation is faster, and the software source is selected from the domestic source.
- Note: The backports source is configured to upgrade the kernel to version 4.9 or later.
- Additional instructions: According to hardware requirements, you also need to configure non-free and other source parameters to install the hardware driver, such as the rtl8192ce driver.
OpenMediaVault3 installation (Omitted): implements the nas function. For the configuration, see other documents on the network, especially a fragrant blog.
- Note: You can also directly download the OpenMediaVault3 installation CD image to install it directly. In this way, you can install it with Debian8 and then configure the source. However, I personally prefer to install Debian8.7 and then install OpenMediaVault3.
- Additional instructions: you may need to modify the source address of OpenMediaVault as needed. For details, refer to the description section.
- Additional instructions: Install OMV-extras. For details, refer to idea.
- As a Nas application, OpenMediaVault requires at least one data disk (which must be physically separated from the disk on which the system is installed)
- OpenMediaVault (Debian8) can be installed in a USB flash drive. For example, in my hardware environment, I can extend the internal USB3 and insert a USB flash drive to install Debian8 and OpenMediaVault.
Installation of other tools:
Install hostapd: Use apt-get/aptitude to install Hostapd In Debian to provide wifi hotspot
- All network Ports/cards and Wi-Fi network cards are enabled by default in/etc/network/interfaces. As needed, at least one network port and the Wi-Fi network card are bound to br0, and other network ports are enabled, but not necessarily configure the URL, for example, configure dhcp6, do not configure dhcp
- Configure a static address for br0, such as 192.168.1.1, mask 255.255.255.0, and gateway as the gateway (a NIC address of LEDE) to be configured later, such as 192.168.1.1
- Decompress and copy/usr/share/doc/hostapd/examples/hostapd.conf.gz to/etc/hostapd. conf.
# Management of the Wi-Fi network port, wifi network port needs to support ap Mode interface = wlan0bridge = br0 # ssid can be configured according to your needs ssid = test # wpa password, set as needed wpa_passphrase = test1234
You can use/etc/init. d/hostapd start is enabled. At this time, other devices should be able to see the ssid, but cannot connect, because there is no dhcp service (static address connection can be used)
VirtualBox installation: to manage VirtualBox on the OpenMediaVault management interface, we recommend that you install VirtualBox on the OpenMediaVault interface, and then use the package management tool to upgrade VirtualBox to the latest version.
LEDE installation: LEDE is a new version of OpenWRT.
- According to http://wiki.openwrt.org/doc/howto/virtualbox? S [] = x86 & s [] = virtualbox & s [] = vdi. First download the imgfile of LEDE17 and convert it to the vid Format File supported by VirtualBox. The specific command is
vboxmanage convertfromraw --format VDI lede.img lede.vdi
Here, lede. img and lede. vdi must be replaced with the formal file name.
Because the virtualbox management interface version in the openmediavault interface is relatively low, it is not convenient to enter the console to perform the most Initialization Configuration after lede is started, therefore, we recommend that you directly use the VirtualBox GUI In Debian 8 to create a single Nic VM to load lede. vdi performs some configuration. On this interface, you can set only two items, first the password, and second the lan network address, which must be in the same segment as the previous br0, such as 192.168.1.1. Save this lede. vdi.
Create a new virtual host with at least two Network Ports (set to automatic start) in the virtualbox management interface of openmediavault. The network port 1 is connected to br0, network Port 2 does not have a real network port (as a wan port) that is connected with br0, and loads the lede previously processed. vdi is started as a disk. At this time, because br0 and lede's lan environment are bridging together, the browser under Debian 8 can access the lede web management interface through 192.168.1.1. The subsequent configuration can be configured on the web Management Interface (the related configuration is consistent with that of other LEDE/OpenWRT. There are many online documents, which will not be detailed here .), Set the wan port connection mode and enable the dhcp service. Then, other wifi clients can connect to the network through dhcp. In addition, other hosts can access the Internet through the real network port bound to br0. Now the configuration is complete, and the wireless routing function is implemented. LEDE can expand many functions, such as multi-wan, such as advertisement filtering, which is worth exploring.
Smplayer and other multimedia software are installed through the apt source, which is not described here. These software enables this pc to implement the htpc function. After testing, it supports 4k30p/H. 264 MBS Bit Rate Video Playback is basically not choppy (hardware decoding), H.265 won't work.
Note the advantages of such a platform:
- Yes, the performance is good, the wired network can reach a gigabit speed, wifi according to the network card performance and antenna, I can also stabilize the 100 M, covering almost 100 m², completely enough for a common family.
- In theory, an isolated ssid can be configured for visitors to achieve better Internet Access Control (mainly in hostapd configuration ).
- With strong nas functions, the storage capacity is based on the connected data disk and can also be used as a carrier.
- The overall power consumption is reasonable, that is, the addition of 1 3.5 disk, 2 ssd (1 msata, 1 usb3 easy-to-drive access), and the overall power consumption is less than 40 w, however, it can implement powerful nas + htpc + router functions and temporarily use it as a common client to access the Internet and work. The performance of the entire machine can be fully utilized.
- Strong customization, providing many possibilities as a whole, such as being a home entertainment center, which needs to be developed.
- This scheme is portable, all the hardware and software can be replaced as needed, such as the hardware platform is also suitable for other low-power multi-network port environment, if (J3455-itx, note J3455 needs at least 4.8 kernel, otherwise there will be a choppy phenomenon), LEDE can also be replaced with other soft routes, such as aikuai.com.