Stream PC Games to Raspberry Pi 3 with Parsec (AMD supported)

  1. Sign up at https://parsec.tv/signup
  2. Download and install Parsec Gaming Server at https://parsec.tv/downloads
  3. Run and login Parsec Gaming Server on your PC
  4. Download and install Raspbian Jessie Lite at https://www.raspberrypi.org/downloads/raspbian/
  5. (Optional for Wi-Fi connection) Configure the Raspbian network
    sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

    Add:
    network={
    ssid=”The_ESSID_from_earlier”
    psk=”Your_wifi_password”
    }

    sudo wpa_cli reconfigure
    
  6. Change the GPU memory split to 128mb
    sudo raspi-config

    >7 Advanced Options
    >A3 Memory Split
    Enter 128, accept the option, and exit choosing to reboot

  7. Download and extract the Parsec Raspberry Pi 3 client
    wget https://s3.amazonaws.com/parseccloud/package/client-rpi.tar.gz
    tar xvfz client-rpi.tar.gz
  8. Run the Parsec client
    cd parsec
    ./client
  9. Login Parsec account and select your server
  10. Happy Gaming!!!

Reference
https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
https://parsec.tv/faq#rpi

Advertisements

Lenovo Newifi (Y1) OpenWrt Notes

Install OpenWrt Chaos Calmer 15.05.1

https://downloads.openwrt.org/chaos_calmer/15.05.1/ramips/mt7620/openwrt-15.05.1-ramips-mt7620-Lenovo-y1-squashfs-sysupgrade.bin

  1. Press and hold “Reset” button on the back.
  2. Power on the router, you will see 2.4G and 5G LED light is flashing
  3. Set the PC connected to the router to address 192.168.1.2 (or whatever in 192.168.1 subnet)
  4. Browse 192.168.1.1 from browser and select the firmware download above and click “恢復”
  5. Wait it finish and browser to 192.168.1.1 again.

Install essential packages

# For 5Ghz WiFi
kmod-mt76

# For GRE Protocol, Allow VPN connections
kmod-nf-nathelper-extra

# For External HDD / USB Flash Drive
kmod-usb-storage
kmod-usb-storage-extras
block-mount
kmod-fs-ext4

# For VNStat
luci-app-vnstat
vnstat

# For BitTorrent
transmission-daemon
transmission-web
luci-app-transmission

# For PPTP VPN
kmod-mppe
kmod-gre
pptpd

# For Samba
samba36-server
luci-app-samba

# For DDNS
ddns-scripts
luci-app-ddns

Configure PPTP VPN

  1. Edit /etc/config/pptpd set enable to “1” set login username and password, set the localip to the same subnet as the router, e.g 192.168.1.1, remoteip to 192.168.1.20-30
  2. In luci, Network > Firewall > Traffic Rules, add a rule to open port 1723
  3. Edit /etc/config/network, add
    config rule
    	option target 'ACCEPT'
    	option _name 'pptp'
    	option src 'wan'
    	option proto 'tcp'
    	option dest_port '1723'
    
    config rule
    	option target 'ACCEPT'
    	option _name 'gre'
    	option src 'wan'
    	option proto '47'
  4. In luci, Network > Firewall > Custom Rules, add below rules
    # Allow all traffic in and out of the ppp interface. No reason to specify nets.
    iptables -A input_rule -i ppp+ -j ACCEPT
    iptables -A output_rule -o ppp+ -j ACCEPT
    # This rule will allow traffic towards internet
    iptables -A forwarding_rule -i ppp+ -j ACCEPT
    iptables -A forwarding_rule -o ppp+ -j ACCEPT
  5. Enable and start the service
    /etc/init.d/pptpd enable
    /etc/init.d/pptpd start

OpenWrt Wiki (outdated)

https://wiki.openwrt.org/toh/lenovo/lenovo_y1_v1

Newifi Mini 安装 OpenWrt

Original post: https://linuxtoy.org/archives/install-openwrt-on-newifi-mini.html 

根据其他媒体及其产品页面介绍,Newifi Mini 身世复杂,简单的说就是本土化 OpenWrt 系统 + 联想出资做硬件 + 百度深度植入。其最近官方固件貌似又扯上了京东和搜狐,远离了百度……

不谈那扯不清理还乱的强国 IT 圈不谈,还是看下这款设备吧。和近两年雨后春笋般冒出的所谓智能路由产品一样,Newifi Mini 亦是使用 MediaTek MT7620A SoC + MT7612E 5G 方案的产品。那么这款产品又什么特别的呢?

  • 相比某数字和五谷厂商的同类型产品,此款的 U-boot 并未锁
  • 散热孔设计相对合理些
  • 表面的镜面处理是个绝佳指纹收集器(误)
  • 可控制的 LED 稍多些

其他的硬件特性为:

  • 2×2 3db 外置天线
  • 2.4GHz 802.11n 300M + 5GHz 802.11ac 866M
  • 两个百兆 LAN 及一个百兆 WAN 口
  • 16M Flash
  • 128M DDR2 内存
  • 具备一个 USB 2.0 接口

**** 官方系统

根据网上流传的早期固件版本评测,该设备官方固件使用需要百度账号,所以在下完全跳过了……不知道现在版本固件的内容如何。了解官方版本宣传的功能可参考其产品页面

**** 安装 OpenWrt

前面说过这款设备的 U-boot 并没有锁,所以您完全可以直接刷入 OpenWrt 系统的,方法如下:

  1. 前往 OpenWrt 官网下载对应固件,设备实际型号名为 Lenovo Y1
  2. 通过有线连接设备,并将 PC 端设备 IP 设定为 192.168.1.11,子网掩码 255.255.255.0,网关 192.168.1.1 。
  3. 拔下路由器后面的电源,拿在手里,然后再次通电,之后迅速按下 RESET 按钮,若是设备上出现两个蓝灯连续闪烁,代表已经进入 U-boot 恢复模式。
  4. 在浏览器中输入 192.168.1.1 进入恢复模式页面,选择之前下载的 bin 文件即可开始刷机
  5. 将 PC 端设备 IP 重置为自动获取模式,即可开始常规 OpenWrt 配置了

**** 开启 5G 网络

这款设备的 OpenWrt 固件生成依然是遵循了极简原则,于是需要在配置好网络连接后自行安装 5G 网络驱动模块。其 MT7612E 5G 芯片被包含在 kmod-mt76 软件包中

opkg update && opkg install kmod-mt76

之后重新启动路由器,便可以在 LuCI 中看到 5G 网络的 radio 选项了。

**** 总结

和使用 Qulcomm Atheros 方案或者更高档次的 MT7621 双核方案相比,这个百兆双无线的无线路由器的价格优势显著,配合良好的 OpenWrt 支持及便利的刷机方式,那个 USB 2.0 接口可以玩转很多有趣的事情。

OpenWrt Wiki: Lenovo Y1

存在几个问题:1、刷完,三个网口顺序和原版是颠倒的。2、5G WiFi 设置参数后似乎没有办法立刻生效,UMU 都是 reboot 一下解决。

騰訊全民WiFi / 360 隨身 WiFi 第二代 / 小米隨身 WiFi / 小度 WiFi Linux AP模式(熱點)驅動

  1. Install isc-dhcp-server
    sudo apt-get install isc-dhcp-server
  2. Download Driver https://github.com/eywalink/mt7601u
  3. unzip mt7601u-master.zip
    cd mt7601u-master
  4. ./miwifi_build.sh
  5. sudo vim  /etc/default/isc-dhcp-server
    INTERFACES=”ra0″
  6. sudo vim /etc/dhcp/dhcpd.conf
    subnet 192.168.199.0 netmask 255.255.255.0 {
    range 192.168.199.10 192.168.199.20;
    option routers 192.168.199.1;
    option domain-name-servers 8.8.8.8;
    }
  7. Create a start up script mywifi_start.sh
    ifconfig ra0 up
    ifconfig ra0 192.168.199.1
    dhcpd ra0
    echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE #Share Ethernet eth0 Connection
    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE # Share VPN ppp0 connection
  8. Create a stop script mywifi_stop.sh
    ifconfig ra0 down
    /etc/init.d/isc-dhcp-server stop
  9. sudo ./mywifi_start.sh

Note:
SSID:MiWiFi_SuMang
PWD :52xiaomi
Change /etc/Wireless/RT2870AP/RT2870AP.dat for custom settings

Reference:

Install 360 WiFi 2 / Xiaomi WiFi USB Dongle on Linux

  1. Install Linux Kernel Header of your Kernel.
  2. Download Driver (mt7610u_wifi_sta_v3002_dpo_20130916.tar.bz2 )from http://www.mediatek.com/en/downloads1/downloads/mt7601u-usb/ OR http://s3.amazonaws.com/mtk.cfs/Downloads/linux/mt7610u_wifi_sta_v3002_dpo_20130916.tar.bz2
  3. bzip2 -d DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2
  4. tar xopf DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar
  5. Update GCC and G++
  6. cd DPO_MT7601U_LinuxSTA_3.0.0.4_20130913
  7. vim common/rtusb_dev_id.c
    add
    {USB_DEVICE(0x148f,0x760b)}, /* 360 Wifi */
    {USB_DEVICE(0x2717,0x4106)}, /* Xiaomi Wifi */
    under
    {USB_DEVICE(0x148f,0x7601)}, /* MT 6370 */
  8. sudo apt-get install gcc-4.8 g++-4.8
  9. Download kernel patch https://dl.dropboxusercontent.com/s/qlx4jn1t3y79zrg/rt2870-mt7601Usta-kuid_t-kgid_t.patch
  10. patch -p0 < /tmp/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/rt2870-mt7601Usta-kuid_t-kgid_t.patch
  11. sudo make
  12. sudo make install
  13. sudo reboot

Command-Line Pack (Backup)

Originated from http://www.neillcorlett.com/cmdpack
Use to convert ecm back to img file from EmulationPrardise

Compile from source:
tar xzvf cmdpack-1.03-src.tar.gz
cd cmdpack-1.03-src/src
./mkgcc ecm

Encode
ecm e cdimagefile ecmfile

Decode
ecm d ecmfile cdimagefile

[Downloads]
Command-Line Pack v1.03 source code
Command-Line Pack v1.03 source code (mirror)
DOS (16-bit, 8086)
DOS (32-bit, i386)
Windows (32-bit, i386)
Windows (32-bit, Alpha AXP)
Windows (32-bit, MIPS)
Windows (64-bit, x86_64)
Mac OS X (32-bit, PPC)
Mac OS X (32-bit, i386)
Mac OS X (64-bit, x86_64)
Human68k

Rapsperry Pi 2 + RetroPie + Multiple Wireless PS3 Controllers (Sixaxis)

  1. Download RetroPie Image and Install to MicroSD card
    1. Download RetroPie SD-card Image for Raspberry Pi 1 Version 3.0 BETA 2 (http://blog.petrockblock.com/retropie/retropie-downloads/ )
    2. Extract and install the image via Win32 Disk Imager (http://sourceforge.net/projects/win32diskimager/ )
    3. Write the .img file with Win32 Disk Imager to MicroSD card
  2. Insert a compatible bluetooth dongle to the Raspberry Pi.
  3. Insert the MicroSD card and boot up, follow the instruction to setup input.
  4. Navigate to “RetroPie” section, select “Show IP Address“, inet xxx.xxx.xxx.xxx/24 (For me, 192.168.1.199) is your RetroPie’s IP.
  5. With this IP Address, you can remotely SSH to your RetroPie using user name “pi” and password “raspberry” from your internal network. Or you can Press “Start => Quit => Quit EmulationStation“, then press any key of your keyboard to go to the console mode.
  6. Navigate to “RetroPie” section, select “Raspi-Config“.
    OR SSH to RetroPie
    ssh pi@192.168.1.199
    (fill with your IP)
    sudo raspi-config
    Launch the Raspi-Config setup screen, select “Expand Filesystem
    Screenshot from 2015-05-02 17:40:38
  7. On Raspi-Config, select “Advanced Options“, “Overscan“, and disable overscan. Alternatively, edit “/boot/config.txt“, change the line “disable_overscan=0” to “disable_overscan=1“, remove leading “#” if present. This step can remove the black border of screen.
  8. Reboot the system as instruct.
  9. Navigate to “RetroPie” section, select “RetroPie-Setup“, launch the RetroPie setup screen.
    OR SSH to RetroPie
    ssh pi@192.168.1.199
    (fill with your IP)
    cd RetroPie-Setup/
    sudo ./retropie_setup.shScreenshot from 2015-05-02 10:31:10
  10. Select “Update RetroPie-Setup script“.
  11. Select “Setup / Configuration (to be used post install)“, “Install PS3 controller driver“, wait for it to finish installation.
  12. Connect your PS3 Controller using USB cable, select “Pair PS3 controller” to pair the controller, repeat the steps to pair more PS3 controllers.Screenshot from 2015-05-02 10:36:35
  13. (IMPORTANT!)Edit “/etc/rc.local“,
    sudo nano /etc/rc.local
    Add the following lines before “exit 0“, to retain the discovery mode of bluetooth dongle after the first PS3 controller connected.
    sleep 10
    hciconfig hci0 piscan
  14. Reboot the RetroPie
    sudo reboot
  15. Press the PS button of your PS3 Controllers, they should be rumble and connected.

Referenece: https://github.com/petrockblog/RetroPie-Setup/wiki/Setting-up-a-PS3-controller