Search Results: "cdm"

23 May 2021

Sandro Tosi: QNAP: control LCD panel and speaker

LCD PanelMost (if not all) QNAP models come with an LCD display, in my model i got a 2 lines by 16 characters each. The tool to control the panel is:
/sbin/lcd_tool
but sometimes it's a bit stubborn in executing the commands, so as mentioned here you may want to killall -9 lcdmond and then issue the command you want; this is the snippet i'm using:
# print a msg on the panel
killall -9 lcdmond
/sbin/lcd_tool -1 "$LINE1" -2 "$LINE2"
sleep 5
# turn off screen light
killall -9 lcdmond
/sbin/lcd_tool -f
it ain't pretty, but it gets the job done.

Speaker / BuzzerIf you look for how to make your system beep, you may find these commands:
/sbin/pic_raw 80    Beep short
/sbin/pic_raw 81 Beep long
but they no longer work. So keep looking, i stumbled upon this post, mentioning hal_app, and that indeed works, but with a different syntax than the one presented at that link.In order to use hal_app to make a beep sound, the syntax that worked for me is:
/sbin/hal_app --se_buzzer enc_id=0,mode=XXX
If you remove entirely mode=XXX, it produces a short beep, but here is the list of all the modes available and their results (found out via exhaustive search):

code output
0 short beep (0.5 secs)
1 long beep (1 sec)
2 3x short beeps (0.5 secs), long pause (1 sec)
3-7, 10,
15, 16, 17,
18, 19, 20
2x long beeps (1 sec), very long pause (2 secs)
8, 9 3x long beeps (1 sec), very long pauses (2 secs)
12, 13 long beep, 2x very short pause (0.25) very short beep (0.25)
14 3x very short beep (0.25) very short pause (0.25)
(you can prepend as many 0 to the mode strings as you wish, so 000 is equivalent to 0, 000018 is equivalent to 18, and so on).PS: this article is based on my system, TVS-473 running firmware 4.5.3.1652PPS: friendly reminder that this is how you edit the crontab on a QNAP machine.

31 March 2017

Dirk Eddelbuettel: #2: Even Easier Package Registration

Welcome to the second post in rambling random R recommendation series, or R4 for short. Two days ago I posted the initial (actual) post. It provided context for why we need package registration entries (tl;dr: because R CMD check now tests for it, and because it The Right Thing to do, see documentation in the posts). I also showed how generating such a file src/init.c was essentially free as all it took was single call to a new helper function added to R-devel by Brian Ripley and Kurt Hornik. Now, to actually use R-devel you obviously need to have it accessible. There are a myriad of ways to achieve that: just compile it locally as I have done for years, use a Docker image as I showed in the post -- or be creative with eg Travis or win-builder both of which give you access to R-devel if you're clever about it. But as no good deed goes unpunished, I was of course told off today for showing a Docker example as Docker was not "Easy". I think the formal answer to that is baloney. But we leave that aside, and promise to discuss setting up Docker at another time. R is after all ... just R. So below please find a script you can save as, say, ~/bin/pnrrs.r. And calling it---even with R-release---will generate the same code snippet as I showed via Docker. Call it a one-off backport of the new helper function -- with a half-life of a few weeks at best as we will have R 3.4.0 as default in just a few weeks. The script will then reduce to just the final line as the code will be present with R 3.4.0.
#!/usr/bin/r
library(tools)
.find_calls_in_package_code <- tools:::.find_calls_in_package_code
.read_description <- tools:::.read_description
## all what follows is from R-devel aka R 3.4.0 to be
package_ff_call_db <- function(dir)  
    ## A few packages such as CDM use base::.Call
    ff_call_names <- c(".C", ".Call", ".Fortran", ".External",
                       "base::.C", "base::.Call",
                       "base::.Fortran", "base::.External")
    predicate <- function(e)  
        (length(e) > 1L) &&
            !is.na(match(deparse(e[[1L]]), ff_call_names))
     
    calls <- .find_calls_in_package_code(dir,
                                         predicate = predicate,
                                         recursive = TRUE)
    calls <- unlist(Filter(length, calls))
    if(!length(calls)) return(NULL)
    attr(calls, "dir") <- dir
    calls
 
native_routine_registration_db_from_ff_call_db <- function(calls, dir = NULL, character_only = TRUE)  
    if(!length(calls)) return(NULL)
    ff_call_names <- c(".C", ".Call", ".Fortran", ".External")
    ff_call_args <- lapply(ff_call_names,
                           function(e) args(get(e, baseenv())))
    names(ff_call_args) <- ff_call_names
    ff_call_args_names <-
        lapply(lapply(ff_call_args,
                      function(e) names(formals(e))), setdiff,
               "...")
    if(is.null(dir))
        dir <- attr(calls, "dir")
    package <- # drop name
        as.vector(.read_description(file.path(dir, "DESCRIPTION"))["Package"])
    symbols <- character()
    nrdb <-
        lapply(calls,
               function(e)  
                   if (startsWith(deparse(e[[1L]]), "base::"))
                       e[[1L]] <- e[[1L]][3L]
                   ## First figure out whether ff calls had '...'.
                   pos <- which(unlist(Map(identical,
                                           lapply(e, as.character),
                                           "...")))
                   ## Then match the call with '...' dropped.
                   ## Note that only .NAME could be given by name or
                   ## positionally (the other ff interface named
                   ## arguments come after '...').
                   if(length(pos)) e <- e[-pos]
                   ## drop calls with only ...
                   if(length(e) < 2L) return(NULL)
                   cname <- as.character(e[[1L]])
                   ## The help says
                   ##
                   ## '.NAME' is always matched to the first argument
                   ## supplied (which should not be named).
                   ##
                   ## But some people do (Geneland ...).
                   nm <- names(e); nm[2L] <- ""; names(e) <- nm
                   e <- match.call(ff_call_args[[cname]], e)
                   ## Only keep ff calls where .NAME is character
                   ## or (optionally) a name.
                   s <- e[[".NAME"]]
                   if(is.name(s))  
                       s <- deparse(s)[1L]
                       if(character_only)  
                           symbols <<- c(symbols, s)
                           return(NULL)
                        
                     else if(is.character(s))  
                       s <- s[1L]
                     else   ## expressions
                       symbols <<- c(symbols, deparse(s))
                       return(NULL)
                    
                   ## Drop the ones where PACKAGE gives a different
                   ## package. Ignore those which are not char strings.
                   if(!is.null(p <- e[["PACKAGE"]]) &&
                      is.character(p) && !identical(p, package))
                       return(NULL)
                   n <- if(length(pos))  
                            ## Cannot determine the number of args: use
                            ## -1 which might be ok for .External().
                            -1L
                          else  
                            sum(is.na(match(names(e),
                                            ff_call_args_names[[cname]]))) - 1L
                         
                   ## Could perhaps also record whether 's' was a symbol
                   ## or a character string ...
                   cbind(cname, s, n)
                )
    nrdb <- do.call(rbind, nrdb)
    nrdb <- as.data.frame(unique(nrdb), stringsAsFactors = FALSE)
    if(NROW(nrdb) == 0L   length(nrdb) != 3L)
        stop("no native symbols were extracted")
    nrdb[, 3L] <- as.numeric(nrdb[, 3L])
    nrdb <- nrdb[order(nrdb[, 1L], nrdb[, 2L], nrdb[, 3L]), ]
    nms <- nrdb[, "s"]
    dups <- unique(nms[duplicated(nms)])
    ## Now get the namespace info for the package.
    info <- parseNamespaceFile(basename(dir), dirname(dir))
    ## Could have ff calls with symbols imported from other packages:
    ## try dropping these eventually.
    imports <- info$imports
    imports <- imports[lengths(imports) == 2L]
    imports <- unlist(lapply(imports,  [[ , 2L))
    info <- info$nativeRoutines[[package]]
    ## Adjust native routine names for explicit remapping or
    ## namespace .fixes.
    if(length(symnames <- info$symbolNames))  
        ind <- match(nrdb[, 2L], names(symnames), nomatch = 0L)
        nrdb[ind > 0L, 2L] <- symnames[ind]
      else if(!character_only &&
              any((fixes <- info$registrationFixes) != ""))  
        ## There are packages which have not used the fixes, e.g. utf8latex
        ## fixes[1L] is a prefix, fixes[2L] is an undocumented suffix
        nrdb[, 2L] <- sub(paste0("^", fixes[1L]), "", nrdb[, 2L])
        if(nzchar(fixes[2L]))
            nrdb[, 2L] <- sub(paste0(fixes[2L]), "$", "", nrdb[, 2L])
     
    ## See above.
    if(any(ind <- !is.na(match(nrdb[, 2L], imports))))
        nrdb <- nrdb[!ind, , drop = FALSE]
    ## Fortran entry points are mapped to l/case
    dotF <- nrdb$cname == ".Fortran"
    nrdb[dotF, "s"] <- tolower(nrdb[dotF, "s"])
    attr(nrdb, "package") <- package
    attr(nrdb, "duplicates") <- dups
    attr(nrdb, "symbols") <- unique(symbols)
    nrdb
 
format_native_routine_registration_db_for_skeleton <- function(nrdb, align = TRUE, include_declarations = FALSE)  
    if(!length(nrdb))
        return(character())
    fmt1 <- function(x, n)  
        c(if(align)  
              paste(format(sprintf("     \"%s\",", x[, 1L])),
                    format(sprintf(if(n == "Fortran")
                                       "(DL_FUNC) &F77_NAME(%s),"
                                   else
                                       "(DL_FUNC) &%s,",
                                   x[, 1L])),
                    format(sprintf("%d ,", x[, 2L]),
                           justify = "right"))
            else  
              sprintf(if(n == "Fortran")
                          "     \"%s\", (DL_FUNC) &F77_NAME(%s), %d ,"
                      else
                          "     \"%s\", (DL_FUNC) &%s, %d ,",
                      x[, 1L],
                      x[, 1L],
                      x[, 2L])
           ,
          "     NULL, NULL, 0 ")
     
    package <- attr(nrdb, "package")
    dups <- attr(nrdb, "duplicates")
    symbols <- attr(nrdb, "symbols")
    nrdb <- split(nrdb[, -1L, drop = FALSE],
                  factor(nrdb[, 1L],
                         levels =
                             c(".C", ".Call", ".Fortran", ".External")))
    has <- vapply(nrdb, NROW, 0L) > 0L
    nms <- names(nrdb)
    entries <- substring(nms, 2L)
    blocks <- Map(function(x, n)  
                      c(sprintf("static const R_%sMethodDef %sEntries[] =  ",
                                n, n),
                        fmt1(x, n),
                        " ;",
                        "")
                   ,
                  nrdb[has],
                  entries[has])
    decls <- c(
        "/* FIXME: ",
        "   Add declarations for the native routines registered below.",
        "*/")
    if(include_declarations)  
        decls <- c(
            "/* FIXME: ",
            "   Check these declarations against the C/Fortran source code.",
            "*/",
            if(NROW(y <- nrdb$.C))  
                 args <- sapply(y$n, function(n) if(n >= 0)
                                paste(rep("void *", n), collapse=", ")
                                else "/* FIXME */")
                c("", "/* .C calls */",
                  paste0("extern void ", y$s, "(", args, ");"))
            ,
            if(NROW(y <- nrdb$.Call))  
                args <- sapply(y$n, function(n) if(n >= 0)
                               paste(rep("SEXP", n), collapse=", ")
                               else "/* FIXME */")
               c("", "/* .Call calls */",
                  paste0("extern SEXP ", y$s, "(", args, ");"))
             ,
            if(NROW(y <- nrdb$.Fortran))  
                 args <- sapply(y$n, function(n) if(n >= 0)
                                paste(rep("void *", n), collapse=", ")
                                else "/* FIXME */")
                c("", "/* .Fortran calls */",
                  paste0("extern void F77_NAME(", y$s, ")(", args, ");"))
             ,
            if(NROW(y <- nrdb$.External))
                c("", "/* .External calls */",
                  paste0("extern SEXP ", y$s, "(SEXP);"))
            )
     
    headers <- if(NROW(nrdb$.Call)   NROW(nrdb$.External))
        c("#include <R.h>", "#include <Rinternals.h>")
    else if(NROW(nrdb$.Fortran)) "#include <R_ext/RS.h>"
    else character()
    c(headers,
      "#include <stdlib.h> // for NULL",
      "#include <R_ext/Rdynload.h>",
      "",
      if(length(symbols))  
          c("/*",
            "  The following symbols/expresssions for .NAME have been omitted",
            "", strwrap(symbols, indent = 4, exdent = 4), "",
            "  Most likely possible values need to be added below.",
            "*/", "")
       ,
      if(length(dups))  
          c("/*",
            "  The following name(s) appear with different usages",
            "  e.g., with different numbers of arguments:",
            "", strwrap(dups, indent = 4, exdent = 4), "",
            "  This needs to be resolved in the tables and any declarations.",
            "*/", "")
       ,
      decls,
      "",
      unlist(blocks, use.names = FALSE),
      ## We cannot use names with '.' in: WRE mentions replacing with "_"
      sprintf("void R_init_%s(DllInfo *dll)",
              gsub(".", "_", package, fixed = TRUE)),
      " ",
      sprintf("    R_registerRoutines(dll, %s);",
              paste0(ifelse(has,
                            paste0(entries, "Entries"),
                            "NULL"),
                     collapse = ", ")),
      "    R_useDynamicSymbols(dll, FALSE);",
      " ")
 
package_native_routine_registration_db <- function(dir, character_only = TRUE)  
    calls <- package_ff_call_db(dir)
    native_routine_registration_db_from_ff_call_db(calls, dir, character_only)
 
package_native_routine_registration_db <- function(dir, character_only = TRUE)  
    calls <- package_ff_call_db(dir)
    native_routine_registration_db_from_ff_call_db(calls, dir, character_only)
 
package_native_routine_registration_skeleton <- function(dir, con = stdout(), align = TRUE,
                                                         character_only = TRUE, include_declarations = TRUE)  
    nrdb <- package_native_routine_registration_db(dir, character_only)
    writeLines(format_native_routine_registration_db_for_skeleton(nrdb,
                align, include_declarations),
               con)
 
package_native_routine_registration_skeleton(".")  ## when R 3.4.0 is out you only need this line
Here I use /usr/bin/r as I happen to like littler a lot, but you can use Rscript the same way. Easy enough now?

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

16 December 2016

Dimitri John Ledkov: Swapfiles by default in Ubuntu

4MB RAM card
By default, in Ubuntu, we usually create a swap partition.

Back in the day of 4MB RAM cards this made total sense, as the ration of RAM to disk space, was still very low. Things have changed since. Server, desktop, embedded systems have migrated to newer generations of both RAM and persistent storage. On the high performance side of things we see machines with faster storage in the form of NVMe and SSD drives. Reserving space for swap on such storage, can be seen as expensive and wasteful. This is also true for recent enough laptops and desktops too. Mobile phones have substantial amounts of RAM these days, and at times, coupled with eMMC storage - it is flash storage of lower performance, which have limited number of write cycles, hence should not be overused for volatile swap data. And there are also unicorns in a form of high performance computing of high memory (shared memory) systems with little or no disk space.

Today, carving a partition and reserving twice the RAM size for swap makes little sense. For a common, general, machine most of the time this swap will not be used at all. Or if said swap space is in use but is of inappropriate size, changing it in-place in retrospect is painful.

Starting from 17.04 Zesty Zapus release, instead of creating swap partitions, swapfiles will be used by default for non-lvm based installations.

Secondly, the sizing of swapfiles is very different. It is no more than 5% of free disk space or 2GiB, whichever is lower.

For preseeding, there are two toggles that control this behavior:
  • d-i partman-swapfile/percentage string 5
  • d-i partman-swapfile/size string 2048
Setting either of those to zero, will result in system without any swap at all. And one can tweak relative integer percentage points and absolute limits in integer percentage points or MiB.

On LVM based installations, swap logical volumes are used, since unfortunately LVM snapshots do not exclude swapfile changes. However, I would like to move partman-auto to respect the above proposed 5%-or-2GB limits.

Ps. 4MB RAM card picture is by Bub's (Photo) [GFDL or CC-BY-SA-3.0], via Wikimedia Commons

16 August 2013

Daniel Leidert: N54L LCD-Mod with U204FR-A3 (LCDModkit) and lcdproc (II)

Here it goes. I was looking for an LCD display for my microservers 5,25'' bay and found this neat post. The manufacturer of the LCD display used there provides different displays for this purpose. I've decided for an U204FR-A2 in black with a red backlight. It left Hongkong around five days later and arrived here another 6 days later. All in all: I got it after 11 days. I unpacked the LCD device. It comes with an internal USB connector and is driven by an Hitachi HD44780 LCD controller. The connection wasn't a problem at all. I've already put a Silverstone SST-EC04-P PCIe card with two USB 3.0 external ports and an internal 19pin dual port connector into the systems PCIe 1x slot. Now to connect the LCD with this card I've bought an Inline 19pin USB 3.0 header to 8pin double USB 2.0 header adapter and connected the card with the LCD display. Easy, right?
To make the display "attached" to the case - it comes with two steel sheets and two screw holes each, that cannot be attached to anything in the microserver case - I've used a small workaround: double-faced adhesive tape and two halfs of a matchbox - one can also use small scantlings - and created a bonding between the steel sheets and the case.
That's it. I put the cover plate carefully back - the steels sheets of the LCD display and the LED of the server will bump to each other!
There are two programs to output information to the LCD display. These are lcdproc and lcd4linux. I started with the first one which only provides pre-defined screens. Seems with the latter one can create own screens. This is an option for the future. lcdproc consists of two programs. First there is a daemon called LCDd. It controls the driver, contrast etc.pp. The relevant parts of its configuration file /etc/LCDd.conf look like as shown below. Note that I did not change the default values for contrast or brightness.

[server]
Driver=hd44780
WaitTime=25

[hd44780]
ConnectionType=lcd2usb
Size=20x4
To print something to the screen one can use the lcdproc command, which is configured via /etc/lcdproc.conf. I've enabled the Iface, TimeDate, SMP-CPU, and MiniClock screens. The program is started during startup via cron. The file /etc/cron.d/lcdproc simply contains this:

@reboot root lcdproc
The following pictures show the resulting screens, which change every 25 seconds. That's it.

1 August 2013

Daniel Leidert: N54L LCD-Mod with U204FR-A3 (LCDModkit) and lcdproc *pic*

N54L LCD-Mod with U204FR-A3 (LCDModkit) and lcdproc CPU screen
The picture shows my HP N54L microserver with an LCD (item no. U204FR-A3 by LCDModkit). The display is controlled via LCDd and lcdproc using the hd44780 driver. It shows the so called CPU screen here. To be continued soon ... :)

25 January 2012

Jon Dowland: Music for Our Future

cover
In 2010, a collaboration between the SyFy channel, Create Digital Music, XLR8R and Pitchfork created "Music for our Future": a compilation album of free music inspired by the TV show "Caprica". XLR8R hosted it but their page for the release has subsequently disappeared. A few people here and there on the 'net have been asking for a copy, so here it is on archive.org: http://www.archive.org/details/MusicForOurFuture. Some background info, photos etc. via CDM.

17 September 2011

Andrew Pollock: [life/americania] Whirlwind visit to the Windy City

Our friend Susan was going to be in Chicago for a conference, and as we hadn't seen Chicago yet, and it was on the list of cities we wanted to visit, we made the semi-spur of the moment decision to have a three day weekend there last weekend. We got the Virgin America red-eye flight from SFO, which left on Friday at around 5pm, and got into Chicago at around 11:30pm, local time. Zoe didn't do as well as she has previously, and didn't sleep very well on the flight over, despite us getting lucky and scoring an empty seat between us on an otherwise fairly full flight. I think she's getting too big to comfortably sleep in the Ergo baby carrier (or isn't keen on sleeping vertically any more). We stayed at the Swissotel, because that was where Susan was staying (and was where her conference was) and nearby hotels seemed to be around the same price range. When we checked in, we let them talk us into an upgrade to a larger room, which had fantastic views of Lake Michigan and the Chicago River. Lake Michigan is just mind-bogglingly big. It's an inland sea. What can I say? I was totally in love with Chicago. The weather while we were there was unbelievable. Clear skies. High 20's (Celsius). It was more humid than the Bay Area, but less humid than Brisbane. The first thing we did on Saturday was go visit a friend of Sarah's who lived in Bryn Mawr. We took the "L" there. The elevated train was an interesting affair, and turned out to be less accessible than we'd been led to believe from some light research in advance. In fact, I found Chicago in general to be fairly wheelchair (and by extension, stroller) unfriendly. We had to lug Zoe's stroller up and down stairs quite a bit to get from the river level to where the hotel was. Zoe seemed to find it amusing, at least. Aside from that problem, the city seemed pretty flat. I'm really glad that we got out of the city and into Bryn Mawr, because it was really great to see that aspect of Chicago life as well. Lovely, quiet, tree-lined streets with wide sidewalks. Beautiful buildings. Sarah's friend was fostering 8 kittens, so Zoe got to have a play with all of them, which she thought was pretty cool. After we returned to the city, Sarah and I kicked back in Millennium Park while Zoe napped in the stroller. Saturday, being 9/10/11 in US date format, seemed to be particularly popular for weddings, and there were a lot of couples getting wedding photos taken in the park. That night, we tried to have some deep dish pizza at Uno, the home of deep dish pizza, but the line was ridiculous. We subsequently learned about Due, and went there the following night. The pizza was good, and I found the crust to be slightly different from what we'd get at Patxi's. We checked out the Navy Pier on both Sunday and Monday, taking Zoe to the Chicago Children's Museum both days (we got free entry thanks to our membership at the Children's Discovery Museum of San Jose). We had grand plans of checking out the Shedd Aquarium, but it turned out that Monday was a "free for all Illinois residents" day, and the line at 11am was ridiculous, so we gave it a miss and took at water taxi back to Navy Pier. It was Zoe's first boat ride, and she enjoyed it. I got some unbelievably good photos of the city skyline from the boat. Our flight out was at 7pm, so we took the train to Midway. I was very impressed that we could get all the way to the airport by train for the standard price. I love flat-rate fares. I really love a city with good mass public transit. The only thing that detracted from this in Chicago was the accessibility issues. We explicitly went to the Orange Line Clarke/Lake station to go to Midway because it was listed as being wheelchair accessible, and we had a stroller and a suitcase. We ended up going up to the wrong platform, and getting across to the other side was a bit of a mission. We'd entered the station from the street level, took the elevator up, and then realised we were on the wrong side. We had to go back down the elevator to the level below the street, cross the street from underneath it, and then go back up the elevator on the other side. Aside from these sorts of shenanigans, the whole elevated train thing was pretty cool (but I wouldn't have wanted to have an apartment with the train line right outside my window). If only the cars had glass roofs, the Loop would have been a lot more scenic. Overall, it'd be hard to say whether I liked Chicago or New York City better. I liked the clean, flat nature of Chicago, the architecture and the lower density of buildings, but I also really love New York just because it's New York, and has an awesome (probably equally stroller-unfriendly) subway system. Photos from the trip are here.

3 August 2011

Andrew Pollock: [life] Zoe at 15 months

Boy, the last three months have been very eventful, developmentally. First off, about 2 weeks after she turned 1, Zoe started walking in earnest. Within about 2 weeks of that there was no stopping her. It's funny to think she's only been walking for under 3 months and yet she's very stable on her feet. Secondly, she developed a mild egg allergy. Sarah was giving her some scrambled eggs (one egg's worth) for lunch one day, and she mixed in some cream cheese, and Zoe absolutely scoffed it all down, so she scrambled another egg and she scoffed that down too. She then broke out in some hives around her mouth and Sarah noticed that she was coughing a bit and a little wheezy when she put her down for her afternoon nap. Upon subsequent consultation with her paediatrician and a blood test, the allergy was confirmed and we now have to avoid eggs and Zoe was prescribed an Epi Pen Jr. We went and saw an allergist as a followup, and he did some skin tests that showed eggs were the only thing she's allergic to. He said her allergy was very mild in the grand scheme of things, and we're going to do another skin test when she's 2 to see if she's grown out of it. Eggs in baked goods are generally okay, as the offending protein is denatured at high temperatures. She's more allergic to the egg whites (1.56, which is in the "moderate" range) than the egg yolks (0.55, which is in the "low" range). Egg allergies are apparently something that one does eventually out grow, so that's a good thing. We'd also been keeping her off gluten and dairy because of a strong correlation between them and rather disgusting bowel motions. We've successfully reintroduced gluten with no adverse effects, and we've just started her back on cow's milk. We of course had our epic trip to the Grand Canyon, which Zoe handled absolutely marvelously. That was closely followed by a weekend down in LA, which was a bit more of a disaster as Sarah and I both came down with a 24 hour stomach bug that Zoe had had during the week. There's nothing quite like languishing in a non-childproofed hotel room, feeling like death, with a full of beans toddler busy running around jamming her fingers in drawers. Fortunately we were able to use a babysitter for a few hours respite, but it did rather completely mess up our plans for the weekend. Zoe did handle the drive to and from LA very well though. Zoe's been doing Saturday morning swim classes at the YMCA, which I've taken her to. I don't think she's enjoyed them as much as the indoor ones she did at the Sutton Swim School, where she went with Sarah previously, and I definitely don't feel like the classes are as structured. Unfortunately we just finished an 8 week session, and the next one filled up before we got a chance to book, so we're hoping to get back into something at the Sutton Swim School once an opening comes up. I might do something ad hoc with her on Saturdays at the Rinconada Pool in Palo Alto in the meantime. Zoe has also started going to regular daycare on Thursdays, so Sarah gets a day to focus on her University study. It's a home daycare that isn't too far away, and our friend's daughter goes there too, so there's someone she knows. The first few times Zoe got pretty upset when she was dropped off, but she barely makes a whimper now when Sarah drops her off. She's also usually down to one nap a day now. She has four teeth, top and bottom, with one molar definitely through and another three starting to make an appearance. I just bought an iBert safe-T-seat for my bike, because I've been itching to get out on the bike with Zoe on the weekends when I'm looking after her so Sarah can get some more study done. The weather is currently nice, and I've just learned about a bike trail that cuts across the bay in front of Moffett Field, so I'm keen to check that out. Apparently there's geese out there. I did my first decent ride with her last Sunday to the Mountain View Farmer's Markets and back. Zoe seemed to be okay with it. The helmet we got her drew a lot of comments from people at the markets. She's very much in the "point and grunt" stage at the moment. What's really cool is she'll nod or shake her head in response to yes/no questions. It's so cool when you can ask her a question and she solemnly nods her head in response. Often in the morning Sarah takes her to the park around the back of our home, and so now Zoe's gotten into that habit, so she'll scratch around at the front door and they head over there. The other day, Sarah opened the front door and she took off in the direction of the park, so Sarah just followed her to see where she went. Sure enough, she made her way over to the park. Tonight, Zoe fetched me my shoes and then dragged me over by the hand to the front door to demand that I take her out for a walk. She's also really getting into books now. She actively seeks out books, and has a bit of a flick through them, or brings one over and climbs into our laps, or backs up and sits in our laps if we're sitting on the floor, to have us read them to her. She's now strong enough to hold her bottle herself at bedtime, so I sit with her in my lap in the glider and read a story to her while she has her bedtime bottle. It's indescribably wonderful. She seems to understand quite a large array of words. We can go "Where's your <insert object here> and she'll look around the living room and generally find the item we're talking about. She also seems to understand questions about breakfast, lunch, going to the park, going to the bathroom, having a bath, etc as she seems to respond appropriately. In the speech department, I haven't really counted the words, but she's not saying a huge number of words. This morning, apparently she yelled "MAMA! MAMA! PARK!". "Park" being a new word for her. We bought an annual membership to the Children's Discovery Museum in San Jose, and we've probably taken her there half a dozen times or so since getting the membership. She particularly loves the water area. We finally got around to getting our back yard landscaped and made generally fit for a small child to run around in. Sarah's planted a butterfly garden in one corner, so hopefully once that's established we'll have some fun things for Zoe to watch from the window. I'm looking forward to planting some bulbs in the autumn. I expect the next 3 months will be more of the same. We've got some more overseas travel coming up, but a lot of relatives will be around, so hopefully we'll get a bit of downtime to ourselves. Zoe and I on my bike

29 June 2011

Dominique Dumont: New configuration editor for LCDPROC

Hello The last version (1.247, available in Debian unstable as libconfig-model-perl) of Config::Model provides a brand new model for /etc/LCDd.conf. With this model, you can edit or validate your lcdproc configuration. To edit this configuration the first time, you will have to run:
config-edit -application lcdproc -force
The -force option is required to load the file the first time. (because the default LCDd.conf file contains configuration options for all drivers, even though only one them if usefull). You will get this screen:
lcdproc configuration editor

config-edit on lcdproc configuration

In this screen, you can setup the driver for your adress with a right click on Driver parameter. Once youv e selected the driver and clicked on store , the driver will be listed in the left part of the window so you can tune the parameters of this specific driver:

editing imonclcd paramaters

In this screen, I ve turned the backlight off and added a small note to remember why. This small note will be writted in a comment in /etc/LCDd.conf. Once all required modifications are done, it s time to save the configuration file using the menu entry File -> save Now, let s see the resulting file (which is a bit long due to the amount of comments in the original LCDd.conf file):
## This file was written by Config::Model
## You may modify the content of this file. Configuration
## modifications will be preserved. Modifications in
## comments may be mangled.
# LCDd.conf -- configuration file for the LCDproc server daemon LCDd
#
# This file contains the configuration for the LCDd server.
#
# The format is ini-file-like. It is divided into sections that start at
# markers that look like [section]. Comments are all line-based comments,
# and are lines that start with '
#
# The server has a 'central' section named [server]. For the menu there is
# a section called [menu]. Further each driver has a section which
# defines how the driver acts.
#
# The drivers are activated by specifiying them in a driver= line in the
# server section, like:
#
#   Driver=curses
#
# This tells LCDd to use the curses driver.
# The first driver that is loaded and is capable of output defines the
# size of the display. The default driver to use is curses.
# If the driver is specified using the -d  command line option,
# the Driver= options in the config file are ignored.
#
# The drivers read their own options from the respective sections.
[server]
# Where can we find the driver modules ?
# IMPORTANT: Make sure to change this setting to reflect your
#            specific setup! Otherwise LCDd won't be able to find
#            the driver modules and will thus not be able to
#            function properly.
# NOTE: Always place a slash as last character !
DriverPath=/usr/lib/lcdproc/
# Tells the server to load the given drivers. Multiple lines can be given.
# The name of the driver is case sensitive and determines the section
# where to look for further configuration options of the specific driver
# as well as the name of the dynamic driver module to load at runtime.
# The latter one can be changed by giving af File= directive in the
# driver specific section.
#
# The following drivers are supported:
#   bayrad, CFontz, CFontz633, CFontzPacket, curses, CwLnx, ea65,
#   EyeboxOne, g15, glcdlib, glk, hd44780, icp_a106, imon, imonlcd,
#   IOWarrior, irman, joy, lb216, lcdm001, lcterm, lirc, lis, MD8800,
#   mdm166a, ms6931, mtc_s16209x, MtxOrb, mx5000, NoritakeVFD, picolcd,
#   pyramid, sed1330, sed1520, serialPOS, serialVFD, shuttleVFD, sli,
#   stv5730, svga, t6963, text, tyan, ula200, xosd
Driver=imonlcd
# Tells the driver to bind to the given interface
Bind=127.0.0.1
# Listen on this specified port; defaults to 13666.
Port=13666
ReportLevel=3
# Sets the reporting level; defaults to 2 (warnings and errors only).
# ReportLevel=3
# Should we report to syslog instead of stderr ? [default: no; legal: yes, no]
# ReportToSyslog=yes
# User to run as.  LCDd will drop its root priviledges, if any,
# and run as this user instead.
User=nobody
Foreground=no
Hello=    Hello
Hello=    LCDproc!
GoodBye=    GoodBye
GoodBye=    LCDproc!
# The server will stay in the foreground if set to true.
# Foreground=no
# Hello message: each entry represents a display line; default: builtin
# Hello="  Welcome to"
# Hello="   LCDproc!"
# GoodBye message: each entry represents a display line; default: builtin
# GoodBye="Thanks for using"
# GoodBye="   LCDproc!"
# Sets the default time in seconds to displays a screen.
WaitTime=5
# If yes, the the serverscreen will be rotated as a usual info screen. If no,
# it will be a background screen, only visible when no other screens are
# active. The special value 'blank' is similar to no, but only a blank screen
# is displayed. [default: on; legal: on, off, blank]
# ServerScreen=no
# Set master backlight setting. If set to 'open' a client may control the
# backlight for its own screens (only). [default: open; legal: off, open, on]
# Backlight=open
# Set master heartbeat setting. If set to 'open' a client may control the
# heartbeat for its own screens (only). [default: open; legal: off, open, on]
# Heartbeat=open
# set title scrolling speed [default: 10; legal: 0-10]
# TitleSpeed=10
# The "...Key=" lines define what the server does with keypresses that
# don't go to any client.
# These are the defaults:
ToggleRotateKey=Enter
PrevScreenKey=Left
NextScreenKey=Right
ScrollUpKey=Up
ScrollDownKey=Down
# ScrollUpKey=Up
# ScrollDownKey=Down
# If you have only 4 keys, you can choose to use this:
# ToggleRotateKey=Enter
# PrevScreenKey=Up
# NextScreenKey=Down
# If you have only 3 keys, you can choose to use this:
# ToggleRotateKey=Enter
# PrevScreenKey=Up
[menu]
# You can configure what keys the menu should use. Note that the MenuKey
# will be reserved exclusively, the others work in shared mode.
# The following works excellent with 4 keys or more.
MenuKey=Escape
EnterKey=Enter
UpKey=Up
DownKey=Down
LeftKey=Left
RightKey=Right
[imonlcd]
Protocol=0
OnExit=2
Device=/dev/lcd0
# My fishes dont like the glow
Backlight=off
DiscMode=0
You will notice a few things: If you need to update the file, you will have to run:
sudo config-edit -application lcdproc
The -force option is no longer needed. If you don t like to click, you can run:
config-edit -application lcdproc -ui none -save
For instance:
config-edit -application lcdproc -ui none -save 'server driver=imonlcd - imonlcd Device="/dev/lcd1" '
Further reading If you want to know more about lcdproc model, you can view: Under the hood I was too lazy to write myself the models of all drivers (about 3500 lines for them all). All models were generated from the LCDd.conf template file provided by lcdproc project. This blog explains how this was done. But the result is far from perfect. Event though LCDd.conf comments give a lot of semantic information, parameter types could be better adjusted and some of the examples provided in LCDd.conf confuse the model generator.
So the current comments are good, but not enough. In the future, we could decide on better structural conventions for the comments that would give users the information they need and give a model generator enough information to generate better models. This will hopefully be the topic of yet another blog All the best

7 December 2010

Matt Brown: Under the cover of the Kindle 3

For my birthday back in October, my wonderful wife gave me a Kindle 3 from Amazon. I d been considering other e-book readers for quite some time, but I had mostly ignored the Kindle due to the lack of EPUB support and a general dislike of Amazon s DRM enforcement. In the end, the superior hardware and ecosystem of the Kindle overpowered those concerns and overall I m very pleased with the purchase. The screen is amazing, literally just like reading off a piece of paper and the selection of books is OK. I ve been buying almost all my books from Amazon to date since it s so easy (the Whispernet is amazingly quick!) but it s not terribly difficult to get EPUBs from elsewhere onto the device after a quick run through Calibre to turn them into a MOBI file, so I keep telling myself I ve still got some flexibility. Almost as much fun as reading on the device has been learning about how it works. The Mobile Read forums have lots of step by step posts on how to do specific tasks like replacing the screensaver image, but they don t give much background detail on how the Kindle is actually operating which is what really interests me. Luckily among all the step by step posts I also found a usbnetwork package which also adds an SSH server to the Kindle, so after installing that and then SSHing in to my Kindle I ve been poking around. Under the cover the Kindle reveals a fairly standard Linux installation. While the hardware and IO devices are obviously unique, compared to something like an Android phone, the Kindle is refreshingly normal . Hardware Software The application/framework code is heavily obfuscated apparently using the Allatori Java Obfuscator. The jrename and jd-gui utilities have proven very handy in helping to untangle the puzzle, although they still only leave you with a pile of Java source code with mostly single letter alphabetic variable and class names! I ve been using IntelliJ s support for refactoring/renaming Java code to slowly work through it (thanks in large part to error/log messages and string constants found through the code which can t be obfuscated easily and help to explain what is going on), and I m slowly beginning to piece together how the book reading functionality works. I ll maybe write more on this in a future post. In one of my initial tweets about the Kindle I mentioned that it seemed to be regularly uploading syslog data to Amazon based on some sendlogs scripts I d noticed and a few syslog lines containing GPS co-ordinates that had been pasted on the Mobile Read forums. I can t find any trace of GPS co-ordinates in any syslog messages I ve seen on my device, but there is definitely information about the cell sites that my Kindle can see, the books that I m opening and where I m up to in them:

101206:235431 wand[2515]: I dtp:diag: t=4cfd77b7,MCC MNC=272 01,Channel=10762,Band=WCDMA I IMT 2000,Cell ID=1362209,LAC=3021,RAC=1
,Network Time=0000/00/00 00.00.00,Local Time Offset=Not provided,Selection Mode=Automatic,Test Mode=0,Bars=4,Roaming=1,RSSI=-88,Tx
Power=6,System Mode=WCDMA,Data Service Mode=HSDPA,Service Status=Service,Reg Status=Success,Call Status=Conversation,MM Attach St
ate=Attach accept,MM LU State=LU update,GMM Attach State=Attach accept,GMM State=Registered,GMM RAU State=Not available,PDP State=
Active,Network Mode=CS PS separate attach mode,PMM Mode=Connected,SIM Status=Valid; PIN okay; R3,MM Attach Error=No error,MM LU Er
ror=No error,GMM Attach Error=No error,GMM RAU Error=Not available,PDP Rej Reason=No error,Active/Monitored Sets=0;39;-11 1;180;-1
5,RSCP=-111,DRX=64,HSDPA Status=Active,HSDPA Indication=HSDPA HSUPA unsupp,Neighbor Cells=,Best 6 Cells=,Pathloss=,MFRM=,EGPRS Ind
ication=,HPLMN=,RPLMN=272;01 ,FPLMN=234;33 234;30 234;20 272;05 ,n=1:
101206:235758 cvm[3426]: I Reader:BOOK INFO:book asin=B003IWZZ3Y,file size=233168,file last mod date=2010-11-27 19.18.22 +0000,con
tent type=ebook,length=MobiPosition_ 465747,access=2010-12-06 09.44.32 +0000,last read position=MobiPosition_ 464387,isEncrypted=f
alse,isSample=false,isNew=false,isTTSMetdataPresent=false,isTTSMetadataAllowed=true,fileExtn=azw:
101206:233416 udhcpc[5639]: Offer from server xxx.xxx.2.254 received
101206:233416 udhcpc[5639]: Sending select for xxx.xxx.2.10...
Interestingly you can see from the last two lines, that Amazon has taken some care to preserve privacy by not including the full IP address given to the device by my local Wifi network, so in light of that I find it interesting that they decided not to obfuscate the Cell and Book IDs in those respective log messages too. Seems rather inconsistent. As to how and when these logs are sent to Amazon, the picture is a little bit murky. Every 15 minutes tinyrot runs out of cron and rotates /var/log/messages if it is greater than 256k in size. Rotated logs are stored into /var/local/log under filenames like messages_00000044_20101207000006.gz and alongside the log files are a set of state files named nexttosendfile, messages_oldest, messages_youngest. Something regularly sweeps through this directory to update the state and remove the old logs (after sending them up to Amazon I assume). I suspect that something is buried in the Java application code mentioned above. On the whole the Kindle is a fascinating piece of technology. It delivers a wonderful reading experience on top of a familiar Linux system and is going to provide me with many more hours of entertainment as I unpack all the tricks and techniques that have gone into this device. I would recommended it as a present for geeks everywhere.

11 November 2009

John Goerzen: In-Depth Review: Motorola Droid (with some iPhone comparisons)

The Motorola Droid A855 is the first Android 2.0 phone. I have been using one since Monday, having switched from a BlackBerry Pearl. I also wrote about Terah s iPod Touch recently, so I ll be making comparisons to it too. Here s my review. Hardware Physically, the device is very nice. It fits well in my hand. It comes in a fairly small box. It s surprisingly heavy for such a small device, but it isn t so heavy as to be a problem. It feels solid, sturdy, and durable throughout. Terah has the most recent iPod Touch 8GB, and compared to that, the Droid is thicker and heavier. The Droid s screen is awesome; a little longer but not as wide as the iPod Touch s. The iPod Touch screen seemed to offer less friction as I d slide my finger over it, which was nice but not a terribly big deal. I don t share some other people s annoyance with the keyboard. It is far better than the BlackBerry Pearl, or many other BlackBerries I ve seen. Along the bottom of the screen are some silkscreened buttons. My gripe with them is that they are easy to accidentally press. I ve done that more than once while using the phone in speakerphone mode, but you can lock the phone keyboard while you re on a call. I also don t share the complaint about battery life. It is excellent compared to the Pearl. Despite having a long-life battery, if I had it charged fully when leaving work at 5PM, by the next morning at 7AM it would often be completely discharged (though sometimes only half discharged). I believe that has to do with my home being in a poor reception area, and it spending a lot of energy looking for signals. In any case, the Droid has impressed me with its battery life and I have no complaints there. The screen, as I said, is brilliant and sharp. It is readable in various lighting conditions. By default, its brightness adjusts with the brightness of the ambient light. That s normally fine, but it can be annoying to stand in front of a light with the Droid in a shadow, watch its screen darken, and then shift a bit and it becomes bright again. There is a setting to disable automatic brightness. Button-wise, it has four physical buttons: the power/lock button at the top, volume up/down on the side, and a camera button on the side. The camera button only works when the phone isn t suspended (locked), and disappointingly can t be remapped to something actually useful. Just beneath the screen are four touch buttons: back, menu, home, and search. These are the ones I complained were easy to accidentally press. MicroSD and USB The Droid comes by default with a 16GB MicroSD card already installed. This is one huge advantage over the iPhone or iPod Touch: you can actually put things on the phone yourself, directly, without having to use iTunes and its limited features. I have, for instance, downloaded a PDF on the Droid and later copied it to my PC. I also copied a KeePassX encrypted password database from my Linux computer to the Android, for use with KeePassDroid. The iPhone/iPod Touch password programs don t support this kind of copying of files from your PC to the device, though one will let you put a database up on a webserver you control and download it from there. Plugging in a MicroUSB cable will start charging the Droid automatically. In order to make the SD card mountable, you must simply drag down the notification bar (which is how you get detail about what it s telling you normally) and touch the USB icon. When the SD is mounted on the computer, the Droid won t see it, of course. Touch the USB icon again to mount it on the Droid again, or just unplug USB. Wireless and Wifi The wifi support works like you might expect: pretty well. The cell phone reception works well, as does its Bluetooth support. It has an easily-activated airplane mode which disables all wireless features, which can then later be re-enabled. You can also individually disable wifi and Bluetooth. Oddly, you can t disable the cell phone network individually. The only way I could find to disable it is via Airplane Mode. User Interface The user interface, overall, is very slick and polished. However, I would have to say it is not as slick and polished as the iPhone/Touch interface. A few of the animated effects have a low framerate, which isn t really a big deal. More of a big deal is that settings and options can be scattered in many different locations, making them hard to track down at times. The device also offers fewer visual cues than the iPhone/Touch, though that is perhaps not significant. Like Apple s device, the Android 2.0 UI offers you three home panels, which you switch between by dragging your finger left and right. The iPhone shows some dots at the bottom of the screen, a standard UI indicator on that device that you can flick left/right, while there is no such indication on the Android. This is somewhat nitpicky though. I would put Android 2.0 and iPhone in the same general class of user interfaces, way above any other such device I ve tried. The Droid has an on-screen keyboard similar to the iPhone/Touch, though somehow it felt like the keys were smaller or easier to mistype. I m not sure why that is; maybe they really are smaller. The physical keyboard can be used at any point too, of course. Background Apps This is an area where Android really shines over iPhone. Android supports background apps everywhere. That means that your weather widget can be always correct, instead of being hardcoded at the factory to show 73 degrees as iPhone s weather icon does until you tap to open it. It means that more apps remember where you were and what you were doing when you switch to/from them. And it means that you can do things while that PDF downloads. Finally, it means that you can have native Jabber clients on the Android without having to do some mess with Apple push notifications plus third party servers, significantly reducing the complexity of such apps. Browser Now moving on to the applications preloaded on the phone, I ll start with the browser. It is, in a word, awesome. It is far faster and reliable than the browser in my N810. Compared to BlackBerries, of course, this is a real browser, not their limited one; and even so, it is still faster. It is also faster than the iPhone/Touch browser, sometimes significantly so. The pinch to zoom feature of the iPhone/Touch is lacking, and it must be said is both useful and pretty. Zooming softkeys appear on the screen when you tap, and do work well. It also automatically zooms if you tap on the page to fill out a form, for instance. The bookmarks save thumbnail images similar to the iPhone, and you can put bookmarks on your home screens as well. Rotating the Droid to landscape orientation causes the browser to also rotate, and on most websites it will also zoom in by default at that point, since it s got a wider orientation and doesn t have to shrink stuff to fit as much. The physical keyboard is very nice for filling in usernames and passwords. iPhone-optimized sites, such as Bloglines, work great on the Android. Though many of them fail to autodetect the Android as an iPhone-like device, and thus you have to manually ferret out their iPhone-optimized URLs. Email This is both a strong and a weak spot of the Droid. First off, it comes with two email client apps preinstalled: one for Gmail, and one for everything else. I haven t used the Gmail one, so this review doesn t consider it. You can connect the email program to your IMAP, POP, SMTP, or Exchange (ActiveSync) accounts in the predictable way. Each account can be configured with its own notification preferences, so you can easily see an icon, vibration, or beep when you get new mail on one account and not the other. All folders on an IMAP account are accessible, which is a very nice feature that is not shared by the BlackBerry. You can view your mail as a unified INBOX if you prefer. In such a few, a thin color bar to the left of each message summary tells you which account it came from by its color. This is a nice way to quickly deal with all new email, wherever it may be from, and ought to be emulated by some desktop clients. You can, of course, also view each account individually. The email program supports attachments, both viewing and sending. It does not appear to have the iPhone/Touch bug if failing to display emails forwarded as attachments. Now to the drawbacks. First of all, it inexplicably doesn t support the IMAP IDLE command. As a result, IMAP accounts are polling-only; there is no near-instant notification of new mail as there is with Exchange accounts, even though IMAP supports that trivially. Like the iPhone/Touch, Android 2.0 s mail program has a great deal of trouble with self-signed SSL certs, or SSL certs that are unusual in any way. Both devices refuse, by default, to talk to mail servers with self-signed SSL certs. Neither one offers to let you add an exception to recognize a particular cert in the manner that the built-in web browser on these devices would do. On the iPhone/Touch, at this point you need to obtain the cert by other means, stick it up on a web server, browse to it from the device, and add it that way. This trick doesn t work on Android 2.0, nor does adding it using the import from SD option. There appears to be absolutely no way to teach the mail program to use a self-signed cert on Android. The good(?) news is that you can choose to have Android accept any certificate. Many people in forums suggest that, and it does let it connect. Of course, it also removes much of the security benefit of using SSL/TLS in the first place, and is a terrible excuse for the lack of proper self-signed cert support. Both iPhone and Android devices have a horrible user experience in this area Quickoffice The Droid comes with some sort of Quickoffice software pre-installed. It can be used to view PDF, Word, and Excel files (at least; maybe more). But it is a rather strange beast. It has no icon on the applications screen. The only way to open Quickoffice is by opening a file that it supports in another app. So, for instance, tap on a PDF in the browser or open a Word attachment in email. I haven t played with it much, but I can say that it s read-only but seems to have high-quality rendering of all document types. Its PDF viewer is glacially slow on any page that has graphics. Flip the page to one with graphics and up pops a progress bar. And good thing too, because it might take 15-30 seconds to render a page. I will be looking for better PDF viewers in the Market; there are quite a few. Lack of file manager And that brings us to the next surprising limitation: there is no built-in file manager. I downloaded a PDF from the browser, and saved it to the SD card, but there was no way to look at it from the phone! Absolutely none. No way to delete it, rename it, etc. Several people recommended Astro, which solved all of those problems. Not having such a program built in is a weird glaring oversight. Of course, the iPhone/Touch doesn t have one built in, but in their case the glaring oversight is not having any files to manage Calender, Contacts, and PIM features This is an area of exceptional strength for the Android. I believe it s got the best PIM features of any mobile device out there, though it s not without its quirks. There are two calendar apps on the Droid, and they both have virtually identical interfaces and feature sets. I am rather at a loss as to why we are burdened with two separate apps. In any case, the app called Calendar works with a local calendar, or with Google Calendar syncing. It supports all the features you d expect, and plenty you wouldn t, including excellent support for meetings, viewing other people s calendars that you ve configured access to on google.com/calendar, viewing subscribed iCal calendars, etc. It has push syncing with Google Calendar, so new events appear in about 10 seconds. It is well-executed and completely flawless in every way I could see. Corporate Calendar is the same, but for hooking into Exchange or Exchange-compatible calendars via ActiveSync. We are evaluating groupware, and have so far tested it with Zimbra and Scalix. It worked well with Zimbra, and not so well with Scalix. That s not to say there were no problems. The meeting invitation emails Corporate Calendar generated appeared to have no body in the Zimbra mail client, or in Thunderbird (though if you look at the raw email, you see it does have a vcal entry in it). Meeting invitations sent to the Android can be displayed in the Email program, but the Email program doesn t offer accept/decline buttons, so you have to manually pull up the event on your calendar to accept or decline it. Other than that, it worked flawlessly with Zimbra. Scalix exhibited several data integrity issues that will probably make it unsuitable for syncing with an Android at this time. There is a built-in Calendar widget you can put on your home screen. It will show you the date and info about your next appointment. I miss the BlackBerry Pearl theme that showed me the next two appointments. There are some apps that claim to do this, but none of them work well. Contacts are also quite powerful. The contacts viewer aggregates your contacts from multiple sources into a single view, which is nice. It can sync in Gmail contacts, ActiveSync, and Facebook contacts. (How s that for a device with corporate and personal appeal?) The viewer works better than Apple s, and creating a new contact lets you choose which source you d like to add it to if you have more than one available. Continuing the trend of many recent devices, the Droid has no task/todo list support built in. Maps I ve heard people be all excited about Google Maps, saying it s the best maps ever in a phone (though I suspect they have forgotten that Garmin has added on a phone to their GPS products in the past). In general, they are probably right. And also they are probably irrelevant. The first thing that must be said is that the maps on the Android, like the iPhone/Touch and other such devices, are not actually installed on the Android. Consequently, for mapping or navigation to work, you must have a data signal, either wifi or CDMA. That immediately turns this into a GPS accessory, not a go-to device, because who wants to be stuck without a working GPS someplace without cell phone reception? (Such as several areas right near my house) I have a Garmin Nuvi 500 (see my review), and despite not being a terribly expensive GPS, it runs circles around the mapping in Android 2.0 (or iPhone for that matter). The 3D display on the Nuvi is very helpful for driving in dense city streets, and that s not available on Android or iPhone. The Nuvi has nice features such as one-touch detour calculation, excellent geocaching integration, accurate and sensitive receiver, etc. I will not be leaving it at home for trips just because the Android supports maps. That said, there is something to be said for having maps of Android s quality. It can be a nice crutch if you re somewhere unfamiliar but didn t expect to be, and thus left your GPS at home. It also can give you routing on transit sources, which Garmin can t, so if you re in an urban area with bus/subway options, the Android maps could be very helpful. I will probably try that out when we re in Chicago next and still pack the Garmin unit for driving around rural Indiana. The Phone The last built-in app to discuss is the phone feature. Yes, the Android is a phone. As expected, the phone integrates well with the system. There is not much of any great interest to discuss here. It s a phone. It integrates with contacts. It works. I use Google Voice, and have had their BlackBerry app for some time now. The Google Voice android app is far nicer. You have the option to make all calls via Google Voice, none via Google Voice, prompt each time, or only international calls via GV (which is presumably cheaper for such than your carrier). A couple of annoyances, though. One is that you have to touch a button to activate the keypad (to send touch-tone digits while you re on a call). It should be activated by default. Android Market vs. App Store I know some people love it, but to me the Apple App Store is like a cross between the sleazy guy selling watches from his car trunk and the tourist trap strip malls that sell 50-cent useless plastic memorabilia for $20. Yes, there are some quality apps in the App Store that aren t overpriced, don t violate your privacy, and do something useful. But you ll have to look hard. It still boggles the mind that most of the secure password storage tools for Android think they need access to the GPS, Internet, and at least one of your contacts, phone number, logs, etc. Yes, you heard me right. A password storage tool wants GPS and Internet access. And, being Apple, we all know how tight they ve locked down the App Store. Emulators are banned. Useful apps get arbitrarily banned at various points. Now, the Android App Market is better than the Apple App Store in the sense that it has a lower percentage of the crappy apps, and perhaps more useful apps, at least to my taste. That s not to say it s without crappy apps. It boggles my mind why most weather applets on the Market think they need to know my phone s status and identity, and why some apps that have nothing to do with the Internet or location services want to know all of the above. I don t install such apps. But there are gems out there. The small 400K weather applets that do what they advertise, and do it well. My absolute favorite is droid48, an emulator for my beloved HP 48GX calculator. Yes, an emulator. You can also find various NES, SNES, and C-64 emulators on the Market; Apple famously removed the latter from their App Store recently. And you re not tied to the Market either; you can install apps from wherever you like. KeePassDroid is another one. It reads the same database as KeePassX for Linux or KeePass (.kdb format only) for Windows. It s a secure password management system, and I can periodically copy the file from my desktop over to the Droid and have all my passwords at my fingertips but encrypted, of course. There is simply nothing that convenient for the iPhone/Touch because the device doesn t permit it. Music and Video I haven t played with these much, but the music player seems to just see MP3s placed anywhere on the SD and presents them as you d expect a music player to do. It looks fully-functional and easy to use. Conclusion Overall, I think the Droid is a very nice phone. It isn t perfect, but it bests the iPhone in a number of areas. I think it s probably the best phone for many right now, and the iPhone for some others. Update Nov 11: Two other annoyances I forgot to mention. One is that the power-button shortcut menu, as well as the lock screen, have a quick shortcut to put the phone into silent mode. Very well. Except, confusingly, these buttons not only enable silent mode but also disable vibrate mode while checking the silent mode checkbox in settings does nothing to vibrate mode. There is no built-in shortcut to enable vibrate mode; you d have to unlock the device, use the volume keys to go down the vibrate. The app Silent Mode Jammer helps with this. Second is that the documentation is as poor as any other cell phone around. For instance, there s a setting that says Voice Privacy. It s a checkbox. The description is Enable enhanced privacy mode. Thanks, but that tells me nothing. Nobody online seems to know either. A few overconfident forum posters claim it s encryption, linking to posts from 2003 about a Sony phone with a checkbox with the same name. Maybe it is encryption, but that is hardly definitive. The bottom line is it s not documented anywhere. Neither of these change my conclusion above though.

10 November 2009

Biella Coleman: The Pulse of Humor

So when I teach my Introduction to Human Communication and Culture class, we usually do a section on humor and among other articles, I assign a chapter from one of my favorite books, On Humour. It is a nice, quick read delivering however some serious philosophical punch. Given the pervasiveness of humor on the Internets I also ask students to send me what they think are 2 of the funniest videos. I then compile the list, send out to the class, and they vote on the 2 funniest ones. Here is the list and in a week I will report back on the winners, at least winners from the perspective of NYU freshmen:
A) http://www.youtube.com/watch?v=-fVDGu82FeQ B) http://www.youtube.com/watch?v=YqD2aBrqcmQ&feature=related C) http://www.youtube.com/watch?v=i7gIpuIVE3k D) http://www.youtube.com/watch?v=N-do8lSJOts E) http://www.youtube.com/watch?v=tM4eIBs8WBw F) http://www.youtube.com/watch?v=f3sX30NubTs G )http://www.sickanimation.com/cartoon.asp?name=murshaq H) http://www.youtube.com/watch?v=xD-Huwlg2kY I) http://www.youtube.com/watch?v=-fVDGu82FeQ J) http://www.youtube.com/watch?v=WGOohBytKTU K) http://www.youtube.com/watch?v=1upZz3a-7iM L) http://www.youtube.com/watch?v=pCdmiZyyGjQ M) http://www.youtube.com/watch?v=8tU4fB9nUgc N) http://www.funnyordie.com/videos/74/the-landlord-from-will-ferrell-and-adam-ghost-panther-mckay O) http://www.youtube.com/watch?v=aKBQrXxrvu0&feature=related P) http://www.youtube.com/user/doglover199709#p/search/1/rMdWqaN_Tms Q) http://www.youtube.com/watch?v=I5ALIL7T764 R) http://www.youtube.com/watch?v=kCpjgl2baLs S) http://www.collegehumor.com/video:1799458 T) http://www.youtube.com/watch?v=FfZ8yVcnLPs U) http://www.youtube.com/watch?v=VVn27YXEWho V) http://www.youtube.com/watch?v=bh8UttrmmLc W) http://www.youtube.com/watch?v=YU_nOtD7acQ
*Thanks to James and emacs, here they are with links!
Youtube
Youtube
Youtube
Youtube
Youtube
Youtube
Sick Animation
Youtube
Youtube
Youtube
Youtube
Youtube
Youtube
Funny or Die
Youtube
Youtube
Youtube
Youtube
College Humor
Youtube
Youtube
Youtube
Youtube

Biella Coleman: The Pulse of Humor

So when I teach my Introduction to Human Communication and Culture class, we usually do a section on humor and among other articles, I assign a chapter from one of my favorite books, On Humour. It is a nice, quick read delivering however some serious philosophical punch. Given the pervasiveness of humor on the Internets I also ask students to send me what they think are 2 of the funniest videos. I then compile the list, send out to the class, and they vote on the 2 funniest ones. Here is the list and in a week I will report back on the winners, at least winners from the perspective of NYU freshmen:
A) http://www.youtube.com/watch?v=-fVDGu82FeQ B) http://www.youtube.com/watch?v=YqD2aBrqcmQ&feature=related C) http://www.youtube.com/watch?v=i7gIpuIVE3k D) http://www.youtube.com/watch?v=N-do8lSJOts E) http://www.youtube.com/watch?v=tM4eIBs8WBw F) http://www.youtube.com/watch?v=f3sX30NubTs G )http://www.sickanimation.com/cartoon.asp?name=murshaq H) http://www.youtube.com/watch?v=xD-Huwlg2kY I) http://www.youtube.com/watch?v=-fVDGu82FeQ J) http://www.youtube.com/watch?v=WGOohBytKTU K) http://www.youtube.com/watch?v=1upZz3a-7iM L) http://www.youtube.com/watch?v=pCdmiZyyGjQ M) http://www.youtube.com/watch?v=8tU4fB9nUgc N) http://www.funnyordie.com/videos/74/the-landlord-from-will-ferrell-and-adam-ghost-panther-mckay O) http://www.youtube.com/watch?v=aKBQrXxrvu0&feature=related P) http://www.youtube.com/user/doglover199709#p/search/1/rMdWqaN_Tms Q) http://www.youtube.com/watch?v=I5ALIL7T764 R) http://www.youtube.com/watch?v=kCpjgl2baLs S) http://www.collegehumor.com/video:1799458 T) http://www.youtube.com/watch?v=FfZ8yVcnLPs U) http://www.youtube.com/watch?v=VVn27YXEWho V) http://www.youtube.com/watch?v=bh8UttrmmLc W) http://www.youtube.com/watch?v=YU_nOtD7acQ
*Thanks to James and emacs, here they are with links!
Youtube
Youtube
Youtube
Youtube
Youtube
Youtube
Sick Animation
Youtube
Youtube
Youtube
Youtube
Youtube
Youtube
Funny or Die
Youtube
Youtube
Youtube
Youtube
College Humor
Youtube
Youtube
Youtube
Youtube

2 April 2009

Matthew Garrett: The curious tale of the driver that did nothing

Several vendors are now shipping Qualcomm's Gobi chipset, a cunning dual CDMA-GSM wireless broadband device. There's a driver for it in the Linux kernel called qcserial which claims to support it.

Do not be fooled. This driver is a vile lie.

The hardware comes up in a dumb state and requires firmware to be loaded before it'll do anything. The only way to obtain this firmware is from a Windows driver. The only way to load this firmware is under Windows. This isn't helpful, especially given that it drops the firmware whenever you use rfkill or suspend or power down the machine. In fact, the only way you can use this driver is to boot Windows, let it load the firmware, reboot into Linux, get online and then never turn off or suspend your computer or the radio.

So, don't be like me - swearing viciously and trying to generate useful USB packet dumps in an attempt to get the hardware working. Known bad parts are the HP un2400 and the Dell wireless 5600 - sony also have a Gobi part that's used in the P-series machines, and Acer have one as well. I'll update this if I ever get anywhere with a firmware uploader, but until then remember that the presence of a driver in the kernel doesn't mean that you can actually do anything with the hardware. Fyalcomm.

12 October 2008

Rob Taylor: Boston Awesome

I’m at the Boston GNOME summit right now. Yesterday a lot of work got done on gobject-introspection and AT-SPI D-Bus, which is completely awesome. I had a great discussion with Dan Williams about where we should go with gnome-phone-manager, NM’s new ModemManager and OpenMoko’s gpsd. My interest here is having a consistent place for getting GSM/CDMA cell location information. A lot of very interesting ideas have been flying around about new user experience ideas. It seems a lot of people have been thinking similar things but didn’t really know that others were also working/thinking on the same ideas. We’ve just started the future user experience hackfest, I hope out of this we can forge some common future direction and common projects. I’ll report more after the hackfest!

30 September 2008

Axel Beckert: Mini-ITX based Home Server: Planning and Hardware

Ever since my former desktop machine gsa died and I started using only laptops at home, I noticed a need for a home server for storing all my MP3s, holiday pictures, games, and backups of my other machines. And I also want a filtering web proxy at home again. Current situation Currently my Norhtec MicroClient Jr. “c2” with it’s 120 GB 2.5" harddisk does some of these jobs (mostly storage and backup), but it neither has the disk space nor the performance to do all the things I want. For storage I once bought a TheCus N4100, the big brother of the popular and officially Debian supported N2100. Unfortunately there are a few things different than in the N2100 (NIC without MAC) which makes it much more difficult to get Debian on it and the original firmware doesn’t support NFS at all. *grmpf* I had hints from others who managed to get Debian on this NAS, but I didn’t find the time and leisure to really dig into cross-compiling kernels. (Although with the new 1.3.06 firmware, so called modules became possible also for the N4100 and a SSH module has been posted with which a Debian chroot could be installed and the required kernel build on the machine itself.) I though wasn’t very angry when the N4100+ came out shortly after I bought the N4100, because the N4100+ was no more an ARM based device but had a Celeron processor inside instead. And a NAS which is built on average PC hardware wasn’t as appealing as some device based on some more exotic architecture mainly used in embedded devices. :-) The Mini-ITX Appeal This view changed rapidly, when Raffzahn showed me a few Mini-ITX boards and cases. I surfed around on Mini-ITX.com store and stumbled upon the NAS-like ES34069 case from Chenbro featuring four S-ATA hotswap 3.5" slots, a slim-line CD-ROM drive slot, a SD card reader, and enough space for an additional 2.5" hard disk and a low profile Mini-ITX board. Additionally, the VIA EPIA SN series of Mini-ITX boards sports 4 S-ATA ports and either a passively cooled 1 GHz C7 processor or an actively cooled 1.8 GHz C7 processor. That should be enough power for a small multi-purpose home server while still keep the power consumption low. And I’m not the only one having this idea, Mini-ITX.com suggests this combination and Chenbro officially supports the VIA EPIA SN boards. Additionally, Debian 5.0 Lenny seems to run fine on the SN series, only lm-sensors seems to have problems with SN18000G and SN10000EG (but not SN18000 and SN10000E). So when the Chenbro ES34069 case showed up in digitec’s online shop, I ordered one there and a VIA EPIA SN18000G board at Brack. I didn’t order any disks since for data storage I plan to use the four Samsung 400 GB 3.5" S-ATA disks I bought for the N4100, and for the system I plant to use the 2.5" disk I initially bought for my MicroClient JrSX “c1”, but then continued to use it only with the CF card. Not yet sure, if I’ll also equip the slim-line optical drive slot, too. The case took several weeks to deliver and the mainboard hasn’t arrived yet. Instead I got an e-mail from Brack that VIA products are currently very difficult to get in Switzerland. Reason is said to be that VIA tries to channel the distribution of their products to a single distributor. (Sounds somehow similar to what Apple tried with the iPhone and failed.) Mini-ITX boards and power consumption So I now have a nice case without a board. There aren’t that many Mini-ITX boards out there sporting 4 S-ATA ports. One which cleary stood out was the new Intel DG45FC Mini-ITX board with LGA775 socket. (In Switzerland neither available at Brack nor at digitec, but e.g. at PCP.) But reading the specs of this board it was also clear that it wasn’t thought for NAS systems but high-performance HTPCs — the focus seems to be on multimedia performance which a NAS doesn’t need. Its newer sister, the Intel DQ45EK Mini-ITX board is focussed more on office and business PCs than on multimedia. But Intels remote adminstration is not really a plus for me (don’t need it, I’ve got SSH ;-) and it’ neither cheaper than the DG45FC nor has it significantly lower power-consuption. Despite the 120W power-supply there are people who already combined the Chenbro ES34069 with the Intel DG45FC or DQ45EK board, e.g. one of the administrators of the German NAS-Portal forums built such a machine and this German guy who wants to build a Windows Home Server based on such a combination. At least the NAS-Portal administrator found out that the board consumes so much power that together with the 4 S-ATA disks the included 120W power supply doesn’t suffice and the system is not stable in this configuration. Trusted Reviews review of the DG45FC explains why: It’s one of the first Mini-ITX board not following the MoDT idea, has a desktop chipset instead a mobile chipset and therefore hasn’t all of the power-saving features of those mobile chipsets. But it’s easy to see anyway: Most of the CPUs supported by the DG45FC and DQ45EK boards have a TDP of 65W. Offically the processor cooler delivered with the case supports processors with up to 65W, but 65W is already more than the half of what the power supply delivers and according to the Trusted Reviews review, the board itself consumes another 35W itself. So for the four 3.5" S-ATA disks — which are usually not as economical as notebook disks — about 20W are left. This can’t work! The guy from NAS-Portal.org plans to solve the problem by using a universal 180W notebook power supply instead of the original one. In comparison to the 100W of the both Intel boards, VIA’s SN18000G consumes only 26W (the fanless SN10000EG even only 22W) and that’s board and processor! That’s about ¼ of what the Intel board consumes. Imagine the difference between having a 100W light bulb (suffices for a whole small room) shining 365 days a year compared to a 25W light bulb (often used in bedside lamps) in a year. Other Mini-ITX mainboards with 4x S-ATA include the following ones: Conclusion For now, I decided to wait a little bit more for my VIA EPIA SN18000G board which still seems to be the best board for the Chenbro ES34069 case although not really cheap. But if I once in a not that distant future decide to have a desktop at home again, I’m quite sure it’ll sport a cute Mini-ITX case (perhaps a nice black-orange HFX micro M1 case by mCubed — unfortunately the M2 is no more available in a color combination including orange ;-) with an Intel DG45FC or Kontron 986LCD-M/mITX and a decent Core 2 Duo processor. Software Plans Of course my home server will run Debian GNU/Linux 5.0 Lenny on it, with software RAID-5 and LVM2 over the 1.6 TB of S-ATA disks resulting in 1.2 TB available disk space which will be offered using at least NFS, SMB and SSH (think sshfs). Planned software includes BackupPC (a very fine pulling backup system for machines which are not online 24/7) and Privoxy. I’ll perhaps also install Tor and a caching proxy like Squid or Polipo. Another idea is to run Mediatomb on that machine. :-)

22 October 2007

Sven Mueller: RE Anthonys some fun post

I really dislike posts like (sorry AJ, you are just one example) AJ Towns blog post
“Some fun”. What I dislike? Well, the post lacks critical information: Which slashdot post inspired him? What data is he talking about? How did he turn the data into those graphics? Sorry AJ, your post is just the latest example of this style of post, and I really got frustrated over such posts, this is not meant as a personal attack. Edit:
So to make my wish clear: Please, fellow bloggers, don’t assume that your readers are following your favourite web resources as closely as you do (and with the same specific interests). Explicitly say what you are writing about, reference resources needed to understand what you are doing, at least give readers a chance to find out what you did. In AJs case, it would probably have been enough to reference the /. article or comment which inspired him.

21 October 2007

Anthony Towns: Some fun...

Something I’ve been meaning to play with for a while, inspired by a slashdot post the other day:

Hopefully I’ll be able to speed up the calculations enough to have it work on more than just .1% of the data in reasonable time (the above took three hours of CPU time to generate, sadly), at which point we might be getting somewhere. Props to cairo and gifsicle for the viewable data dump.

11 January 2007

Evan Prodromou: 20 Niv se CCXV

So, like everybody else in the world, I was intrigued by the announcement of the iPhone. But like most Open Source folks, I was unhappy with the OS and the general closed format of the dang thing. What options are there for people who believe in Freedom but still want a cool phone? I currently own a Treo 650, which is fine, and which runs the venerable Palm OS. However, the once-thriving Palm Open Source community has pretty much dried up, leaving me without much in the way of interesting apps for my phone device. Thanks to Mike Linksvayer's notes on the subject, I got a link to the OpenMoKo project -- an effort to make a standard, Linux-based phone OS that uses ipkg for application installation and update. The first phone supporting the platform will be the FIC Neo1973, which looks pretty awesome and fairly similar to the iPhone (see this review from Linux Devices for some photos). OpenMoKo isn't the only game in town. TrollTech has a Linux-based Greenphone running their funky Qtopia platform, although it apparently doesn't work with their Qtopia Open Source version. And Nokia has this weird Maemo platform, but it only seems to run on their Internet tablet thingies. Mike gave a good link to an article about Open phones on PC Magazine. But I'm going to be looking out for availability of the OpenMoKo-enabled phone. I guess I'll have to switch phone providers -- Telus, my provider, only has CDMA service, and the FIC phone uses GSM. So, I dunno. But it'd be cool to have a mobile device that was fun and interesting and that I could believe in and want to hack on. tags:

What Chris refuses to blog about So, talking to Chris last night at the yulblog First Wednesday, I found out he wants to quit blogging. "I don't really have anything I care about enough to blog," he said. "The only thing that's piqued my interest lately was the execution of Saddam Hussein. I just don't want to blog about the iPhone." I told him I thought it'd be a good idea to make a blog just listing the things he refuses to blog about. He wouldn't commit to the idea, so I guess now I've taken over that job. In other words: Chris won't blog about the iPhone. tags:

8 November 2006

Erinn Clark: cd /mnt/view

The week before last, I packed up my car and drove across the country and am now in California. All I have to say about that is: WESSSIIIDE! I also have a few pictures.
This cow mooed at me until I went away. I love New Mexico.
Obligatory tourist shot at the Grand Canyon. As an aside, on my way there I got stuck on a highway overnight because of a police/gunman standoff.
Some pretty blown glass flowers inside the Bellagio in Las Vegas, NV.
The meteor crater, which I wish to pave and turn into a skatepark.

Next.