summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-01-26 14:47:38 +0100
committermakefu <github@syntax-fehler.de>2015-01-26 14:47:38 +0100
commit30f110b93bb50ae10e3b1d746710ffeab12265ae (patch)
treeffd1f81d9b6647e4b364b1985bcca826fece4aca
parentad5577cf2681712c5d8f9bbf00f4f51226bb388d (diff)
pre-change
-rw-r--r--content/extra/reghack/README.txt44
-rw-r--r--content/extra/reghack/index.html12
-rw-r--r--content/extra/reghack/reghack.c433
-rw-r--r--content/extra/reghack/reghack.mips.elfbin0 -> 46156 bytes
-rw-r--r--content/extra/reghack/reghack.ppc.elfbin0 -> 41720 bytes
-rw-r--r--content/extra/reghack/reghack.x86.elfbin0 -> 33736 bytes
-rw-r--r--content/extra/reghack/reghack.x86_64.elfbin0 -> 37675 bytes
-rw-r--r--content/img/finished_softkeyboard.jpgbin0 -> 656640 bytes
-rw-r--r--content/img/softkeyboard_on_laptop_raspi.jpgbin0 -> 1005477 bytes
-rw-r--r--content/img/videograbber_on_raspi.jpgbin0 -> 1049117 bytes
-rw-r--r--content/posts/libvirt-filter-localnet.rst6
-rw-r--r--content/posts/software-kvm-switch.rst74
-rw-r--r--content/posts/utf8-irssi-madness.rst3
-rw-r--r--content/posts/xbmc-upgrade.rst151
14 files changed, 720 insertions, 3 deletions
diff --git a/content/extra/reghack/README.txt b/content/extra/reghack/README.txt
new file mode 100644
index 0000000..fe17952
--- /dev/null
+++ b/content/extra/reghack/README.txt
@@ -0,0 +1,44 @@
+The reghack utility replaces the regulatory domain rules in the driver binaries
+with less restrictive ones. The current version also lifts the 5GHz radar
+channel restrictions in ath9k.
+
+This version is made for current OpenWrt trunk. To patch older releases like 12.09,
+use http://luci.subsignal.org/~jow/reghack/old/ .
+
+How to use:
+
+ssh root@openwrt
+
+On ar71xx:
+
+cd /tmp/
+wget http://luci.subsignal.org/~jow/reghack/reghack.mips.elf
+chmod +x reghack.mips.elf
+./reghack.mips.elf /lib/modules/*/ath.ko
+./reghack.mips.elf /lib/modules/*/cfg80211.ko
+reboot
+
+On mpc85xx:
+
+cd /tmp/
+wget http://luci.subsignal.org/~jow/reghack/reghack.ppc.elf
+chmod +x reghack.ppc.elf
+./reghack.ppc.elf /lib/modules/*/ath.ko
+./reghack.ppc.elf /lib/modules/*/cfg80211.ko
+reboot
+
+On x86:
+
+cd /tmp/
+wget http://luci.subsignal.org/~jow/reghack/reghack.x86.elf
+chmod +x reghack.x86.elf
+./reghack.x86.elf /lib/modules/*/ath.ko
+./reghack.x86.elf /lib/modules/*/cfg80211.ko
+
+On amd64:
+
+cd /tmp/
+wget http://luci.subsignal.org/~jow/reghack/reghack.x86_64.elf
+chmod +x reghack.x86_64.elf
+./reghack.x86_64.elf /lib/modules/*/ath.ko
+./reghack.x86_64.elf /lib/modules/*/cfg80211.ko
diff --git a/content/extra/reghack/index.html b/content/extra/reghack/index.html
new file mode 100644
index 0000000..777f152
--- /dev/null
+++ b/content/extra/reghack/index.html
@@ -0,0 +1,12 @@
+<html>
+<head>
+ <title>reghack index from 2015-01-04</title>
+</head>
+<body>
+<br/> README.txt
+<br/> reghack.c
+<br/> reghack.mips.elf
+<br/> reghack.ppc.elf
+<br/> reghack.x86_64.elf
+<br/> reghack.x86.elf
+</html>
diff --git a/content/extra/reghack/reghack.c b/content/extra/reghack/reghack.c
new file mode 100644
index 0000000..2f1b917
--- /dev/null
+++ b/content/extra/reghack/reghack.c
@@ -0,0 +1,433 @@
+/*
+ * reghack - Utility to binary-patch the embedded mac80211 regulatory rules.
+ *
+ * Copyright (C) 2012-2014 Jo-Philipp Wich <xm@subsignal.org>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+#include <byteswap.h>
+#include <limits.h>
+#include <arpa/inet.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+
+
+static int need_byteswap = 0;
+
+enum nl80211_dfs_regions {
+ NL80211_DFS_UNSET = 0,
+ NL80211_DFS_FCC = 1
+};
+
+struct ieee80211_freq_range {
+ uint32_t start_freq_khz;
+ uint32_t end_freq_khz;
+ uint32_t max_bandwidth_khz;
+};
+
+struct ieee80211_power_rule {
+ uint32_t max_antenna_gain;
+ uint32_t max_eirp;
+};
+
+struct ieee80211_reg_rule {
+ struct ieee80211_freq_range freq_range;
+ struct ieee80211_power_rule power_rule;
+ uint32_t flags;
+ uint32_t dfs_cac_ms;
+};
+
+struct ieee80211_regdomain {
+ uint32_t n_reg_rules;
+ char alpha2[2];
+ enum nl80211_dfs_regions dfs_region;
+ struct ieee80211_reg_rule reg_rules[1];
+};
+
+#define MHZ_TO_KHZ(freq) ((freq) * 1000)
+#define KHZ_TO_MHZ(freq) ((freq) / 1000)
+#define DBI_TO_MBI(gain) ((gain) * 100)
+#define MBI_TO_DBI(gain) ((gain) / 100)
+#define DBM_TO_MBM(gain) ((gain) * 100)
+#define MBM_TO_DBM(gain) ((gain) / 100)
+
+#define REG_RULE(start, end, bw, gain, eirp, reg_flags) \
+{ \
+ .freq_range.start_freq_khz = MHZ_TO_KHZ(start), \
+ .freq_range.end_freq_khz = MHZ_TO_KHZ(end), \
+ .freq_range.max_bandwidth_khz = MHZ_TO_KHZ(bw), \
+ .power_rule.max_antenna_gain = DBI_TO_MBI(gain),\
+ .power_rule.max_eirp = DBM_TO_MBM(eirp), \
+ .flags = reg_flags, \
+ .dfs_cac_ms = 0, \
+}
+
+#define REG_MATCH(code, num, dfs, rule) \
+{ \
+ .alpha2 = code, \
+ .dfs_region = dfs, \
+ .n_reg_rules = num, \
+ .reg_rules = { \
+ rule \
+ } \
+}
+
+
+struct search_regdomain {
+ const char *desc;
+ struct ieee80211_regdomain reg;
+};
+
+static const struct search_regdomain search_regdomains[] = {
+ /* cfg80211.ko matches */
+ {
+ .desc = "core world5 regdomain in cfg80211/reg.o",
+ .reg = REG_MATCH("00", 5, NL80211_DFS_UNSET, REG_RULE(2402, 2472, 40, 6, 20, 0))
+ }, {
+ .desc = "core world6 regdomain in cfg80211/reg.o",
+ .reg = REG_MATCH("00", 6, NL80211_DFS_UNSET, REG_RULE(2402, 2472, 40, 6, 20, 0))
+ }, {
+ .desc = "embedded 00 regdomain in cfg80211/regdb.o",
+ .reg = REG_MATCH("00", 5, NL80211_DFS_UNSET, REG_RULE(2402, 2472, 40, 3, 20, 0))
+ }, {
+ .desc = "embedded 00 regdomain in cfg80211/regdb.o",
+ .reg = REG_MATCH("00", 6, NL80211_DFS_UNSET, REG_RULE(2402, 2472, 40, 3, 20, 0))
+ }, {
+ .desc = "embedded 00 regdomain in cfg80211/regdb.o",
+ .reg = REG_MATCH("00", 8, NL80211_DFS_UNSET, REG_RULE(2402, 2472, 40, 0, 20, 0))
+ }, {
+ .desc = "embedded US regdomain in cfg80211/regdb.o",
+ .reg = REG_MATCH("US", 6, NL80211_DFS_UNSET, REG_RULE(2402, 2472, 40, 3, 27, 0))
+ }, {
+ .desc = "embedded US regdomain in cfg80211/regdb.o",
+ .reg = REG_MATCH("US", 7, NL80211_DFS_UNSET, REG_RULE(2402, 2472, 40, 3, 27, 0))
+ }, {
+ .desc = "embedded US regdomain in cfg80211/regdb.o",
+ .reg = REG_MATCH("US", 7, NL80211_DFS_FCC, REG_RULE(2402, 2472, 40, 3, 27, 0))
+ },
+
+ /* regdb.txt matches (new) */
+ {
+ .desc = "embedded 00 regdomain in cfg80211/regdb.o",
+ .reg = REG_MATCH("00", 6, NL80211_DFS_UNSET, REG_RULE(2402, 2472, 40, 0, 20, 0))
+ }, {
+ .desc = "embedded US regdomain in cfg80211/regdb.o",
+ .reg = REG_MATCH("US", 5, NL80211_DFS_FCC, REG_RULE(2402, 2472, 40, 0, 30, 0))
+ },
+
+ /* ath.ko matches */
+ {
+ .desc = "ath world regdomain with 3 rules in ath/regd.o",
+ .reg = REG_MATCH("99", 3, NL80211_DFS_UNSET, REG_RULE(2402, 2472, 40, 0, 20, 0))
+ }, {
+ .desc = "ath world regdomain with 4 rules in ath/regd.o",
+ .reg = REG_MATCH("99", 4, NL80211_DFS_UNSET, REG_RULE(2402, 2472, 40, 0, 20, 0))
+ }, {
+ .desc = "ath world regdomain with 5 rules in ath/regd.o",
+ .reg = REG_MATCH("99", 5, NL80211_DFS_UNSET, REG_RULE(2402, 2472, 40, 0, 20, 0))
+ }
+};
+
+
+struct search_insn {
+ const char *desc;
+ const uint16_t machine;
+ const uint32_t search;
+ const uint32_t replace;
+ const uint32_t mask;
+ int step;
+};
+
+static const struct search_insn search_insns[] = {
+ /* radar frequency check */
+ {
+ .desc = "ath_is_radar_freq() MIPS opcode in ath/regd.o",
+ .machine = 0x0008, /* MIPS */
+ .search = 0x2400eb74, /* addiu rX, rY, -5260 */
+ .replace = 0x24000000, /* addiu rX, rY, 0 */
+ .mask = 0xfc00ffff,
+ .step = 4
+ },
+ {
+ .desc = "ath_is_radar_freq() PPC opcode in ath/regd.o",
+ .machine = 0x0014, /* PPC */
+ .search = 0x3800eb74, /* addi rX, rY, -5260 */
+ .replace = 0x38000000, /* addi rX, rY, 0 */
+ .mask = 0xfc00ffff,
+ .step = 4
+ },
+ {
+ .desc = "ath_is_radar_freq() x86 opcode in ath/regd.o (1/2)",
+ .machine = 0x0003, /* x86 */
+ .search = 0x0000148c, /* 5260 */
+ .replace = 0x00000000, /* 0 */
+ .mask = 0x0000ffff,
+ .step = 1
+ },
+ {
+ .desc = "ath_is_radar_freq() x86 opcode in ath/regd.o (2/2)",
+ .machine = 0x0003, /* x86 */
+ .search = 0xffffeb74, /* -5260 */
+ .replace = 0x00000000, /* 0 */
+ .mask = 0xffffffff,
+ .step = 1
+ },
+ {
+ .desc = "ath_is_radar_freq() x86-64 opcode in ath/regd.o (1/2)",
+ .machine = 0x003e, /* x86-64 */
+ .search = 0x0000148c, /* 5260 */
+ .replace = 0x00000000, /* 0 */
+ .mask = 0x0000ffff,
+ .step = 1
+ },
+ {
+ .desc = "ath_is_radar_freq() x86-64 opcode in ath/regd.o (2/2)",
+ .machine = 0x003e, /* x86-64 */
+ .search = 0xffffeb74, /* -5260 */
+ .replace = 0x00000000, /* 0 */
+ .mask = 0xffffffff,
+ .step = 1
+ }
+};
+
+
+static void check_endianess(unsigned char *elf_hdr)
+{
+ int self_is_be = (htonl(42) == 42);
+ int elf_is_be = (elf_hdr[5] == 2);
+
+ if (self_is_be != elf_is_be)
+ {
+ need_byteswap = 1;
+ printf("Byte swapping needed (utility %s endian, module %s endian)\n",
+ self_is_be ? "big" : "low",
+ elf_is_be ? "big" : "low");
+ }
+}
+
+static void bswap_rule(struct ieee80211_reg_rule *r)
+{
+ r->freq_range.start_freq_khz = bswap_32(r->freq_range.start_freq_khz);
+ r->freq_range.end_freq_khz = bswap_32(r->freq_range.end_freq_khz);
+ r->freq_range.max_bandwidth_khz = bswap_32(r->freq_range.max_bandwidth_khz);
+
+ r->power_rule.max_antenna_gain = bswap_32(r->power_rule.max_antenna_gain);
+ r->power_rule.max_eirp = bswap_32(r->power_rule.max_eirp);
+
+ r->flags = bswap_32(r->flags);
+}
+
+static int patch_regdomain(struct ieee80211_regdomain *pos,
+ const struct ieee80211_regdomain *comp)
+{
+ struct ieee80211_reg_rule r2 = REG_RULE(2400, 2483, 40, 0, 30, 0);
+ struct ieee80211_reg_rule r5 = REG_RULE(5140, 5860, 160, 0, 30, 0);
+ struct ieee80211_regdomain pattern = *comp;
+
+ if (need_byteswap)
+ {
+ bswap_rule(&pattern.reg_rules[0]);
+ pattern.dfs_region = bswap_32(pattern.dfs_region);
+ pattern.n_reg_rules = bswap_32(pattern.n_reg_rules);
+ }
+
+ if (!memcmp(pos, &pattern, sizeof(pattern)))
+ {
+ pos->reg_rules[0] = r2;
+ pos->reg_rules[1] = r5;
+ pos->n_reg_rules = 2;
+ pos->dfs_region = 0;
+
+ if (need_byteswap)
+ {
+ bswap_rule(&pos->reg_rules[0]);
+ bswap_rule(&pos->reg_rules[1]);
+ pos->n_reg_rules = bswap_32(pos->n_reg_rules);
+ }
+
+ return 0;
+ }
+
+ return 1;
+}
+
+
+static uint16_t check_ath_ko(unsigned char *elf_hdr, const char *filename)
+{
+ uint16_t type = *(uint16_t *)(elf_hdr + 18);
+ const char *file = strrchr(filename, '/');
+
+ if (!file)
+ file = filename;
+ else
+ file++;
+
+ if (need_byteswap)
+ type = bswap_16(type);
+
+ if (!strcmp(file, "ath.ko"))
+ return type;
+
+ return 0;
+}
+
+static int patch_insn(uint32_t *pos, const struct search_insn *insn)
+{
+ uint32_t cmp = need_byteswap ? bswap_32(*pos) : *pos;
+
+ if ((cmp & insn->mask) == insn->search)
+ {
+ *pos = need_byteswap ? bswap_32(insn->replace | (cmp & ~insn->mask))
+ : insn->replace | (cmp & ~insn->mask);
+
+ return 0;
+ }
+
+ return 1;
+}
+
+
+static int tryopen(const char *path, int *size, void **map)
+{
+ int fd;
+ struct stat s;
+
+ if (stat(path, &s))
+ {
+ perror("stat()");
+ return -1;
+ }
+
+ if ((fd = open(path, O_RDWR)) == -1)
+ {
+ perror("open()");
+ return -2;
+ }
+
+ *size = s.st_size;
+ *map = mmap(NULL, *size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+
+ if (*map == MAP_FAILED)
+ {
+ close(fd);
+ perror("mmap()");
+ return -3;
+ }
+
+ return fd;
+}
+
+int main(int argc, char **argv)
+{
+ int i, j, fd, sz;
+ int found = 0;
+ uint16_t ath_ko_machine = 0;
+
+ void *map;
+ char *tmp = NULL, cmd[PATH_MAX * 2 + 4];
+
+ if (argc < 2)
+ {
+ printf("Usage: %s module.ko\n", argv[0]);
+ exit(1);
+ }
+
+ fd = tryopen(argv[1], &sz, &map);
+
+ if (fd == -3)
+ {
+ printf("Memory mapping failed (missing fs support?), retrying from tmpfs\n");
+
+ tmp = tmpnam(NULL);
+
+ sprintf(cmd, "cp %s %s", argv[1], tmp);
+ system(cmd);
+
+ fd = tryopen(tmp, &sz, &map);
+ }
+
+ if (fd < 0)
+ {
+ if (tmp)
+ unlink(tmp);
+
+ exit(1);
+ }
+
+ check_endianess(map);
+ ath_ko_machine = check_ath_ko(map, argv[1]);
+
+ if (ath_ko_machine)
+ {
+ for (j = 0; j < sizeof(search_insns)/sizeof(search_insns[0]); j++)
+ {
+ if (search_insns[j].machine != ath_ko_machine)
+ continue;
+
+ for (i = 0; i < (sz - sizeof(search_regdomains[0].reg)); i += search_insns[j].step)
+ {
+ if (!patch_insn(map + i, &search_insns[j]))
+ {
+ printf("Patching @ 0x%08x: %s\n", i, search_insns[j].desc);
+ found = 1;
+ }
+ }
+ }
+ }
+
+ for (i = 0; i < (sz - sizeof(search_regdomains[0].reg)); i += sizeof(uint32_t))
+ {
+ for (j = 0; j < (sizeof(search_regdomains)/sizeof(search_regdomains[0])); j++)
+ {
+ if (!patch_regdomain(map + i, &search_regdomains[j].reg))
+ {
+ printf("Patching @ 0x%08x: %s\n", i, search_regdomains[j].desc);
+ found = 1;
+ }
+ }
+ }
+
+ if (munmap(map, sz))
+ {
+ perror("munmap()");
+ exit(1);
+ }
+
+ if (tmp)
+ {
+ if (found)
+ {
+ sprintf(cmd, "cp %s %s", tmp, argv[1]);
+ system(cmd);
+ }
+
+ unlink(tmp);
+ }
+
+ close(fd);
+
+ if (!found)
+ {
+ printf("Unable to find regulatory rules (already patched?)\n");
+ exit(1);
+ }
+
+ return 0;
+}
diff --git a/content/extra/reghack/reghack.mips.elf b/content/extra/reghack/reghack.mips.elf
new file mode 100644
index 0000000..51f6626
--- /dev/null
+++ b/content/extra/reghack/reghack.mips.elf
Binary files differ
diff --git a/content/extra/reghack/reghack.ppc.elf b/content/extra/reghack/reghack.ppc.elf
new file mode 100644
index 0000000..071b8d3
--- /dev/null
+++ b/content/extra/reghack/reghack.ppc.elf
Binary files differ
diff --git a/content/extra/reghack/reghack.x86.elf b/content/extra/reghack/reghack.x86.elf
new file mode 100644
index 0000000..5c84ce2
--- /dev/null
+++ b/content/extra/reghack/reghack.x86.elf
Binary files differ
diff --git a/content/extra/reghack/reghack.x86_64.elf b/content/extra/reghack/reghack.x86_64.elf
new file mode 100644
index 0000000..c22bf46
--- /dev/null
+++ b/content/extra/reghack/reghack.x86_64.elf
Binary files differ
diff --git a/content/img/finished_softkeyboard.jpg b/content/img/finished_softkeyboard.jpg
new file mode 100644
index 0000000..86b5586
--- /dev/null
+++ b/content/img/finished_softkeyboard.jpg
Binary files differ
diff --git a/content/img/softkeyboard_on_laptop_raspi.jpg b/content/img/softkeyboard_on_laptop_raspi.jpg
new file mode 100644
index 0000000..96a0d52
--- /dev/null
+++ b/content/img/softkeyboard_on_laptop_raspi.jpg
Binary files differ
diff --git a/content/img/videograbber_on_raspi.jpg b/content/img/videograbber_on_raspi.jpg
new file mode 100644
index 0000000..90ad1ae
--- /dev/null
+++ b/content/img/videograbber_on_raspi.jpg
Binary files differ
diff --git a/content/posts/libvirt-filter-localnet.rst b/content/posts/libvirt-filter-localnet.rst
index 1d2fcea..78fc0a1 100644
--- a/content/posts/libvirt-filter-localnet.rst
+++ b/content/posts/libvirt-filter-localnet.rst
@@ -1,9 +1,9 @@
Filter Local Network-Access for Libvirt Guest
-##################################
-:date: 2014-04-14 13:25
+#############################################
+:date: 2014-12-04 13:25
:tags: libvirt, netfilter
-My google-fu was not strong enough to found a walkthrough of how to filter
+My google-fu was not strong enough to find a walkthrough of how to filter
the local network for a libvirt guest instance which is using a nat-ed
interface while keeping the access to the internet working.
diff --git a/content/posts/software-kvm-switch.rst b/content/posts/software-kvm-switch.rst
new file mode 100644
index 0000000..b4943f6
--- /dev/null
+++ b/content/posts/software-kvm-switch.rst
@@ -0,0 +1,74 @@
+A Software KVM Switch
+#####################
+:date: 2015-01-05 02:26
+:tags: composite video,software keyboard,kvm,remote management
+:status: draft
+
+I have been so often in the need for quick graphical access to a server without
+the need of an actual mouse and display plus wiring for power and so on.
+
+In the enterprise world there are things called 'KVM switches' and laptops
+which do exactly what i need but a) they are fucking expensive and b) they are
+stationary and built into server racks so i came up with my own low-budget solution.
+
+With this you will be able to see video output from composite,hdmi and vga and
+control a virtual USB keyboard of a headless server or embedded system.
+
+.. image:: /img/videograbber_on_raspi.jpg
+ :width: 60%
+ :alt: video and soft keyboard attached to raspi
+ :align: middle
+
+I am using a 32u4 turned into a software keyboard and a Composite Video grabber to
+capture the output of the system to supervise.
+
+*A fair Warning:* Be aware that the video image is very crappy and the software keyboard code is
+a WIP.
+
+Parts list
+----------
+All you need are the following things:
+
+For the soft keyboard input:
+1. a 32u4 microcontroller like the `arduino pro micro`_
+2. a cheap `USB-TTL adapter`_
+
+For capturing video:
+1. a video grabber with the STK1160 chipset (for linux support)
+I asked the sellers on aliexpress and found `this videograbber`_ which uses
+the chipset needed.
+2. a HDMI-to-AV_ (recommended) and optionally a VGA-to-HDMI_ box to capture
+output other than the one from a Raspberry Pi which has native composite output.
+
+
+Setup
+-----
+
+**Soft Keyboard**
+
+Attach the USB-TTL adapter to the 32u4 by connecting both GND , Pin 9 to the
+USB-TTL TX and pin 10 to USB-TTL RX.
+
+Now flash the passthrough firmware for the 32u4:
+
+.. code-block:: bash
+
+ git clone https://github.com/makefu/keyboard-passthrough.git
+ cd keyboard-passthrough
+ cat README.md
+ arduino key_passthrough/key_passthrough.ino
+ # flash it
+
+Get the passthrough software running on your computer:
+
+.. code-block:: bash
+
+ pip install hg+http://bitbucket.org/pygame/pygame
+ python here.py
+
+
+.. _arduino pro micro:
+.. _USB-TTL adapter:
+.. _this videograbber:
+.. _HDMI-to-AV:
+.. _VGA-to-HDMI:
diff --git a/content/posts/utf8-irssi-madness.rst b/content/posts/utf8-irssi-madness.rst
index fb86115..5fa34bc 100644
--- a/content/posts/utf8-irssi-madness.rst
+++ b/content/posts/utf8-irssi-madness.rst
@@ -14,12 +14,14 @@ add lines in .{ba,z}shrc:
export LC_ALL=en_US.utf8
add lines in .tmux.conf:
+
.. code-block:: bash
set-option -g default-terminal "rxvt"
set-window-option -g utf8 on
in irssi:
+
.. code-block:: bash
/set term_charset UTF-8
@@ -32,6 +34,7 @@ in irssi:
/quit
in putty config:
+
.. code-block:: bash
window -> translation -> Received data assumed to be in which character set: UTF-8
diff --git a/content/posts/xbmc-upgrade.rst b/content/posts/xbmc-upgrade.rst
new file mode 100644
index 0000000..62cf1ca
--- /dev/null
+++ b/content/posts/xbmc-upgrade.rst
@@ -0,0 +1,151 @@
+Upgrading XBMC
+##################################
+:date: 2014-07-24 00:00
+:tags: xbmc,lirc
+:status: draft
+
+* using usbmce
+* using ir-blaster
+ everything worked under linux
+* having multi-remotes
+* kernel 3.2 - blaster does not work, `do-release-upgrade -d`
+* using irexec
+* Lircmap.xml
+
+.. code-block:: xml
+
+ <lircmap>
+ <remote device="LG_TV">
+ <play>play</play>
+ <pause>pause</pause>
+ <up>up</up>
+ <down>down</down>
+ <left>left</left>
+ <right>right</right>
+ <title>guide</title>
+ <menu>info</menu>
+ <back>back</back>
+ <select>ok</select>
+ <mute>mute</mute>
+ <showsubtitles>subtitle</showsubtitles>
+ <volumeup>ch_up</volumeup>
+ <volumedown>ch_down</volumedown>
+ <favourites>fav</favourites>
+ </remote>
+ <remote device="LG_BAR">
+ <stop>stop</stop>
+ <pause>start_pause</pause>
+ <FastForward>forward</FastForward>
+ <Rewind>rewind</Rewind>
+ </remote>
+ </lircmap>
+
+both LG maps
+
+hardware.conf:
+
+.. code-block:: sh
+
+ REMOTE="Windows Media Center Transceivers/Remotes (all)"
+ REMOTE_MODULES="lirc_dev mceusb"
+ REMOTE_DRIVER=""
+ REMOTE_DEVICE="/dev/lirc0"
+ REMOTE_SOCKET=""
+ REMOTE_LIRCD_CONF="mceusb/lircd.conf.mceusb"
+ REMOTE_LIRCD_ARGS=""
+ TRANSMITTER="Microsoft Windows Media Center V2 (usb) : Scientific Atlanta Cable box"
+ TRANSMITTER_MODULES="lirc_dev mceusb"
+ TRANSMITTER_DRIVER=""
+ TRANSMITTER_DEVICE=""
+ TRANSMITTER_SOCKET=""
+ TRANSMITTER_LIRCD_CONF="scientificatlanta/general.conf"
+ TRANSMITTER_LIRCD_ARGS=""
+ START_LIRCD="true"
+ START_IREXEC="true"
+ START_LIRCMD=""
+ LOAD_MODULES=""
+ LIRCMD_CONF=""
+ FORCE_NONINTERACTIVE_RECONFIGURATION=""
+
+lircrc:
+
+.. code-block:: kernel-config
+
+ begin
+ prog = irexec
+ button = 0
+ remote = LG_BAR
+ config = shutdown -h now
+ end
+ begin
+ prog = irexec
+ button = 0
+ remote = LG_TV
+ config = shutdown -h now
+ end
+ begin
+ prog = irexec
+ button = green
+ remote = LG_TV
+ config = python /home/ubuntu/chromoflex/chromo.py 4 65 253 38
+ end
+ begin
+ prog = irexec
+ button = blue
+ remote = LG_TV
+ config = python /home/ubuntu/chromoflex/chromo.py 4 132 112 255 0
+ end
+ begin
+ prog = irexec
+ button = yellow
+ remote = LG_TV
+ config = python /home/ubuntu/chromoflex/chromo.py 4 252 242 54
+ end
+ begin
+ prog = irexec
+ button = red
+ remote = LG_TV
+ config = python /home/ubuntu/chromoflex/chromo.py 4 255 58 41
+ end
+ begin
+ prog = irexec
+ button = t.opt
+ remote = LG_TV
+ config = python /home/ubuntu/chromoflex/chromo.py 4 0 0 0
+ end
+ begin
+ prog = irexec
+ button = 9
+ remote = LG_TV
+ config = irsend SEND_ONCE LG_BAR power
+ end
+ begin
+ prog = irexec
+ button = vol_up
+ remote = LG_TV
+ config = irsend SEND_ONCE LG_BAR volume_up
+ end
+ begin
+ prog = irexec
+ button = vol_down
+ remote = LG_TV
+ config = irsend SEND_ONCE LG_BAR volume_down
+ end
+
+
+
+* no xbmc-xvba, using radeon-oss
+
+ 2.) XBMC settings
+ (Set xbmc to Advanced or Expert before doing this - settings hierarchies, see
+ in the middle of confluence)
+ System->Settings->System->Video output
+ Vertical blank sync: Let Driver choose
+
+ System ->Video->Acceleration:
+ VDPAU: On
+ Prefer VDPAU Mixer: ON
+ VAAPI: off
+
+* no audio in xbmc ...
+ `apt-get purge pulseaudio`