2014-07-13

raw image format, ffmpeg, and raspivid

The SwView.org node 165: RGB565 To PNG/JPEG showed up at the top of the results listing for a search on RGB565, an image data format produced by a camera. We are most interested in capturing an manipulating said data, so we want to know what format it's in, and this RGB565 is used to refer to the format throughout the files which we currently access.


if image.raw contains data for multiple frames (e.g. of a video), you can use "%d" and ffmpeg will automatically name the additional files generated: 
ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb565 -s 1024x768 -i movie.raw -f image2 -vcodec png image%d.png

Instead of a file, If you have an rgb565 stream, you may attempt to direct the data to stdin of ffmpeg and accomplish the same. In such a case, instead of "-i image.raw", you can use "-i -":
firstCommand | ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb565 -s 1024x768 -i - -f image2 -vcodec png image%d.png

Note that raspivid can produce raw video and place it on stdout.

2014-07-12

RasPi HDMI Init /boot/config.txt working changes

These are the working settings from /boot/config.txt on the Raspberry Pi Raspbian install -- only the editted lines are shown - all the other settings were left at the defaults.

TODO: make a diff

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=0

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
overscan_left=-192
overscan_right=128
overscan_top=16
#overscan_bottom=-6

# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=1280
framebuffer_height=960

2014-07-11

Tweaking Rapsberry Pi HDMI

Tweaking Rapsberry Pi HDMI

fixed monitor size problem for acer panel + raspberry pi

Found several interesting things while examining the drive image(s) for the 8-gig Raspbian image that became inoperable on the Pi during intensive installation and removal of build packages...

  1. The Raspbian Linux install image is actuall more than one partition. When the SD card is plugged into a USB SD card reader connected to the T42 system, two partitions are shown [and optionally auto-mounted] for the device. These show up here under Mint / Debian ~ Ubunbtu as

        /dev/sdb1
        /dev/sdb2 
    

    which are mounted at

        /media/boot
        /media/fc254b57-8fff-4f96-9609-ea202d871acf
    
    respectively.

  2. Not sure why /dev/sdb2 is not mounted on /media/sdb2 as one might expect...

    Further investigation includes checking the mount data from within the pi acconut on the Raspbian install on the Raspberry Pi device itself.

    This shows that the root file system of the Pi is mounted as

        /dev/root  -> /
    

    Since there is no way to identify hard disc partitions from that mount listing, we try

        ls -lh /dev/root
    

    which returns

        lrwxrwxrwx 1 root root 9 Jul 11 08:10 /dev/root -> mmcblk0p2
    

    so we try

        ls -lh /dev/mmcblk0*
    

    which gives us

        brw-rw---T 1 root floppy 179, 0 Jan  1  1970 /dev/mmcblk0
        brw-rw---T 1 root floppy 179, 1 Jan  1  1970 /dev/mmcblk0p1
        brw-rw---T 1 root floppy 179, 2 Jul 11 08:10 /dev/mmcblk0p2
    

    ... furthermore, looking in the /boot directory of the filesystem mounted on / we see that there is nothing there -- it is not the location of the filesystem automounted from /dev/sdb1 on /media/boot on the T42 system.

    So this:

       sudo mount /dev/mmcblk0p1 /boot
    

    and

        ls -lh /boot total 9.5M
        -rwxr-xr-x 1 root root  18K Jul 10 02:48 bootcode.bin
        -rwxr-xr-x 1 root root  120 Jun 20 06:51 cmdline.txt
        -rwxr-xr-x 1 root root 1.2K Jul 11 08:10 config.txt
        -rwxr-xr-x 1 root root 2.1K Jul 10 02:48 fixup_cd.dat
        -rwxr-xr-x 1 root root 5.8 K Jul 10 02:48 fixup.dat
        -rwxr-xr-x 1 root root 8.7K Jul 10 02:48 fixup_x.dat
        -rwxr-xr-x 1 root root  137 Jun 20 10:33 issue.txt
        -rwxr-xr-x 1 root root 3.1M Jul 10 02:49 kernel.img
        -rwxr-xr-x 1 root root  19K Sep 25  2013 LICENSE.oracle
        -rwxr-xr-x 1 root root 503K Jul 10 02:48 start_cd.elf
        -rwxr-xr-x 1 root root 2.5M Jul 10 02:48 start.elf
        -rwxr-xr-x 1 root root 3.4M Jul 10 02:48 start_x.elf
    

    Which leads us to the next fascinating discovery:

  3. HDMI Boot-time Cofiguration Parameters

    cat /boot/config.txt 
    

    ... and find ...

        # uncomment if you get no picture on HDMI for a
        # default "safe" mode 
        hdml_safe=1
    
        # uncomment this if your display has a black border 
        # of unused pixels visible and your display can 
        # output without overscan 
        disable_overscan=1 
        # uncomment the following to adjust overscan. Use
        # positive numbers if console goes off screen, and 
        # negative if there is too much border 
        #overscan_left=16 
        #overscan_right=16 
        #overscan_top=16 
        #overscan_bottom=16 
    
        # uncomment to force a console size. By default 
        # it will be display's  size minus overscan. 
        framebuffer_width=1280 
        framebuffer_height=960 
    
        # uncomment if hdmi display is not detected and 
        # composite  is being output 
        #hdmi_force_hotplug=1 
    
        # uncomment to force a specific HDMI mode (this will 
        # force VGA) 
        #hdmi_group=1
        #hdmi_mode=1
    
        # uncomment to force a HDMI mode rather than DVI. 
        # This can make audio work
        # in DMT (computer monitor) modes
        #hdmi_drive=2
    
        # uncomment to increase signal to HDMI, if you 
        # have interference, blanking, or no display
        #config_hdmi_boost=4
    
        # uncomment for composite PAL
        #sdtv_mode=2
    
        # uncomment to overclock the arm. 700 MHz is the
        # default.
        #ar_freq=800
    
        # for more options see http://elinux.org/RPi_config.txt
        gpu_mem=128
        start_x=1
    

    Interesting - this config.txt file looks like it might have something to do with the raspi-config utility that's used to change many of the settings that are listed in the file.

    Even more interestingly, I don't remember seeing these setting in the curses interface raspi-config always presents. So. No idea what this stuff is, but it looks like these lines

        # uncomment if you get no picture on HDMI for a default "safe" mode
        hdmi_safe=1
    
        # uncomment this if your display has a black border of unused pixels
        # visible and your display can output without overscan
        disable_overscan=1
    
        # uncomment the following to adjust overscan. Use positive numbers if 
        # console goes off screen, and negative if there is too much border
        #overscan_left=16
        #overscan_right=16
        #overscan_top=16
        #overscan_bottom=16
    
        # uncomment to force a console size. By default it will be display's 
        # size minus overscan.
        framebuffer_width=1280
        framebuffer_height=960
    
        # uncomment if hdmi display is not detected and composite 
        # is being output
        #hdmi_force_hotplug=1
    
        # uncomment to force a specific HDMI mode (this will 
        # force VGA)
        #hdmi_group=1
        #hdmi_mode=1
    
        # uncomment to force a HDMI mode rather than DVI. This can 
        # make audio work in DMT (computer monitor) modes
        #hdmi_drive=2
    
        # uncomment to increase signal to HDMI, if you have 
        # interference, blanking, or no display 
        #config_hdmi_boost=4
    

    ... may well have to do with the HDMI Video Sub-System Startup operations - not sure why this would be on a seperate partion, and not sure what the other files in this directory are, yet, but uncommenting the hdmi_safe line, the disable_overscan line, changing the framebuffer_width and framebuffer_height lines (uncomment and edit to have the values shown above) fixed the problem we were having of the Rapsberry Pi HDMI output locking itself to 1600x900 on acer 20" flat panel - the panel was intializing itself to 1280x960 - now it running with the X display nicely centered on the screen, but the panel's bezel-buttun MENU says that the display is set to 640x480.

    ... this after rebooting the Pi with settings as shown above; am guessing that the hdmi_safe=1 line may be responsible am checking the display dimensions again, commenting out the "safe" line again, and rebooting.

    So. After several hours messing about with these settings the best I can do right now is this:

        #hdmi_safe=1
        #disable_overscan=1
        overscan_left=-192
        overscan_right=96
        overscan_top=16
        overscan_bottom=0
        framebuffer_width=1280
        framebuffer_height=960
        #hdmi_force_hotplug=1
        #hdmi_group=1
        #hdmi_mode=1
        #hdmi_drive=2
        #config_hdmi_boost=4
    

    This gets the entire display on the screen (or at least so it appears thus far) but there is still a wide black border across the bottom of the screen - the overscan value can cause the console to write off the bottom edge of its display, but it does not reduce the size of that border area.

  4. The aspect ratio of the screen seems whack - 1280x960 - and there are obviously lines of pixels across hte bottom of the display that are not getting lit up - it looks like about 64 of them. This is as far as I'm prepared to go with this right now, since the immediate problem of the Pi drawing most of it's display off the right edge of the screen now seems to be solved.

2014-07-09

Compiz Fusion Tray Icon (...or: Getting Rid of MATE)

Compiz Fusion Tray Icon

or: "Getting Rid of MATE"

I have been running the MATE desktop which seems to be instlaled by default with Linux Mint.

I am finding that this Gnome2-derived MATE is bulky and slow, providing little in the way of advantages for the user, and much in the way of waiting and annoyance.

So, on impulse, and while installing FVWM and Xfwm4, I installed the "Compiz Fusion Tray Icon" package which was offered in the Aptitude listings.

  1. Install Compiz Fusion Tray Icon

I was doing this while running in "recovery mode", so the next thing after completing the installations and exting Aptitude, was to continue the boot-up.

On boot, the MATE desktop came up. This was unexpected. Am not sure what happened to the login screens and the option to choose a desktop environment...

Within the MATE desktop, the newly installed Compiz package is in the menu, but is not running -- again this is somewhat unexpected.

  1. From the Mint/MATE/Gnome2 panel ("Start") menu, under Adminitration, select the Compiz Fusion Icon menu item. This will start Compiz Fusion Tray Icon in the Notification area of the panel.

  2. Right-click the fusion icon in the tool bar and choose Select Window Manager from the context menu.

  3. The Select Window Manager menu option displays a sub-menu showing a list window managers (e.g. Compiz || Marco || FVWM || Metacity || Xfwm4 ). This is the list of installed window managers which are available for use, here.


  • using the markdown everywhere Chrome app under Linux
  • Desktop is composited Xfwm4 using Compiz
  • Chrome apps install to panel menu under Other

2014-07-08

How to Build Raspbian Source Packages


— How to Build Raspbian Source Packages

:Document created 2014-07-07 05:44:51 by pdwilso@gmail.com


How to Build Raspbian Source Packages

Overview

Using the instructions found in HowTo Build a Package from Source the Smart Way ./Build-Pkg-Smart-Way.pdf.tar.gz as a guide, we have performed the following steps:

Setup

1. Freshly installed Raspbian image on SD card
 
2. Edit /etc/apt/sources.list
sudo vi /etc/apt/sources.list
... to add the line ...
deb-src http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi

... then save the file.

The resulting sources.list file on the Pi looked like this:
deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
3. Run sudo apt-get update
 
4. Run sudo apt-get build-deps <packagename>
 
Note that these steps outlined above are mostly analogous to the steps outlined in the PDF file, except that we are concerning ourselves exclusively with what we can get from the raspbian repository. This is what we want — I.E. we do NOT want to have to seek upstream from Raspibian into the Debian package repositories - the only ones were interested in are those that have already been built for our platform/distro, and those that will be built for our platform / distro.
 
This approach presumes that all the Debian APT package manipulation and management commands will work using only Raspbian packages and repositories.
I am not going to detail the original steps given in the PDF here in the interest of readability of this document, however, at this point in the guide document, the author states clearly:
 
"Those are the last commands you should run as root before installing the DEB. All of the build commands should be run as normal user."
 
When we say "at this point in the procedure" we mean:
  • Have added a source package repository to sources.list
  • Have run 'sudo apt-get update' against the new repositories.
  • Have installed build dependencies for package(s) to be built.
Also note that everything up to this point has been package-agnostic — that is,
  • these steps need to be performed for all source package builds.
  • The edit of the sources.list only needs to be done when a new source package repository is added.
  • The apt-get build-deps operation should be performed each time a new source package is to be used — remember packages can be updated, and there are perhaps other configuration changes which could cause the package build dependencies to change.
Once the build dependencies are installed by root, the action shifts to the user account.

{* In this case, we're on a Vanilla Raspbian Raspberry Pi, so the user is 'pi' *}

Get the Source Code Package

As ordinary user we do the following
apt-get source <packagename>
Issue this command while the Current Working Directory (CWD) is set to the parent directory of the source tree that will be installed for the package we're going to build.
 
Note that <packagename> is the Debian APT package name of the package you want to build. I.E. NOT the file name. In this case, we're using package name 'xscreensaver' to install the screen hack sources. The version number of the package is appended to the package name when the package is retrieved from the repository.

Dependency on devscripts Pacakge

The next operation listed in the guide document did not work on the first try, and investigation of that problem uncovered a dependency that was not listed — the devscripts package, which contains the deb utilities, including debchange, the one suggested by the guide as a way to change the version number of the source package. If one wants to do this — and the rationale behind is not yet entirely clear to me, I admit — then you will need to have the devscripts package installed.
sudo apt-get install devscripts

Using debchange

Going to cover some specifics of using the debchange utility (from the devscripts package mentioned above) to change the Version of the installed source package; doing this here because it was not covered in the document we're using as a guide, and it's obscure enough information that it should probably be covered in a how-to of this nature...
 
The use of the command given in the Debian PDF document is
debchange -b -v N.N.Nc-N~bpoNN+N
... where the string N.N.Nc-N~bpoNN+N is the version to assign to the package going forward. Furthermore, the version string assigned by the example includes the version of the source package installed (N.N.Nc-N) conjoined to 'bpo' — which is a TLA for 'BackPOrt' — followed by what one might presume is a backport version number conformant to some backport numbering scheme ... by a '~' character.
 
Note that in the above paragraph, 'N' indicates one or more digits, a '.' indicates a literal period ('.'), and 'c' indicates an alpha-numeric character. These together make up the version string or version number string.
 
So. Reading the manual page for debchange (installed with devscripts package, above) we find that indeed this utility is — or can be — used to adjust the version numbering of source packages...
 
The manual page also shows the reason the name of the package is not mentioned in the command line to change the version number (something I'd been wondering about since I first read the how-to begin with). The reason is simple, and given in the second sentence of the first paragraph of the manual page:
 
debchange or its alias dch will add a new comment line to the Debian changelog in the current source tree. This command must be run from within that tree.
 
So - the only other argument given on the debchange command line is -b for which the manual page tells us:
 
--force-bad-version, -b
   Force a version number to be less than the current one
   (e.g., when backporting).

Choosing a New Version String

So it's the "backporting" process I don't understand, it seems. or the versioning of it. Backporting as a topic is beyond the scope of this document and I'm not going to try to cover it here. Or even use the word.
 
For instance, I can see how the author of the Debian How-To set the version number to an older, "bad" or 'backported' version, I'm just not clear on why the version was handled in this way....? I think what I may be looking for is a way to make my own, local branch of the code. That would give me a local package to maintain, and a way to maintain and document changes, additions, and deletions to and from the code.
 
Based on remarks made in the serverfault.com thread How should I create a local fork of a Debian Package?, we will proceed with the idea that using debchange to induce a new version number of <existingverstr>+0x0000.00.00 or some such will be sufficient to protect the system package system as well as provide some revision control for changes to the source package(s).

Look into using Git to manage Source Package sources?

Answers in this thread <http://serverfault.com/questions/65858/how-should-i-create-a-local-fork-of-a-debian-package> suggest using git to fork a local branch from a public repository.

2014-07-07 04:20:55
pdwilso@gmail.com

    There is more to this - we haven't run the Debian Package Build Tools yet.**

Building the Source Package

The next step is (still as ordinary user, and within the Source Package directory):
dpkg-buildpackage -rfakeroot -us -uc

This command did not work, returning a failed dependency 'unable to build config.status' or something like that.

Continuing build process using make.

Building using Make

A number of warning regarding set but unused variables.

Also got:

/usr/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]

{* 2014-07-07 19:38:03 — material moved here from :Calendar:2014:07:07 *}

Ultimate Failure of Guiding Document

2014-07-07 18:59:07 — Directly quoting The Guiding Document below; this is the point at which the process ceased to work on the Raspberry Pi — the command shown below failed with minimal error reporting, and no real clue about how to proceed.

From The Guiding Document:

"Next, build the DEB:
dpkg-buildpackage -rfakeroot -us -uc
That last command may take a minute or an hour or three hours. It all depends on the size of the package and your own hardware."
 
That just didn't work. The dpkg-buildpackage operation ran for quite a long time, then failed without waring, complaining about some config.status file which apparently may or may not have existed in some file system at some time etc.
 
I believe the goal of this command is to build a the package binaries from the source code, then build a deb package from the binaries, which can be installed later. {*  2014-07-07 19:26:25  * NOTE: we have already successfully built the package using ./configure ; make from the command line. *}
 
The Guiding Document goes on to assume that there were no problems at all with their arcane command:
"Once the dpkg-buildpackage command finishes, you'll find the DEB(s) in your /home/XXXX/my_build/ directory and you can install them (as root) with:

cd /home/XXXX/my_build/

dpkg -i <packagename>_<version>_<architecture>.deb

It doesn't get much simpler than that."

.... well, it may not get much simpler than that, but it doesn't get much more dysfunctional than that, either, and we should all at this point know better than to sacrifice functionality to simplicity. That is, it may be dead simple, but that's not an advantage if it doesn't do anything — or worse, if it fails without explanation, as this did.

If one continues reading in The Guiding Document (which we almost didn't — should fix some stuff, there, you Debian Forum authors, you) we find that there is — directly subsequent to the above non-sequitur in The Guiding Document — a detailed and pointed discussion of a tool called "dh-make" which may run some other utility or script which may set some variable or perhaps create or alter some files which may or may not affect the build — it appears they are — tacitly — pointing the way to a solution to the unacknowledged problem which many users had to have experienced trying to follow The Guiding Document's earlier, flawed instructions.

We shall see.


2014-07-07 19:23:31


  • dpkg-buildpkg docs
  • dh_make docs

Guiding Document Fail

Okay, this is where the guiding document completely fails to address the situation — there is no 'dh_make' command on the Rapsberry Pi vanilla Raspbian Latest — not even with devscripts already installed. We will do a system update for awhile, and come back to this later.

The most recent best clue is the manual page of something called "debhelper(1)" — apparently dh indicates 'debhelper' — and we can see that the debhelper command has command line options to build packages. More later.

dpkg-buildpackage.1.txt

According to the dpkg-buildpackage manual page, the parameters given for the failing dpkg-packagebuild command ( -rfakeroot -us -uc) have the following meanings:

-rfakeroot
-us
UnSigned; Do not gpg-sign the package build
-uc
Do not gpg-sign the .changes file
 
None of this really explains why the dpkg-buildpackage operation failed, and since the sources are already configured and building correctly using make we will leave the debugging of the the debian howto until later...
 
 

2014-07-06

Raspberry Metalflake

 rpiplayground: Hacking the GPU for Fun and Profit (Part 1 of 4)
Fun for those rainy days... Says the author: 
"This series of posts will walk through the GPU architecture by designing and optimizing a non-trivial algorithm (parallel SHA-256) to run on the GPU.  Because this is a relatively advanced topic, some background knowledge must be assumed. [ … ] You should have some understanding of GPGPU concepts (Google can help) and you should read the Broadcom BCM2835 GPU Documentation. I’ll describe most Raspberry Pi GPU specific concepts but in case I miss some, the documentation is your friend."
[ed note: we will try to cover some of those assumed bits of background knowledge here as we find out what they are. kthx]
SHA-256 implementation on QPUs
Raspberry Pi Forum thread where the rpiplayground (see link above) blog showed up.
OpenVG™ – The Standard for Vector Graphics Acceleration
From the page:
"… royalty-free, cross-platform API that provides a low-level hardware acceleration interface for vector graphics libraries such as Flash and SVG. OpenVG is targeted primarily at handheld devices that require portable acceleration of high-quality vector graphics for compelling user interfaces and text on small screen devices - while enabling hardware acceleration to provide fluidly interactive performance at very low power levels."
hermanhermitage/videocoreiv
Tools and information for the Broadcom VideoCore IV (RaspberryPi)

Simon's accelerated X development thread
This thread at the Raspberry Pi Forum leads to quite a few interesting links – starting with the low level virtual machine code repository:  simonjhall/llvm_qpu – Low Level Virtual Machine
GitHub repository for the LLVM sources – this is a frequently updated mirror of the official site … note that this is not anything to do with the java virtual machines –
"This directory and its subdirectories contain source code for the Low Level Virtual Machine, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments."
other simonjhall repositories on github: 
My Robot Blog:  GPU Accelerated Camera Processing On The Raspberry Pi
am very actively trying to follow this work currently

2014-07-01

freecode.com goes static

freecode.com is moving to a static site due to lack of use. Following are some links to content from the site which may be of interest or use: 
dumpmpeg project
— "a simple program that allows you to dump frames from mpeg movies. Future features may include dumping of the audio as well. dumpmpeg uses Loki's SMPEG library for decoding."
PHP OAuth API
"PHP OAuth API authorizes user access using the OAuth protocol. It abstracts OAuth 1.0, 1.0a, and 2.0 in the same class. It provides built-in support for popular OAuth servers: 37Signals, Amazon, Buffer, Bitbucket, Box.net, Dailymotion, Discogs, Disqus, Dropbox with OAuth 1.0 and 2.0, Etsy, Eventful, Facebook, Fitbit, Flickr, Foursquare, github, Google with OAuth 1.0a and OAuth 2.0, Instagram, LinkedIn, Microsoft, Rdio, Reddit, RightSignature, Salesforce, Scoop.it, StockTwits, SurveyMonkey, Tumblr, Twitter, VK, Withings, Xero, XING, and Yahoo!. Every other OAuth server is supported by setting an endpoint URLs and other parameters using specific class variables or an external JSON configuration file. The class can also send requests to an API using the previously-obtained OAuth access token. For servers which support offline access, the class can renew expired tokens automatically using refresh tokens."
Possum
"Possum is a point of sales (POS) system for restaurants, bars, and brasseries. It is intended for use with a ticket printer and a touch screen. It can be used to provide billing and presents different statistics such as sales, VAT amount, total payments by payment type, settings, average ticket per table, etc. These statistics are calculated per day and per month. It can also manage music playlists."
OpenSimulator
"OpenSimulator is a multi-platform, multi-user 3D distributed virtual environment platform. Out of the box, it can be used to simulate virtual environments similar to that of Second Life. These can be used as social virtual worlds or for specific applications such as education, training, and visualization. Access is via the regular Second Life open-source viewer or via third-party clients. There are a number of private and public deployments of OpenSimulator, including OSgrid, which has over 8000 regions hosted by independent individuals and organizations spread over the Internet."
Horde Application Framework
"The Horde Application Framework is a modular, general-purpose Web application framework. It provides an extensive array of classes that are targeted at the common problems and tasks involved in developing modern Web applications."
See also the profile for user chuck for more plugin-type, horde-friendly apps.

2014-06-30

Aircraft-grade Aluminum Case for Raspberry Pi

Aircraft-grade Aluminum Raspberry Pi Assembly Guide from the ModMyPi blog

WiFi for Raspberry Pi

How to install wifi on Raspberry Pi is a handy, simple description of bringing up WiFi on a Raspberry Pi.

Following this guide, everything worked on the first try.

Note that prior efforts to bring the WiFi interface up from the command line were unsuccessful; the iw, ip, iwconfig, and ifup commands did not bring the wlan0 interface up.

The connection to the Pi in this instance was an SSH connection; the Pi running headless with X11 forwarded across and SSH tunnel via VNC, so the eth0 connection was active until disabled from wicd after wlan0 was successfully provisioned.

Note that the WiFi configuration for the dongle – wlan0 – does not appear to have been saved on reboot; Pi still comes up with Ethernet eth0 active, and the wlan0 module loaded and showing in the iwconfig ougtput, but the interface is not up, does not have an IP address, and no routing nor gateway configured for it.

2014-06-29

Using FUSE to store RaspiVid video files remotely

 In working with the Raspberry Camera Module and the supplied RaspiCam utilities, it became desirable to store capture video data files somewhere besides the local filesystem of the Raspberry Pi devices.  The solution most immediately presenting itself was to utilize the sshfs utility to create a FUSE mount of a user-accessible directory on a centralized mass-storage server.

Prerequisites:
  1.  sshfs installed on Raspberry Pi
  2.  server is running ssh
  3.  pi has server account
  4.  pi has generated ssh ID
  5.  pi has ID loaded in active ssh-key-agent
  6. server pi acct has pi ID in authorized keys list
Server user account is:  pi
Server directory to mount:  /home/pi/Videos
Local directory to mount on:  ./Videos
Cmd: 
   sshfs pi@server.nym:/home/pi/Videos ./Videos

With the mount in place, we can ...
cd Videos
raspivid -o ./raspivideo.h264 -n -k
to store a segment of video to the remote server's file system.

Dual Boot an Asus Chromebook with ChromeOS and Linux

Upgradethe ASUS Chromebook article has a good bit of very useful information about messing with the internals of the chromebook.

Dropbox Source Code

How do I build the Dropbox installer for Linux from source? short and sweet - we should have this for the Raspberry Pi RSN - it may already be out here...

update:  This code did not build successfully on the Raspberry Pi, first try. The problem was during ./configurelibnautilus-extension-dev could not be satisfied because processing of the depends-on fails, reporting a missing newline on an apt config file for the ssh package - no idea WtF reegardz that ther, meh.

Installing a LAMP Server and Wordpress

The article How to Install Apache, MySQL, and PHP on ChrunchBox Linux has a nice description of how to install and configure the LAMP server componenets, including a Wordpress blog install.

2014-06-25

Emacs Backspace Key-mapping

Same old problem running Emacs inside a screen session...



EmacsWiki: Backspace Key:
"
(global-set-key (kbd "C-?") 'help-command)
(global-set-key (kbd "M-?") 'mark-paragraph)
(global-set-key (kbd "C-h") 'delete-backward-char)
(global-set-key (kbd "M-h") 'backward-kill-word)
"



'via Blog this'

stuffz

2014-06-24

graphviz-dot-mode.el #emacs #link

"graphviz-dot-mode.el --- Mode for the dot-language used by graphviz (att)."



'via Blog this'

2014-06-23

Network Interface Bonding

Linux.com :: What can you do with a second Ethernet port?: "To bond two Ethernet interfaces, you must have the bonding module compiled for your kernel (which on a modern distro is almost a certainty), and the ifenslave package (which is a standard utility, although you might need to install it from from your distro's RPM or APT repository)."
'via Blog this'
On a typical two-port motherboard, the Ethernet adapters are named eth0 and eth1, so we will use that for our example commands.
With ifenslave installed, take both Ethernet adapters offline by running
sudo ifdown eth0
sudo ifdown eth1.
Load the bonding module into the Linux kernel with modprobe. There are two important options to pass to the module: mode and miimon.  Mode establishes the type of bond (round-robin, failover, and so on), and miimon establishes how often (in milliseconds) the links will be checked for failure.
sudo modprobe bonding mode=0 miimon=100
will set up a round-robin configuration in which network packets alternate between the Ethernet adapters as they are sent out.
The miimon value of 100 is a standard place to begin; you can adjust if it you really want to tweak your network.
To create an actual bond (which for convenience we'll call bond0), run
sudo ifconfig bond0 192.168.1.100 up
to assign an IP address to the bond, then run
ifenslave bond0 eth0
followed by
ifenslave bond0 eth1
to tie the physical Ethernet interfaces into it.
Round-robin mode is good for general purpose load balancing between the adapters, and if one of them fails, the link will stay active via the other.
The other six mode options provide features for different setups.
  • Mode 1::  active backup, uses just one adapter until it fails, then switches to the other.
  • Mode 2::  balance XOR, tries to balance traffic by splitting up outgoing packets between the adapters, using the same one for each specific destination when possible.
  • Mode 3::  broadcast, sends out all traffic on every interface.
  • Mode 4::  dynamic link aggregation, uses a complex algorithm to aggregate adapters by speed and other settings.
  • Mode 5::  adaptive transmit load balancing, redistributes outgoing traffic on the fly based on current conditions.
  • Mode 6::  adaptive load balancing, does the same thing, but attempts to redistribute incoming traffic as well by sending out ARP updates.
The latter, complex modes are probably unnecessary for home use. If you have a lot of network traffic you are looking to manage, consult the bonding driver documentation. For most folks, bonding's fault tolerance and failover is a bigger gain than any increased link speed. For example, bonding two WAN links gives you load balancing and fault tolerance between them, but it does not double your upstream throughput, since each connection (such as a Web page HTTP request) has to take one or the other route.

Markdown Syntax.md at GitHub

Markdown documentation

2014-06-21

CSS Style Conventions from Ubuntu

The UbuntuOne site is shutting down.

Typography

Ubuntu font family

The Ubuntu font  has been carefully designed, hinted and kerned to provide the best experience and legibility on screen.
For more information about the Ubuntu font family, visit font.ubuntu.com.

Working with CMake

CMake Resources

resources offered at www.cmake.org are

2014-06-19

Blogger Template CSS Issue

Started by adding this to the custom CSS section of the blogger template...

<pre class="code">
background-color: rgb(234,240,240);
color: rgb(64,64,64);
padding: 8px;
padding-left: 32px;
margin-top: 0.75em;
margin-bottom: 0.75em;
border: 3px inset gray;
}
</pre>

This is what it's to, now (not including canned CSS from the templates):

body { 
 
}
body, .content-outer, .content-fauxcolumn-outer, .region-inner {
min-width: 70%
max-width: 90%;
width: 80%;
}
#layout .content-outer {
min-width: 0;
width: 85%;
}
pre, pre.code {
background-color: rgb(234,240,240);
color: rgb(64,64,64);
padding: 8px;
padding-left: 32px;
margin-top: 0.75em;
margin-bottom: 0.75em;
border: 3px inset gray;
width:90%;
overflow:auto; 
overflow:auto; 
}
p.description span {
displAY:block;
padding-left:2%;
padding-right:3.5%;
}
h1.title {
padding-left:0.6%;
}
dl.linklist { margin-left:4em; }
dl.linklist dt { border-top:1px gray solid; padding:6px; width:60%; }
dl.linklist dt, dl.linklist dt a { font-weight:bold; font-size:115%; }
dl.linklist dd {  margin-bottom:1.50em; }
span.A8.eja { color:lime; font-size:10pt; }

2014-06-18

OpenVG™: Open Vector Graphics Standard

OpenVG™ official site
...a royalty-free, cross-platform API that provides a low-level hardware acceleration interface for vector graphics libraries such as Flash and SVG.

Broadcom Listed as OpenVG COnformant

… from OpenVG Conformant Products listing at Kronos Group:

Broadcom Corporation 2011-04-03 OpenVG_1_1
CPU: VideoCore IV, OS:Threadx,
Pipeline: Broadcom VideoCore IV HW/OpenVG 1.1,
Display: 64x64 32bpp

dnsmasq

Note that the How-To from Xmodulo (again) fails to mention the "new" initialization "standard" for system initialization (obsoleting SysV Init, etc. There has to be a way to remove the new software (kickstart, quickstart??) and go back to using the SysV process. Whomever did this, imo, ignored one Cardinal Rule: If it ain't broke, don't fix it.

What part of SysV Init were these geniuses trying to fix? What improvements did they make? The only change I see is that I can no longer manipulate the init.d scripts that get run at startup...

2014-06-17

ES/GLES Framebuffer code sighting

On Stackoverflow.com

This link is to an Android programming forum, but contains the first framebuffer ES/GLES example code I have seen (to draw triangles on the screen...

The article contains the statement:

Everything is rendered on screen correctly, but the performance are ruined just when I draw the FBO texture. Thank you very much for your help. I worked very hard on this and didn't find a solution.

... so perhaps the code isn't perfect, but it's a place to start. This does confirm what I suspected about library being the home of the GPU e.g. triangle-drawing routines.

Here is what the code looks like – this is C:

// Create a framebuffer and renderbuffer
GLES20.glGenFramebuffers(1, fb, offset);
GLES20.glGenRenderbuffers(1, depthRb, offset);

// Create a texture to hold the frame buffer
GLES20.glGenTextures(1, renderTex, offset);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, renderTex[offset]);

GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA,
                    screenWidth, screenHeight, 0,
                    GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE,
                    null);


GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S,
                       GLES20.GL_CLAMP_TO_EDGE);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T,
                       GLES20.GL_CLAMP_TO_EDGE);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER,
                       GLES20.GL_LINEAR);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER,
                       GLES20.GL_LINEAR);

//bind renderbuffer
GLES20.glBindRenderbuffer(GLES20.GL_RENDERBUFFER, depthRb[offset]);

GLES20.glRenderbufferStorage(GLES20.GL_RENDERBUFFER, GLES20.GL_DEPTH_COMPONENT16,
                             screenWidth, screenHeight);

// bind the framebuffer
GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, fb[offset]);

// specify texture as color attachment
GLES20.glFramebufferTexture2D(GLES20.GL_FRAMEBUFFER, GLES20.GL_COLOR_ATTACHMENT0,
                              GLES20.GL_TEXTURE_2D, renderTex[offset], 0);

// specify depth_renderbufer as depth attachment
GLES20.glFramebufferRenderbuffer(GLES20.GL_FRAMEBUFFER, GLES20.GL_DEPTH_ATTACHMENT,
                                 GLES20.GL_RENDERBUFFER, depthRb[0]);

// Check FBO status.
int status = GLES20.glCheckFramebufferStatus(GLES20.GL_FRAMEBUFFER);

if ( status == GLES20.GL_FRAMEBUFFER_COMPLETE )
{
    Log.d("GLGame framebuffer creation", "Framebuffer complete");
}


// set default framebuffer
GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, 0); 

On ZipForums.com

Android OpenGL.ES Texture/Image Drawing has more examples of ES/GLES code for Android.

public void onDrawFrame(GL10 gl) {
    checkGLError(gl);
    if (mContextSupportsFrameBufferObject) {
        GL11ExtensionPack gl11ep = (GL11ExtensionPack) gl;
        if (DEBUG_RENDER_OFFSCREEN_ONSCREEN) {
            drawOffscreenImage(gl, mSurfaceWidth, mSurfaceHeight);
        } else {
            gl11ep.glBindFramebufferOES(GL11ExtensionPack.GL_FRAMEBUFFER_OES, mFramebuffer);
            drawOffscreenImage(gl, mFramebufferWidth, mFramebufferHeight);
            gl11ep.glBindFramebufferOES(GL11ExtensionPack.GL_FRAMEBUFFER_OES, 0);
            drawOnscreen(gl, mSurfaceWidth, mSurfaceHeight);
        }
    } else {
        // Current context doesn't support frame buffer objects.
        // Indicate this by drawing a red background.
        gl.glClearColor(1,0,0,0);
        gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
    }
}

From Google Code

This project is in Java: An OpenGL ES 2.0 example for Android

Build Tools for Raspbian Userland Build Tools

The Raspberry Pi GitHub Repository

The tools needed to build the code found in GitHubraspberrypi / userland are found at rasperrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian at master · raspberrypi/tools · GitHub

2014-06-16

Desert Domes - The 3v Dome Calculator

The 3v Dome Calculator is a geodesic dome calculator from DesertDomes.com. Calculation for a dome of diameter 7 is shown in the images below. Note that any units may be applied to the numbers shown, since all the calculations are ratios - the only requirement is that, when units are used, they must all be the same (e.g. feet, centimeters, yards, meters, etc). Do not mix units in the calculations.

2014-06-14

What are Wayland graphics? #link

Overview

Case Studies from Collabora does a good job of providing a highlevel technical description of the Wayland graphics engine relative to e.g. existing X11 graphics engines.

Resources

  • Wayland at FreeDesktop.org

    • Wayland is intended as a simpler replacement for X
    • Wayland is a protocol for a compositor to talk to its clients as well as a C library implementation of that protocol.
  • See the links for more...

userland github #link

https://github.com/raspberrypi/userland

"This repository contains the source code for the ARM side libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib and includes source for the ARM side code to interface to: EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG."
rPi Software Block Diagram
Image courtesy of The Raspberry Pi Foundation

Other Links

2014-06-13

VIM Plugins for Developers

  1. How to turn VIM into a Full-fledged IDE — another excellent article from xmodulo.com
  2. pathogen.vim at GitHub

Raspberry Pi Web Server Setup #link

[xmodulo.com] How to set up a lightweight web server on Raspberry Pi — found this link on another page that has the same content, plus some links to related material — [linux-arm.info] How to set up a lightweight web server on Raspberry Pi

Linux for ChromeBook #link

UPDATE: 03:04EDT : This site — http://chromeos-cr48.blogspot.mx/2012/12/so-you-want-chrubuntu-on-external-drive.html — has info about how to install a bootable Linux for the Chromebook to a USB stick.

UPDATE: 02:30 EDT : This site has the same info as the OP, but is more readable: http://www.makeuseof.com/tag/install-linux-chromebook/

OP: How to Install Linux on a Chromebook

vncconfig for Xvnc4

Starting with the current Xvnc4, there is a helper app available:  vncconfig

pdw@zipper:~$ man -P cat vncconfig 
vncconfig(1)               Virtual Network Computing              vncconfig(1)



NAME
       vncconfig - configure and control a VNC server

SYNOPSIS
       vncconfig [parameters]
       vncconfig [parameters] -connect host[:port]
       vncconfig [parameters] -disconnect
       vncconfig [parameters] [-set] Xvnc-param=value ...
       vncconfig [parameters] -list
       vncconfig [parameters] -get Xvnc-param
       vncconfig [parameters] -desc Xvnc-param

DESCRIPTION
       vncconfig  is used to configure and control a running instance of Xvnc,
       or any other X server with the VNC extension.  Note that it  cannot  be
       used to control VNC servers prior to version 4.

       When run with no options, it runs as a kind of "helper" application for
       Xvnc.  Its main purpose when run in this mode is to  support  clipboard
       transfer  to  and  from the VNC viewer(s).  Note that without a running
       instance of vncconfig there will be no clipboard support.  It puts up a
       window  with  some  checkboxes  which  can be used to disable clipboard
       transfers if required (in the future there may be more functions avail‐
       able from this window).  The -nowin flag can be used if you always want
       clipboard support but don't wish to clutter the desktop with this  win‐
       dow - alternatively the -iconic option can be used to make it iconified
       by default.

       When run in any other mode, vncconfig is a  one-shot  program  used  to
       configure  or control Xvnc as appropriate.  It can be used to tell Xvnc
       to connect or  disconnect  from  listening  viewers,  and  to  set  and
       retrieve Xvnc's parameters.

       Note  that the DISPLAY environment variable or the -display option must
       be set as appropriate to control Xvnc.  If you run it on an ordinary  X
       server  (or  on  a version 3 Xvnc) you will get an error message saying
       that there is no VNC extension.


OPTIONS
       -connect host[:port]
              Tells an Xvnc server to make a "reverse" connection to a listen‐
              ing  VNC  viewer  (normally  connections  are made the other way
              round - the viewer connects to the server).  host  is  the  host
              where  the listening viewer is running. If it's not listening on
              the default port of 5500, you can specify host:port instead.


       -disconnect
              This causes Xvnc to disconnect from all viewers so that the  VNC
              desktop is not displayed anywhere.


       [-set] Xvnc-param=value
              Sets  an  Xvnc  parameter to the given value.  Note that some of
              Xvnc's parameters are read only once at startup so that changing
              them in this way may not have any effect.


       -list  Lists all the parameters supported by Xvnc.


       -get Xvnc-param
              Prints the current value of the given Xvnc parameter.


       -desc Xvnc-param
              Prints a short description of the given Xvnc parameter.


PARAMETERS
       vncconfig  also  has parameters of its own which can be set on the com‐
       mand line.  These should not be confused with Xvnc's  parameters  which
       are manipulated with the -set, -get, -list and -desc options.

       Parameters  can be turned on with -param or off with -param=0.  Parame‐
       ters which take a value can be specified as -param value.  Other  valid
       forms  are param=value -param=value --param=value.  Parameter names are
       case-insensitive.


       -display Xdisplay
              Specifies the Xvnc server to control.


       -nowin When run as a "helper" app, don't put up a window.


       -iconic
              When run as  a  "helper"  app,  make  the  window  iconified  at
              startup.


SEE ALSO
       vncpasswd(1), vncviewer(1), vncserver(1), Xvnc(1)
       http://www.realvnc.com


AUTHOR
       Tristan Richardson, RealVNC Ltd.

       VNC  was  originally  developed  by  the RealVNC team while at Olivetti
       Research Ltd / AT&T Laboratories Cambridge.  It is now being maintained
       by RealVNC Ltd.  See http://www.realvnc.com for details.



RealVNC Ltd                       03 Mar 2005                     vncconfig(1)
pdw@zipper:~$ date -u
Fri Jun 13 03:50:16 UTC 2014

2014-06-12

VNC for ChromeOS

https://bitbucket.org/saljam/vnc &nash; Overview
This is a VNC viewer Chrome app. It uses Chrome's sockets API to talk to the VNC server directly.
The RFB rendering is based on NoVNC[0]. The icon is based on "Computer" from the Noun Project[1].
[0] http://kanaka.github.com/noVNC/
[1] http://thenounproject.com/noun/computer/#icon-No115
Note the use of markdown style links in the page content shown above.
HACK.md



Make sure:
  1. vncserver is installed on the Debian machine
  2. user account on the remote host is configured to allow ssh public key login
  3. vnc client app is installed on local host
  4. ssh private key (key pair) is installed on local host
  • Using VNC Viewer for Chrome OS to connect to a Debian server running Xvnc4 server.


Xvnc4server Startup Error: hidden lock files in /tmp

Xvnc4server creates two (2) lock-files in the /tmp directory when it starts up.

If the VNC server shuts down normally (e.g. with vncserver -kill :$NN (where $NN is the VNC display port number), these files are removed.

Xvnc4servev checks for the existence of these files on start-up, and exits with an error message if either exists.

Debian Linux Xvnc4server creates lockfiles in /tmp/. The lock-files are:

  • /tmp/X{nn}-lock
  • /tmp/.X11-unix/X{nn}

where {nn} is the port number of the display. Note that these files are hidden, and that the naming can be confusing if the VNC server in question was started on display port :11 (since 11 is also the version part of X11, and the : is dropped from the display spec when the file name is constructed by xvncserver at startup.

Also: while VNC is running there may be other user-owned lock-files in /tmp that appear during VNC server operation. The ones listed here are the ones controlled by the VNC server itself.

If Xvnc4server has died and left these lock-files in place, VNC connection attempts (via SSH tunnel) will report network connection failed errors on the client-side, and open failed: connect failed: Connection refused channel errors on server-side console during connection attempts.

This condition can be confirmed using the following command from the shell prompt on the server:

    ps ax | grep `cat /tmp/.X$NN-lock`

Where $NN is the number of the display you're looking for.

If the command returns a process table entry for a running VNC server at with the PID stored in the lockfile, then there is some other problem - if the command returns nothing, or only the proc table entry for e.g. the grep process itself, then the lockfiles may be safely removed, and the VNC server for the port restarted.

2014-06-11

#blogref: Jay’s Technical Talk on #pan #dun #samsung #android #linux

Jay’s Technical Talk — Using Bluetooth™ PAN / DUN on Samsung Blackjack with Linux:

'via Blog this'

*Working with Samsung Galaxy & Linux Mint*

Command hcitool & friends — _see also_: apropos hci

mint@t42 ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:11:25:45:cd:7c  
          inet addr:192.168.4.42  Bcast:192.168.4.255  Mask:255.255.255.0
          inet6 addr: fe80::211:25ff:fe45:cd7c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17527 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18172 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2179601 (2.1 MB)  TX bytes:8487958 (8.4 MB)

eth1      Link encap:Ethernet  HWaddr 00:0e:35:f1:28:94  
          inet addr:192.168.15.103  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::20e:35ff:fef1:2894/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:109895 errors:52 dropped:3075 overruns:0 frame:0
          TX packets:86753 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:114067221 (114.0 MB)  TX bytes:11494701 (11.4 MB)
          Interrupt:11 Base address:0x8000 Memory:c0210000-c0210fff 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:13127 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13127 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1255696 (1.2 MB)  TX bytes:1255696 (1.2 MB)

pan1      Link encap:Ethernet  HWaddr 46:fd:d4:16:43:d5  
          inet addr:10.87.148.1  Bcast:10.87.148.255  Mask:255.255.255.0
          inet6 addr: fe80::44fd:d4ff:fe16:43d5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:87 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:13674 (13.6 KB)

mint@t42 ~ $ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.15.1    0.0.0.0         UG    100    0        0 eth1
10.87.148.0     *               255.255.255.0   U     0      0        0 pan1
link-local      *               255.255.0.0     U     1000   0        0 eth0
192.168.4.0     *               255.255.255.0   U     0      0        0 eth0
192.168.15.0    *               255.255.255.0   U     0      0        0 eth1
mint@t42 ~ $ hci
hciattach  hciconfig  hciemu     hcitool    hcitrace   
mint@t42 ~ $ hcitool 
hcitool - HCI Tool ver 4.98
Usage:
 hcitool [options]  [command parameters]
Options:
 --help Display help
 -i dev HCI device
Commands:
 dev  Display local devices
 inq  Inquire remote devices
 scan Scan for remote devices
 name Get name from remote device
 info Get information from remote device
 spinq Start periodic inquiry
 epinq Exit periodic inquiry
 cmd  Submit arbitrary HCI commands
 con  Display active connections
 cc   Create connection to remote device
 dc   Disconnect from remote device
 sr   Switch master/slave role
 cpt  Change connection packet type
 rssi Display connection RSSI
 lq   Display link quality
 tpl  Display transmit power level
 afh  Display AFH channel map
 lp   Set/display link policy settings
 lst  Set/display link supervision timeout
 auth Request authentication
 enc  Set connection encryption
 key  Change connection link key
 clkoff Read clock offset
 clock Read local or remote clock
 lescan Start LE scan
 lewladd Add device to LE White List
 lewlrm Remove device from LE White List
 lewlsz Read size of LE White List
 lewlclr Clear LE White list
 lecc Create a LE Connection
 ledc Disconnect a LE Connection
 lecup LE Connection Update

For more information on the usage of each command use:
 hcitool  --help
mint@t42 ~ $ 


#NOTE:  Issue 1416: Bluetooth DUN/PAN Tethering support

#12 pde...@gmail.com
According to this FAQ, it shouldn't be too hard to make it work :
http://sites.google.com/a/android.com/opensource/projects/bluetooth-faq

$ ls ~/workspace/mydroid/external/bluez/utils/dund/
Android.mk  dun.c  dund.1  dund.h  lib.h  main.c  Makefile.am  Makefile.in  msdun.c 
sdp.c

Aug 6, 2009 

#13 dola...@gmail.com
In the worst case, you can still install this :
https://code.google.com/p/android-wifi-tether/

wifi and bluetooth tethering. But I still think it would be great to be integrated in
the OS by default :)

Debia Etch Bluetooth PAND How-To

2014-06-10

RaspiCam Docs TBD

In the section describing the --exposure parameter to the raspicam programs (raspistill, raspivid, etc), the rPiCamDoc contains the following statement

Note that not all of these settings may be implemented,
depending on camera tuning.

TBD

How can it be determined which of the --exposure options are supported by a given camera?

Detail

--exposure, -ex     Set exposure mode
    Possible options are:
        off
        auto        Use automatic exposure mode
        night       Select setting for night shooting
        nightpreview
        backlight   Select setting for back lit subject
        spotlight
        sports      Select setting for sports (fast shutter etc)
        snow        Select setting optimised for snowy scenery
        beach       Select setting optimised for beach
        verylong    Select setting for long exposures
        fixedfps,   Constrain fps to a fixed value
        antishake   Antishake mode
        fireworks   Select settings

Note that it states else where in the document that the antishake mode is NOT currently implemented (as of 2014-06-10 || the date of publication of the document).

TBD

What are the "date of publication" and "last modified" dates for RaspiCamDocs.pdf?

2014-06-09

m3bb3 NSFW

Haz fownd thiz heer URL in my logfiles has been visiting my site, yew? lmao....

http://pitera-prostitutki.ru/

These are the top visitors to my blog, it sez. 3 page views each. lmao here's another

http://pitera-prostitutki.ru/

Ohai yew Russhunz yew!!

SSH-client for ChromeOS


Using Secure Shell version 0.8.27 app for ChromeOS.

The only text in the Secure Shell app that shows what it is, where it came from, or promises any information about how to use the app is printed in the Terminal window when the app is opened:

Welcome to Secure Shell version 0.8.27.
Answers to Frequently Asked Questions: http://goo.gl/TK7876

The goo.gl URL above expands to https://chromium.googlesource.com/apps/libapps/+/master/nassh/doc/faq.txt  which is a pointer into the Secure Shell app source code libraries at the Google Git repository:  
    https://chromium.googlesource.com/apps/libapps/+/master/

Cloud9

Install Cloud9 on local or remote computer, server, or raspberry pi --

2014-06-08

Internet Connection Sharing (ICS) using IPTABLES

Internet Connection Sharing - Simple iptables Example

#!/bin/sh 
# 
# internet connection sharing wlan0 is the gate way 
# eth0 is the lan port this might use a straight ethernet cable to a router wan port or a switch or a single PC
# 192.168.2.2 is the port that is being used by the lan for access I changed it to 192.168.2.254 and set fixed
# addresses for the wan and router
#
# change wlan0 to ppp0 and you can use this for mobile broadband connection sharing
#
ip link set dev eth0 up
ip addr add 192.168.2.1/24 dev eth0
sysctl net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o wlan0 -s 192.168.2.0/24 -j MASQUERADE
iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 3074 -j DNAT --to-destination 192.168.2.2
iptables -t nat -A PREROUTING -i wlan0 -p udp -m multiport --dports 88,3074 -j DNAT --to-destination 192.168.2.2
iptables -A FORWARD -i wlan0 -d 192.168.2.2 -p tcp --dport 3074 -j ACCEPT
iptables -A FORWARD -i wlan0 -d 192.168.2.2 -p udp -m multiport --dports 88,3074 -j ACCEPT

The article goes on to say...

If things go wrong, the following script should save you when things get badly messed up.

#!/bin/sh
# 
# rc.flush-iptables - Resets iptables to default values. 
# 
# Copyright (C) 2001 Oskar Andreasson 
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program or from the site that you downloaded it
# from; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#
# Configurations
#
IPTABLES="/usr/sbin/iptables"
#
# reset the default policies in the filter table.
#
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -P OUTPUT ACCEPT
#
# reset the default policies in the nat table.
#
$IPTABLES -t nat -P PREROUTING ACCEPT
$IPTABLES -t nat -P POSTROUTING ACCEPT
$IPTABLES -t nat -P OUTPUT ACCEPT
#
# reset the default policies in the mangle table.
#
$IPTABLES -t mangle -P PREROUTING ACCEPT
$IPTABLES -t mangle -P POSTROUTING ACCEPT
$IPTABLES -t mangle -P INPUT ACCEPT
$IPTABLES -t mangle -P OUTPUT ACCEPT
$IPTABLES -t mangle -P FORWARD ACCEPT
#
# flush all the rules in the filter and nat tables.
#
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
#
# erase all chains that's not default in filter and nat table.
#
$IPTABLES -X
$IPTABLES -t nat -X
$IPTABLES -t mangle -X

2014-06-07

How to use only one instance of ssh-agent per host, purr user.

This is a script to connect to a running ssh-agent from a user shell, add the user's default DSA identity
#!/bin/sh 
# The following command returns the PID of the currently 
#   running ssh-agent process; This value needs to get stored into
#   SSH_AGENT_PID
#
# ps -u $USER | grep ssh-agent | sed -e 's/^\s*//;' | cut -d' ' -f1
#
# The other value we want in order to be able to use an instance of 
# ssh-agent is the SSH_AUTH_SOCK value - this is a file system name 
# a socket maintained by the ssh-agent instance.  It will be in the
# ${TMP}/ directory space...
export SSH_AUTH_SOCK=`ls --color=none /tmp/ssh-*/agent.*`
export SSH_AGENT_PID=`ps -u $USER | grep ssh-agent | sed -e 's/^\s*//;' | cut -d' ' -f1`
echo SSH_AGENT_PID: $SSH_AGENT_PID
echo SSH_AUTH_SOCK: $SSH_AUTH_SOCK
echo "Adding default .ssh/id_dsa using ssh-add..."
ssh-add
echo kthxbai.