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.