Login with root to LibreELEC or OpenELEC.
# mkdir -p /storage/.xbmc/media/Fonts
or
# mkdir -p /storage/.kodi/media/Fonts
Upload truetype font to this path.
Reboot again.
# mkdir -p /storage/.xbmc/media/Fonts
or
# mkdir -p /storage/.kodi/media/Fonts
Name: gpio-shutdown
Info: Initiates a shutdown when GPIO pin changes. The given GPIO pin
is configured as an input key that generates KEY_POWER events.
This event is handled by systemd-logind by initiating a
shutdown. Systemd versions older than 225 need an udev rule
enable listening to the input device:
ACTION!="REMOVE", SUBSYSTEM=="input", KERNEL=="event*", \
SUBSYSTEMS=="platform", DRIVERS=="gpio-keys", \
ATTRS{keys}=="116", TAG+="power-switch"
This overlay only handles shutdown. After shutdown, the system
can be powered up again by driving GPIO3 low. The default
configuration uses GPIO3 with a pullup, so if you connect a
button between GPIO3 and GND (pin 5 and 6 on the 40-pin header),
you get a shutdown and power-up button.
Load: dtoverlay=gpio-shutdown,<param>=<val>
Params: gpio_pin GPIO pin to trigger on (default 3)
active_low When this is 1 (active low), a falling
edge generates a key down event and a
rising edge generates a key up event.
When this is 0 (active high), this is
reversed. The default is 1 (active low).
gpio_pull Desired pull-up/down state (off, down, up)
Default is "up".
Note that the default pin (GPIO3) has an
external pullup.
Reference: https://github.com/raspberrypi/firmware/tree/master/boot/overlays
dtoverlay=gpio-shutdown,gpio_pin=3,active_low=1,gpio_pull=up
ACTION!="REMOVE", SUBSYSTEM=="input", KERNEL=="event*", \
SUBSYSTEMS=="platform", DRIVERS=="gpio-keys", \
ATTRS{keys}=="116", TAG+="power-switch"
$ dmesg
[ 14.665558] bluetooth hci0: Direct firmware load for rtl_bt/rtl8723b_config.bin failed with error -2
[ 14.665824] bluetooth hci0: Direct firmware load for rtl_bt/rtl8723b_fw.bin failed with error -2
[ 14.665842] Bluetooth: hci0: Failed to load rtl_bt/rtl8723b_fw.bin
$ lsusbI found.
Bus 001 Device 004: ID 0bda:b720 Realtek Semiconductor Corp.
$ sudo apt-get install raspberrypi-kernel-headers git build-essential
$ mkdir drivers
$ cd drivers
$ git clone https://github.com/lwfinger/rtl8723bu.git
$ cd rtl8723bu
$ sed -i "s/^EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE/#EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE/g" Makefile
$ make
$ sudo make install
$ echo "options 8723bu rtw_power_mgnt=0 rtw_enusbss=0" | sudo tee /etc/modprobe.d/8723bu.conf
$ git clone https://github.com/lwfinger/rtl8723au_bt.git
$ cd rtl8723au_bt/Linux_BT_USB_2.11.20140423_8723BE/8723B
$ sudo cp rtl8723b_config /lib/firmware/rtl_bt/rtl8723b_config.bin
$ sudo cp rtl8723b_fw /lib/firmware/rtl_bt/rtl8723b_fw.bin
$ hcitool scan
Scanning ...
XX:XX:XX:XX:XX:XX xxxxxx
XX:XX:XX:XX:XX:XX xxxxxx
$ ifconfig
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether xx:xx:xx:xx:xx:xx txqueuelen 1000 (Ethernet)
RX packets 17 bytes 0 (0.0 B)
RX errors 0 dropped 80 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
$ echo -e "ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\nupdate_config=1\ncountry=TH\n\n" | sudo tee /etc/wpa_supplicant/wpa_supplicant-wlan0.confAdd SSID and Password of Accesspoint to wpa_supplicant config file
$ wpa_passphrase test 12345678 | sudo tee -a /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
After run this curl command. You will receive message 'Hello' to LINE Instant Messenger via LINE Notifycurl -k -X POST -H 'Authorization: Bearer [access_token]' -F 'message=hello' https:// notify-api.line.me/api/notify
**file path to image = Image file Supported image format is png and jpegcurl -k -X POST -H 'Authorization: Bearer [access_token]' -F 'message=hello' -F 'imageFile=@[**file path to image]' https:// notify-api.line.me/api/notify
mkdir /data/script
#!/bin/bash
curl -k -X POST -H 'Authorization: Bearer [access_token]' -F "message=$1" https://
notify-api.line.me/api/notify
#!/bin/bash
curl -k -X POST -H 'Authorization: Bearer [access_token]' -F "message=$1" -F "imageFile=@$2" https://
notify-api.line.me/api/notify
chmod 755 linenotify_push.sh
chmod 755 linenotify_pushimage.sh
/data/script/linenotify_push.sh "Good world"
/data/script/linenotify_pushimage.sh "Good Job" "/data/output/Camera1/test.jpg"
/data/script/linenotify_push.sh "Motion Detect at %Y-%m-%d %H-%M-%S"
/data/script/linenotify_push.sh "Motion Detect End at %Y-%m-%d %H-%M-%S"
/data/script/linenotify_push.sh "Motion Detect at %Y-%m-%d %H-%M-%S" %f
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
# 1024 x 600
hdmi_cvt 1024 600 60 6 0 0 0
max_usb_current=1
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
#800x480
hdmi_cvt 800 480 60 6 0 0 0
max_usb_current=1
$ sudo apt-get update
$ sudo apt-get install libpcre3-dev libatomic-ops-dev libgeoip-dev geoip-bin geoip-database geoip-database-extra libperl-dev libssl-dev libxml2-dev libxslt1-dev
$ mkdir src
$ cd src
$ wget http://nginx.org/download/nginx-1.9.5.tar.gz
$ tar -xvzf nginx-1.9.5.tar.gz
$ git clone https://github.com/arut/nginx-rtmp-module.git
$ cd nginx-1.9.5
$ ./configure --prefix=/usr/local/nginx --user=www-data --group=www-data --with-select_module --with-poll_module --with-threads --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --with-mail --with-mail_ssl_module --with-pcre --with-pcre-jit --with-md5-asm --with-sha1-asm --with-libatomic --with-pcre --with-stream --with-stream_ssl_module --with-http_v2_module --add-module=../nginx-rtmp-module
$ make
$ sudo make install
$ sudo nano /usr/local/nginx/conf/nginx.conf
$ sudo /usr/local/nginx/sbin/nginx
$ sudo /usr/local/nginx/sbin/nginx -s stop
$ sudo nano /etc/modprobe.d/8192cu.conf
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
$ sudo apt-get install minidlna
Add pi user to minidlna group
$ sudo usermod -a -G minidlna pi
Create Directory for store media file
Example:
$ mkdir -p /home/pi/minidlna/music
$ mkdir -p /home/pi/minidlna/pictures
$ mkdir -p /home/pi/minidlna/videos
$ mkdir -p /home/pi/.minidlna
Change Mode of /home/pi/minidlna and /home/pi/.minidlna
$ sudo chmod 777 /home/pi/minidlna
$ sudo chmod 777 /home/pi/.minidlna
Config MiniDLNA
$ sudo nano /etc/minidlna.conf
Modify this file
...
db_dir=/home/pi/.minidlna/data
log_dir=/home/pi/.minidlna/data/log
# * "A" for audio (eg. media_dir=A,/var/lib/minidlna/music)
# * "P" for pictures (eg. media_dir=P,/var/lib/minidlna/pictures)
# * "V" for video (eg. media_dir=V,/var/lib/minidlna/videos)
media_dir=A,/home/pi/minidlna/music
media_dir=P,/home/pi/minidlna/pictures
media_dir=V,/home/pi/minidlna/videos
# Name that the DLNA server presents to clients.
friendly_name=RASPBERRY DLNA
# Automatic discovery of new files in the media_dir directory.
inotify=yes# Notify interval, in seconds.notify_interval=895...
Restart MiniDLNA Service
$ sudo /etc/init.d/minidlna restart
Or re-indexing all of media files
$ sudo /etc/init.d/minidlan force-reload
Test on Device supported with DLNA/UPnP to play media.
Reference:
Digital Living Network Alliance https://en.wikipedia.org/wiki/Digital_Living_Network_Alliance
ReadyMedia (MiniDLNA Source Code)
http://sourceforge.net/projects/minidlna/
ReadyMedia (Wiki of Archlinux)
https://wiki.archlinux.org/index.php/ReadyMedia
$ sudo apt-get install gcc-4.7 g++-4.7 libvncserver-dev
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
$ sudo update-alternatives --config gcc
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/gcc-4.6 60 auto mode
1 /usr/bin/gcc-4.6 60 manual mode
2 /usr/bin/gcc-4.7 40 manual mode
Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/gcc-4.7 to provide /usr/bin/gcc (gcc) in manual mode
See on : https://github.com/Na1w/dispmanx_vnc$ git clone https://github.com/Na1w/dispmanx_vnc.git
$ cd dispmanx_vncAfter compile finish. It has dispmanx_vncserver file.
$ make
$ sudo modprobe evdevSee on : https://github.com/hanzelpeter/dispmanx_vnc
$ sudo dispmanx_vncserver*** default port 5900
$ sudo dispmanx_vncserver -P [password]
$ sudo dispmanx_vncserver -p [port number]
Reboot after save config.#HDMI force hotplug hdmi_force_hotplug=1 # Group DMT hdmi_group=2 # mode 35 - 1280x1024 60Hz hdmi_mode=35
$ sudo apt-get install tightvncserver
$ tightvncserver :<DISPLAY NUMBER>
$ tightvncserver :1 You will require a password to access your desktops. Password: Verify: Would you like to enter a view-only password (y/n)? n New 'X' desktop is raspberrypi:1 Creating default startup script /home/pi/.vnc/xstartup Starting applications specified in /home/pi/.vnc/xstartup Log file is /home/pi/.vnc/raspberrypi:1.log
$ tightvncpasswd Using password file /home/pi/.vnc/passwd Password: Verify: Would you like to enter a view-only password (y/n)? n
$ tightvncserver -kill :<DISPLAY NUMBER>
$ tightvncserver -kill :1
$ tightvncserver -geometry <width>x<height> -depth <color depth>
$ tightvncserver -geometry 1280x720 -depth 16 :1
device_tree_param=i2c1=on
dtoverlay=i2c-rtc,ds3231
#blacklist i2c-bcm2708
sudo shutdown -r now
$ dmesg | grep i2c
[ 5.505513] bcm2708_i2c 20804000.i2c: BSC1 Controller at 0x20804000 (irq 79) (baudrate 100000)
[ 11.969815] i2c /dev entries driver
$ lsmod
i2c_bcm2708 6244 0
$ sudo hwclock -r
Tue 07 Jul 2015 05:20:09 PM ICT -0.397656 seconds
$ sudo hwclock -w
$ sudo hwclock -s
/sbin/hwclock -s
$ sudo raspi-configselect menu
5 Interfacing Options -> SPI -> Yes -> OK -> FinishOr
dtparam=spi=on
#blacklist spi-bcm2708
sudo shutdown -r now
$ dmesg | grep spi
[ 5.408904] bcm2708_spi 20204000.spi: master is unqueued, this is deprecated
[ 5.659213] bcm2708_spi 20204000.spi: SPI Controller at 0x20204000 (irq 80)
$ lsmod | grep spi
spidev 16384 0
spi_bcm2835 16384 0
sudo apt-get install python-dev
git clone https://github.com/lthiery/SPI-Py.git
cd SPI-Py
sudo python setup.py install
git clone https://github.com/mxgxw/MFRC522-python.git
cd MFRC522-python
$ git clone https://github.com/ondryaso/pi-rc522.git
$ cd pi-rc522
$ sudo python setup.py install
RFID-RC522 Pin |
Raspberry PI Pin |
Raspberry PI Pin name |
|---|---|---|
SDA |
24 |
GPIO8 |
SCK |
23 |
GPIO11 |
MOSI |
19 |
GPIO10 |
MISO |
21 |
GPIO9 |
IRQ |
18 |
GPIO24 |
GND |
Any |
Any Ground |
RST |
22 |
GPIO25 |
3.3V |
1 |
3V3 |
$ cd examples
$ python Read.py
Starting
Detected: 10
Card read UID: XX,XX,XX,XX
Setting tag
Selecting UID [XX, XX, XX, XX, XX]
Authorizing
Changing used auth key to [XX, XX, XX, XX, XX, XX] using method B
Reading
Calling card_auth on UID [XX, XX, XX, XX, XX]
S1B0: [0, 0, 105, 36, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Deauthorizing
Changing auth key and method to None
^C
Ctrl+C captured, ending read.
$ python KeyChange.py
Starting
Detected: 10
Card read UID: XX,XX,XX,XX
Setting tag
Selecting UID [XX, XX, XX, XX, XX]
Authorizing
Changing used auth key to [255, 255, 255, 255, 255, 255] using method A
Writing modified bytes
Calling card_auth on UID [XX, XX, XX, XX, XX]
Changing pos 2 with current value 0 to 105
Changing pos 3 with current value 0 to 36
Changing pos 4 with current value 0 to 64
Writing [0, 0, 105, 36, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] to S1B0
Not calling card_auth - already authed
S1B0: [0, 0, 105, 36, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Calling card_auth on UID [XX, XX, XX, XX, XX]
Changing pos 0 with current value 0 to 18
Changing pos 1 with current value 0 to 52
Changing pos 2 with current value 0 to 86
Changing pos 3 with current value 0 to 120
Changing pos 4 with current value 0 to 150
Changing pos 5 with current value 0 to 146
Changing pos 6 with current value 255 to 15
Changing pos 7 with current value 7 to 7
Changing pos 8 with current value 128 to 143
Changing pos 9 with current value 105 to 105
Changing pos 10 with current value 255 to 116
Changing pos 11 with current value 255 to 0
Changing pos 12 with current value 255 to 82
Changing pos 13 with current value 255 to 53
Changing pos 14 with current value 255 to 0
Changing pos 15 with current value 255 to 255
Writing [18, 52, 86, 120, 150, 146, 15, 7, 143, 105, 116, 0, 82, 53, 0, 255] to S1B3
Changing auth key and method to None
Stopping crypto1