Gmail IMAP Invalid Credentials in Thunderbird

July 17th, 2008

I kept getting “Invalid Credentials” in Thunderbird when connected to my Gmail IMAP account.  I found the solution to be:

https://www.google.com/accounts/UnlockCaptcha?

Birds Are Fast

July 12th, 2008

Birds are fast.  I guess that is why they have been able to survive all these years.  But I want to take a photograph of them!  So, I have learned to be fast.  Not just fast in taking the shot, but also fast regarding the shutter speed.

I usually use a longer lense (300mm) to get in close, and didn’t realize how much shaking is going on when I am photographing something.  Since a lot of birds eat in the morning or evening, and the setting is my back yard which is wooded, the birds are not in full sun light.  The other challenge in a wooded environment is auto focus.  Too many things for the auto focus to focus on, and how does it know I am looking at a bird?

1) Focus Problem  2) Lens Shake  3) Missed the Bird

So here is what I do:

  1. Increase the ISO.  I set my Canon Digital Rebel XTi to ISO 1600.
  2. Use shutter priority - TV - mode.  Set the shutter speed to 1/125s or faster.
  3. Use the rapid fire - AI Servo - mode for taking lots of photos very fast.
  4. Use manual focus (sometimes).

BACnet Meets in Salt Lake City

June 23rd, 2008

Salt Lake City Mountains

The BACnet committee met in Salt Lake City at the end of June.  We had a large number of Addenda that had finished public review, and had lots of comments for which to respond.  Salt Lake City had some interesting sites and some street items that I had not seen before.  The “Look” on the pavement, as well as the flags used at some crosswalks.
Look Both Ways! Street Crossing Flags

I attended Mass at Cathedral of the Madeleine on Saturday night.  It was a beautiful church and a thought provoking sermon.

Altar at the Cathedral

I ate some wonderful food in Salt Lake City, including a fabulous carrot cake at Squatter’s Pub Brewery, and some delightful salmon at Cucina Toscana.

BACnet Committee Meets in Germantown

May 3rd, 2008

Our fun BACnet committee and working groups met in Germantown at the end of April for a week. The weather was perfect, and the Montgomery College Germantown Campus was beautiful and lively.

Cherry Tree in Bloomsunlit_cherry_tree.jpgPink Dogwood in Bloom

We had our traditional Tuesday night BACnet dinner at Dogfish Head Brewery.

Don and Dave chat about Georgia TechHoward and ChristophMike, Steve, and David need reading glasses - Craig does not

Most of the working groups met.

SSPC 135 BACnet CommitteeWorking Group MeetingMike Newman

Drawing a Fairy with Wings - Tinkerbell

May 2nd, 2008

My daughter Anna got a book in December - How to Draw Fairies. I like to draw, so I studied it and began drawing a fairy using Inkscape. Drawing scalable vector art that can be filled is different than sketching. After I got the sketching finished, I had to redraw most of it to make it fillable so that I could add colors.

figure.pngtorso.pngtinkerbell1.pngtinkerbell2.png

tinkerbell3.pngtinkerbell4.pngwinged-fairy.png

I presented my handiwork to Anna. She told me that Tinkerbell’s wings were more blue, she needed a ribbon in her hair, and she had tassles or balls on her shoes. I guess I missed a few critical details. So back to the drawing board I went.

tinkerbell.png

I had hoped to add this little gem to Tux Paint, but I am not sure that I can since Tinkerbell is a Disney trademark image.

Configuring Kubuntu 8.04 Linux for Dell Latitude D820 Notebook

April 20th, 2008

I was pleasantly surprised to have all the hardware working and a smooth install of Kubuntu 8.04rc for a year old Dell Latitude D820 notebook PC. There was still a bit of customization to do to make it work like I wanted, but who can fault Canonical for not knowing what I like?

Add Codecs, Java, and other Customizations

The official way to do this is documented in the Ubuntu Wiki under CommonCustomizations. There is also a wiki page on EasyCodecInstallation. The official meta package is called “ubuntu-restricted-extras” and this installs:

  • MP3 playback and decoding
  • Sun Java runtime environment
  • Flash plugin
  • DVD playback
  • LAME (to create MP3 compressed audio files)
  • msttcorefonts (may be missing in kubuntu extras)
  • DeCSS script to download and install for DVD viewing

$ sudo apt-get install kubuntu-restricted-extras
$ sudo /usr/share/doc/libdvdread3/install-css.sh
$ sudo apt-get install msttcorefonts

Add the ability to compile, edit, and maintain code

Here are the compilers and their documents
$ sudo apt-get install build-essential subversion-tools gcc-4.2-doc glibc-doc manpages-dev
$ sudo apt-get install mingw32 mingw32-binutils mingw32-runtime
I need access to subversion and XSLT ChangeLog tools
$ sudo apt-get install subversion-tools
$ sudo apt-get install xsltproc
I install a couple of editors, useful for various things. Kate is already installed.
$ sudo apt-get install scite
$ sudo apt-get install vim-full
Useful tools for cleaning up code, converting comments and line endings, and code statistics:
$ sudo apt-get install splint
$ sudo apt-get install sloccount
$ sudo apt-get install indent
$ sudo apt-get install liwc
$ sudo apt-get install tofrodos

Add favorite online music source and music/video player VLC

$ sudo apt-get install streamtuner
$ sudo apt-get install vlc

Get rid of limited use Dolphin

This is one of the main reasons I use Kubuntu and KDE: Konqueror allows me to do many things that Nautilus and Dolphin prevent or are unable to customize
$ sudo apt-get remove dolphin

Get Rid of IcedTea - Install Sun Java JRE

I had several errors which prevented me from doing useful work on some websites that used Java.  Turns out that the default install of Kubuntu used IcedTea - the OpenJDK.  Well, apparently it doesn’t mimic Java the way the websites expected, and so, it didn’t work.  Into the hopper it goes, and Sun gets the install.
$ sudo apt-get remove openjdk-6-jre
$ sudo apt-get install sun-java6-jre

Get rid of annoying PC speaker beep

Using a console, remove the PC Speaker driver from the kernel:
$ sudo modprobe -r pcspkr
Edit /etc/modprobe.d/blacklist and add a new line to keep the PC Speaker driver from automatically loading:
# Keep the annoying beep from occurring - don't load the PC Speaker driver
blacklist pcspkr

Get rid of annoying Synaptic Tap Button

Edit the X11 configuration file /etc/X11/xorg.conf

Add the Tapbutton line and any other missing lines in the Synaptic Touchpad section:

Section "InputDevice"
Identifier  "Synaptics Touchpad"
Driver      "synaptics"
Option      "SendCoreEvents" "true"
Option      "Device" "/dev/psaux"
Option      "Protocol" "auto-dev"
Option      "HorizScrollDelta" "0"
Option      "SHMConfig" "On"
Option      "TapButton1" "0"
EndSection

You can disable the Tap Button effect immediately using the synclient tool as long as SHMConfig is On:
$ synclient TapButton1=0

Fix a bug in Firefox 3 rendering Check boxes and Radio boxes

Check boxes and Radio boxes show as a blank box or circle until the focus is moved away.  This bug was reported, and the solution is to install a GTK2 engine:
$ sudo apt-get install gtk2-engines-qtcurve

Additionally,  go to System Settings->Appearance->GTK Styles and fonts, and Set: Use another style = QtCurve.

Updating a Toshiba A135 Notebook

I also updated our Toshiba A135 Notebook and the sound and sound controls now work!  I did have to fix an fglrx bug to keep from locking up on logout.

Sharkfest ‘08 Conference for Wireshark

April 7th, 2008

sharkfest logoI was invited to attend Sharkfest ‘08, a conference for Wireshark users and developers, held March 31-April 2 at Foothill College in Los Altos Hills, California. I had a great time, and am so grateful that Gerald invited me to attend. I attended as a Wireshark developer since I actively maintain the BACnet dissector. I went to the conference with several goals in mind:

  1. Figure out how to do BACnet segmentation
  2. Figure out how to get BACnet MS/TP into libpcap/winpcap.
  3. Add a couple of BACnet dissector enhancements to Wireshark.
  4. Learn about using Wireshark for problem network analysis.

I attended Laura Chappell’s training sessions, and learned a whole lot about Network analysis and the love-hate relationship between TCP/IP SYN, ACK, and Keepalives (#4 completed). I also wrote some Wireshark code during the classes which I promply submitted (#3 completed). Loris came into the activity center and sat down with my son Joshua and me, and so we discussed how to integrate BACnet MS/TP RS485 from serial port into libpcap/winpcap (#2 completed). On the last day and the last session of the conference, I attended a session by Richard Sharpe about file sharing protocols and learned about Wireshark conversations (#1 completed).

Vint Cerf and Gerald CombsWe were treated to an inspiration talk on Tuesday morning by Vint Cerf. After the talk, I went to Laura’s session, and Joshua talked to Vint. Vint signed Joshua’s Half-Life player guide, had photos taken with Vint and Gerald, and the Wireshark crew gave Joshua some swag.

Gerald treated the developers to dinner on Tuesday night at Trader Vic’s. I drove to dinner with Joshua and Jaap Keuter, and learned about PBX systems and Jaap’s passion for skydiving. At dinner I sat next to Ulf Lamping and learned about yet another division of Siemens and about Ulf’s love for motorcycle riding. Guy Harrris and Mike sat across from me.  Joshua ate with Gerald’s wife and daughter, and John Bruno’s wife.

The Foothill College campus was beautiful and on Spring Break. The food was awesome and plentiful.  The people were great!  The Wireshark sessions were helpful.  Maybe I will get to attend next year.

Read the Fine Manual or Datasheet

March 30th, 2008

I found a bug in my Atmel AVR ATmega168 port of the BACnet Stack at SourceForge. It was the result of having not read the AVR datasheet close enough. Here is what the datasheet said:

The Transmit Complete (TXCn) Flag bit is set one when the entire frame in the Transmit Shift egister has been shifted out and there are no new data currently present in the transmit buffer. The TXCn Flag bit is automatically cleared when a transmit complete interrupt is executed, or it can be cleared by writing a one to its bit location.

SAGE_Instruction_Counter.JPGI had initially written the code to clear the TXC0 flag by clearing it, rather than setting it. Since the code could not determine when the end of the transmission occurred, I had added a _delay_us() function from the AVR-GCC library. This is what the AVR-GCC manual says about that function:

In order for these functions to work as intended, compiler optimizations must be enabled, and the delay time must be an expression that is a known constant at compile-time. If these requirements are not met, the resulting delay will be much longer (and basically unpredictable), and applications that otherwise do not use floating-point calculations will experience severe code bloat by the floating-point library routines linked into the application.

ENIAC_tubes.jpgSevere code bloat indeed! I had used a non-constant (the Baud Rate) in the delay call, and that resulted in a 4k increase in code size. After fixing the Transmit Complete flag functionality, I was able to remove the _delay_us, and the code size dimimished by 4k. On this 16k device, that means alot!

Statistics for the BACnet Stack at SourceForge on the ATmega168 are as follows:

IAR Atmel AVR C/C++ Compiler V5.10A/W32
10 191 bytes of CODE memory (+ 36 range fill )
775 bytes of DATA memory (+ 24 absolute )

avr-gcc (GCC) 4.2.2 (WinAVR 20071221rc1)
Program: 12052 bytes (73.6% Full)
Data: 481 bytes (47.0% Full)

With all the extra code space, I went on to add more functionality to the demo. The BACnet capabilities include WhoIs, I-Am, ReadProperty, and WriteProperty support. The BACnet objects include a Device object, 10 Binary Value objects, and 10 Analog Value objects. An LED is controlled by Binary Value object instance 0. All required object properties can be retrieved using ReadProperty. The Present_Value property of the Analog Value and Binary Value objects can be written using WriteProperty. The Object_Identifier, Object_Name, Max_Info_Frames, Max_Master, and baud rate (property 9600) of the Device object can be written using WriteProperty.

After adding all that functionality, I learned the hard way about the C-Stack differences between the IAR AVR compiler and the GCC-AVR compiler. The IAR compiler uses a fixed CStack size. If it is not set correctly, the CStack can overflow and cause problems in your code.

Johnniac.jpgThe GCC compiler uses the RAM not allocated to variables and text for the C-Stack. That means that the data value reported by the avr-size program is only part of the picture. If the data value is 481 bytes, and the device has 1024 total, then 1024-481=543 bytes are used by the C-Stack. In other words, don’t be fooled by the “47% Full” printed by avr-size and think that you have extra RAM. You might be able to add some more functionality, but certainly leave some RAM (or alot in my case) for the C-Stack. The GCC-AVR has two intrinsic variables for tracking the C-Stack: _end and __stack. These can be used to paint the C-Stack prior to its usage, and monitor the C-Stack during runtime. I added this technique to the demo.

The final statistics on ATmega168 demo of the BACnet Stack at SourceForge:

IAR Atmel AVR C/C++ Compiler V5.10A/W32
12 732 bytes of CODE memory (+ 36 range fill )
955 bytes of DATA memory (+ 24 absolute ) (CStack=0×200)

avr-gcc (GCC) 4.2.2 (WinAVR 20071221rc1)
Program: 15790 bytes (96.4% Full)
Data: 414 bytes (40.4% Full) (CStack=0×262)

Note: The photos are ancient computer memory from The Computer History Museum in Mountain View, California.  I’m visiting the area for the Wireshark Sharkfest ‘08.

BACnet Meets in New York City

January 22nd, 2008

SSPC 135 at the 2008 Committee Meeting in New York City

Our highly intelligent BACnet committee met in New York City. The discussion centered around Interpretation Requests, Public Review Addendum responses, and revised Public Review Addendum. The Lighting Output object, part of SSPC 135-2004 Addendum i, was approved for its second Public Review.

SSPC_135_Dinner.jpgColeman and Bob amid the jumble of wiresAndre presents to Steve Bushby

Many working groups also met on Thursday, Friday, and Sunday. The Lighting Applications working group met on Sunday morning, and we worked on the Color Output object. The Wireless Networking working group met and discussed ways to reduce broadcast packets. The Objects and Services working group met and reviewed addendum comments.

Lighting Applications working groupWireless Networking working groupObjects and Services working group

After the Sunday working group meetings, I attended mass at St. Patrick’s Cathedral. It was an awesome church and included a magnificent pipe organ and a number of alcoves.

St Patrick's CathedralAlcove at St. Patrick's CathedralAlcove at St. Patrick's Cathedral

It was my first visit to New York City. I took a ferry to see the Statue of Liberty Enlightening the World, the full name for the Statue of Liberty. I took a lot of photos, and also sent a photo from my cell phone to my family.

LibertyEnlighteningTheWorldA view of Liberty Enlightening The World from the ferryStatue Of Liberty as viewed from between some trees

I also toured Ellis Island. It was very touching as I toured the building, rooms, and steps where many families walked through to live in America between 1892 and 1924. A set of steps leading down from the Registration Hall was divided into 3, and was dubbed the “Stairs of Separation.” The steps marked the parting of the way for many family and friends with different destinations. The middle steps led to the islands hospital or detention rooms, while the outer steps were destinations of New York or New Jersey by way of ferry.

StairsOfSeparationThe Great Hall or Registry RoomA View of New York City from a window in the Registry Room

Giving: Spread the Sharing

December 24th, 2007

I listened to the Dave Ramsey Show today while driving across town. Amy Grant was his guest. They talked about a way to give by sharing a story: Spread The Sharing - Giving a Million meals through Second Harvest food bank. Share a story on the Spread the Sharing website and Country Crock will donate a meal to America’s Second Harvest.