Wlan / Wifi Beaglebone Black TP-Link TL-WN722N

After quite some struggeling getting this to work (including problem with internet over usb following this guide Sharing internet using Network-Over-USB in BeagleBone Black ), I got also a working solution for the Wifi.

I followed the guide at TP-Link TL-WN722N USB wireless adapter Beagle Bone Black with one minor typo (it is /etc/network/interfaces) and added three lines to my /etc/rc.local (as root, in front of exit 0 line).

connmanctl disable wifi
connmanctl enable wifi
ifup wlan0

The reason for this is because my adapter always started in master mode and not in managed mode.

Remark: This is most probably not the proper way of doing things, but it worked for me. Weiterlesen

pHAT DAC on OSMC

Our new media center (after some blue smoke on the TV side and resulting that the TV doesn’t send any information over the HDMI i²c-bus) is a RaspberryPi 2 with a [pHAT DAC] running [OSMC].

It is a little bit different than the [guide] on the Pimonori side and also the ones from the [HifiBerry]site [2](same chip on HifiBerryDAC) itself didn’t work.

So here is what I did by using all aforementioned guides:
sudo nano /boot/config.txt

Uncomment the dtoverlay=lirc-rpi:gpio_out_pin=17,gpio_in_pin=18' and add dtoverlay=hifiberry-dac.

Uncomment and change dtparam=audio=on.

Download the correct device tree overlay to  /boot/overlays/ from [ osmc-forum ] (it seems the overlay is broken).
Then reboot with sudo reboot

Within Settings > System > Audio output > Audio output device select ALSA: Default (snd_rpi_dac Analog) and you should hear the acquainted clicking noise.

One remark: This is what I did to get working audio output, not sure if it is the most simple way, but hey it works.

Weiterlesen

Save all Temporary PDF-Files from Chromium

Sometimes a file – and in that case always an important one – is not reachable anymore with your browser (paywall, internet access, etc.) in this case it is always nice to know how to recover temporary files.

After some stack overflow / exchange searching and piping everything together here a simple solution to find the temp files from chromium:

cd Downloads
mkdir tmp
cd tmp
find ~/.cache/chromium -type f -exec file {} + | grep PDF | sed 's/ *:.*//' | xargs -I{} cp "{}" ~/Downloads/tmp
ls -a

This creates a folder tmp inside the download directory searches the cache of chromium, checks if it is a pdf [source], removes any unnecessary things from the grep output with sed [source] and finally copies everything in the created folder with cp [source].

Note: alle files have a file name without extension and are continuous numbered. Hence, the name has no relation to the content.

Install Anaconda and IPython (notebook) in Ubuntu

Sometimes it is either hard to remember or there are many way to fulfill a certain goal. During my (re-)setup of my laptop with Ubuntu 12.04 I had to install IPython with its notebook capabilities.

The first step is to download the recent anaconda package from:
http://continuum.io/downloads
Either the 32 or 64 bit version. Next make it executable either by right click on the downloaded file and choose „Properties“ then the tab „Permissions“ or with an editor

sudo chmod +x Anaconda-1.x.x-Linux-xxx_xx.sh

.

Next start the installation by typing

./Anaconda-1.x.x-Linux-xxx_xx.sh 

. Choose the recommended options. (Be careful not to hit the enter key to often at beginning otherwise it kicks you out.)

This installs the necessary files, but we need to add the directory to the PATH. Therefore we change the the profile configuration by

gedit ~/.profile

and change the line

PATH="$HOME/bin:$PATH"

to

PATH="$HOME/bin:$PATH:~/anaconda/bin"

. Afterwards only safe the file. EDIT: It is also possible to restart or logout / login to update the PATH.

Next -but not strictly necessary- it is always favorable to update the existing files. To do this we can use the anaconda built in conda repository management system.
Type

conda update ipython

Now you’re read to start the IPython notebook everywhere (although it is recommended to start it always from the same directory, otherwise it isn’t possible to open the old files directly with the notebook manager).

 ipython notebook