Home Android Arch Linux Gentoo Linux LibreELEC Github Geo

Raspberry Pi 3 (piBox)

  • Gehäuse dBox2 Sagem
  • HuckePack (in der Mitte vom Bild)
    • UUGear WittyPi 2 (oben)
    • Raspberry Pi 3 (mitte)
    • UUGear 7-Port USB Hub for Raspberry Pi (unten)
  • DVB-C USB am 7-Port USB Hub (weißes Gehäuse)
  • Netzteil MeanWell RS-25-5 (rechts im Bild)
  • Festplatte mit SATA-zu-USB Adapter (links im Bild)
  • 2.4'' TFT im Frontpanel über GPIO mit dem Raspberry verbunden
  • Bedienelemente + IR im Frontpanel über eigene Platine mit einem Arduino Nano

piBox


nano


nano's Syntax Highlighting benutzen
cd ~/

wget http://milaw.biz/files/nanorc.tar.gz

tar -xvzf nanorc.tar.gz

rm nanorc.tar.gz


DT Overlay


die RTC (auf dem WittyPI) initialisieren und LIRC einschalten

Partition /flash schreibend einbinden
mount -o remount,rw /flash

die Datei /flash/config.txt bearbeiten
nano /flash/config.txt

/flash/config.txt

dtparam=i2c1=on
dtparam=i2c_arm=on
dtparam=spi=on
dtoverlay=pi3-miniuart-bt
dtoverlay=wittypi
dtoverlay=lirc-rpi,gpio_in_pin=16
  • dtoverlay=pi3-miniuart-bt für Raspberry 3 notwendig

alle noch cached Datein auf die Partition schreiben
sync

die Partiton /flash wieder lesend einhängen
mount -o remount,ro /flash

das System neustarten
reboot


Lirc


/storage/.config/lircd.conf

#
# brand: Technotrend
#

begin remote

  name       Technotrend
  bits                 6
  flags RC5|CONST_LENGTH
  eps                 30
  aeps                100

  one                 889   889
  zero                889   889
  plead               889
  pre_data_bits         7
  pre_data           0x55
  gap              113792
  toggle_bit            2
  frequency         36000
  duty_cycle           50

      begin codes
          KEY_POWER                0x01
          KEY_MUTE                 0x18
          KEY_1                    0x03
          KEY_2                    0x04
          KEY_3                    0x05
          KEY_4                    0x06
          KEY_5                    0x07
          KEY_6                    0x08
          KEY_7                    0x09
          KEY_8                    0x0A
          KEY_9                    0x0B
          KEY_0                    0x0C
          KEY_AUDIO                0x1A
          KEY_AGAIN                0x02
          KEY_VOLUMEDOWN           0x26
          KEY_VOLUMEUP             0x25
          KEY_TEXT                 0x19
          KEY_CHANNELDOWN          0x24
          KEY_CHANNELUP            0x23
          KEY_EXIT                 0x13
          KEY_OK                   0x0F
          KEY_UP                   0x0D
          KEY_DOWN                 0x11
          KEY_LEFT                 0x0E
          KEY_RIGHT                0x10
          KEY_RED                  0x14
          KEY_GREEN                0x15
          KEY_YELLOW               0x16
          KEY_BLUE                 0x17
          KEY_RECORD               0x3A
          KEY_PLAY                 0x3B
          KEY_STOP                 0x3C
          KEY_INFO                 0x12
          KEY_REWIND               0x3D
          KEY_PAUSE                0x3E
          KEY_FORWARD              0x3F
          KEY_EPG                  0x22
      end codes

end remote


/storage/.kodi/userdata/Lircmap.xml

<?xml version="1.0" encoding="UTF-8"?>
<lircmap>
    <remote device="Technotrend">
        <mute>KEY_MUTE</mute>
        <power>KEY_POWER</power>
        <one>KEY_1</one>
        <two>KEY_2</two>
        <three>KEY_3</three>
        <four>KEY_4</four>
        <five>KEY_5</five>
        <six>KEY_6</six>
        <seven>KEY_7</seven>
        <eight>KEY_8</eight>
        <nine>KEY_9</nine>
        <menu>KEY_AGAIN</menu>
        <zero>KEY_0</zero>
        <mymusic>KEY_AUDIO</mymusic>
        <!-- -->
        <volumeminus>KEY_VOLUMEDOWN</volumeminus>
        <teletext>KEY_TEXT</teletext>
        <volumeplus>KEY_VOLUMEUP</volumeplus>
        <up>KEY_UP</up>
        <left>KEY_LEFT</left>
        <select>KEY_OK</select>
        <right>KEY_RIGHT</right>
        <down>KEY_DOWN</down>
        <pageminus>KEY_CHANNELDOWN</pageminus>
        <back>KEY_EXIT</back>
        <pageplus>KEY_CHANNELUP</pageplus>
        <!-- -->
        <red>KEY_RED</red>
        <green>KEY_GREEN</green>
        <yellow>KEY_YELLOW</yellow>
        <blue>KEY_BLUE</blue>
        <record>KEY_RECORD</record>
        <play>KEY_PLAY</play>
        <stop>KEY_STOP</stop>
        <info>KEY_INFO</info>
        <reverse>KEY_REWIND</reverse>
        <pause>KEY_PAUSE</pause>
        <forward>KEY_FASTFORWARD</forward>
        <title>KEY_EPG</title>
    </remote>
</lircmap>


/storage/.kodi/userdata/keymaps/remote.xml

<keymap>
  <global>
    <remote>
      <power>ActivateWindow(shutdownmenu)</power>
    </remote>
  </global>
</keymap>
  • hiermit kommt das Power-Menu von Kodi in den Vordergrund, ohne diese Änderung würde Kodi beim Betätigen der Power-Taste auf der Fernbedienung das System sofort herunterfahren




FBTFT


/storage/.config/modules-load.d/fbtft.conf

spi-bcm2835
fbtft_device


/storage/.config/modprobe.d/fbtft.conf

options fbtft_device custom name=fb_ili9341 gpios=reset:25,dc:24,led:23 speed=32000000 rotate=270 bgr=1




HDMI / CEC


Folgende Schritte sind notwendig, damit die Fehlermeldungen vom CEC-System vermieden werden können, wenn kein TV oder AVR mit dem Raspberry verbdunden ist oder diese halt ausgeschalten sind (zum Beispiel Nachts bei einer Aufnahme vom PVR).

/storage/.kodi/temp/kodi.log

...
01:12:25.680 T:1804596128   ERROR: CecLogMessage - RegisterLogicalAddress - vc_cec_set_logical_address(E) returned invalid arg (8)
01:12:25.680 T:1804596128   ERROR: CecLogMessage - Open - vc_cec could not be initialised
01:12:25.681 T:1804596128   ERROR: CecLogMessage - could not open a connection (try 1)
01:12:26.681 T:1804596128   ERROR: CecLogMessage - RegisterLogicalAddress - vc_cec_set_logical_address(E) returned invalid arg (8)
01:12:26.681 T:1804596128   ERROR: CecLogMessage - Open - vc_cec could not be initialised
01:12:26.681 T:1804596128   ERROR: CecLogMessage - could not open a connection (try 2)
01:12:27.682 T:1804596128   ERROR: CecLogMessage - RegisterLogicalAddress - vc_cec_set_logical_address(E) returned invalid arg (8)
01:12:27.682 T:1804596128   ERROR: CecLogMessage - Open - vc_cec could not be initialised
01:12:27.682 T:1804596128   ERROR: CecLogMessage - could not open a connection (try 3)
01:12:28.683 T:1804596128   ERROR: CecLogMessage - RegisterLogicalAddress - vc_cec_set_logical_address(E) returned invalid arg (8)
01:12:28.683 T:1804596128   ERROR: CecLogMessage - Open - vc_cec could not be initialised
01:12:28.683 T:1804596128   ERROR: CecLogMessage - could not open a connection (try 4)
01:12:29.683 T:1804596128   ERROR: CecLogMessage - RegisterLogicalAddress - vc_cec_set_logical_address(E) returned invalid arg (8)
01:12:29.683 T:1804596128   ERROR: CecLogMessage - Open - vc_cec could not be initialised
01:12:29.684 T:1804596128   ERROR: CecLogMessage - could not open a connection (try 5)
01:12:30.684 T:1804596128   ERROR: CecLogMessage - RegisterLogicalAddress - vc_cec_set_logical_address(E) returned invalid arg (8)
01:12:30.684 T:1804596128   ERROR: CecLogMessage - Open - vc_cec could not be initialised
01:12:30.684 T:1804596128   ERROR: CecLogMessage - could not open a connection (try 6)
01:12:31.685 T:1804596128   ERROR: CecLogMessage - RegisterLogicalAddress - vc_cec_set_logical_address(E) returned invalid arg (8)
01:12:31.685 T:1804596128   ERROR: CecLogMessage - Open - vc_cec could not be initialised
01:12:31.685 T:1804596128   ERROR: CecLogMessage - could not open a connection (try 7)
01:12:32.686 T:1804596128   ERROR: CecLogMessage - RegisterLogicalAddress - vc_cec_set_logical_address(E) returned invalid arg (8)
01:12:32.686 T:1804596128   ERROR: CecLogMessage - Open - vc_cec could not be initialised
01:12:32.686 T:1804596128   ERROR: CecLogMessage - could not open a connection (try 8)
01:12:33.687 T:1804596128   ERROR: CecLogMessage - RegisterLogicalAddress - vc_cec_set_logical_address(E) returned invalid arg (8)
01:12:33.687 T:1804596128   ERROR: CecLogMessage - Open - vc_cec could not be initialised
01:12:33.687 T:1804596128   ERROR: CecLogMessage - could not open a connection (try 9)
01:12:34.687 T:1804596128   ERROR: CecLogMessage - RegisterLogicalAddress - vc_cec_set_logical_address(E) returned invalid arg (8)
01:12:34.687 T:1804596128   ERROR: CecLogMessage - Open - vc_cec could not be initialised
01:12:34.687 T:1804596128   ERROR: CecLogMessage - could not open a connection (try 10)
01:12:35.688 T:1796207520   ERROR: OpenConnection - could not opening a connection to the CEC adapter
...
  • dies wiederholt sich immer wieder

eine EDID Datei erstellen (TV/AVR müssen eingeschaltet sein)
tvservice -d /storage/edid.dat

Partition /flash schreibend einbinden
mount -o remount,rw /flash

die EDID Datei nach /flash kopieren
cp edid.dat /flash/

die Datei /flash/config.txt bearbeiten
nano /flash/config.txt

/flash/config.txt

# Force HDMI even if unplugged or powered off
hdmi_force_hotplug=1
# Use stored EDID
hdmi_edid_file=1

alle noch cached Datein auf die Partition schreiben
sync

die Partiton /flash wieder lesend einhängen
mount -o remount,ro /flash

das System neustarten
reboot


ArduIR