Blogs

Send by email PDF version

Soldering for Family Harmony

Santa brought the boys two Tonka Ricochet Replay R/C cars on Sunday, a blue/green one for Zane and a yellow/red one for Aidan. Unfortunately, only Zane’s worked, putting a damper on Aidan’s Christmas—Zane was having too much fun to share.

OpenWrt on Actiontec GT701-WG

Couldn’t put OpenWrt on my Goodwill Linksys WRT54G v8, but it turns out it will run on my old Qwest DSL modem, an Actiontec GT701-WG. OpenWrt holds a lot of promise, so it was worth it to me to try to get it working, especially since I had a good candidate target device sitting in a drawer wasting space. Since this was my first experience with OpenWrt, I hit a few rough edges on the sites—both of them: there are “old” and “new” wikis, and both have grown organically, shall we say—and deduced a lot through trial and error.

Linksys WRT54G v8: Ifos fail, wireless bridge win!

Pushing on with OpenWRT as a framework on which to build an Ifos server/master control program, I popped down to the local Goodwill to scrounge a cheap router. I new they had a pile of them, having donated a few myself. I guess a lot of people had the same idea, though, because pickings were slim—nothing but some ancient Cisco 678 ADSL modems (my old Netgear equipment had evidently found a home).

TINI disappointments

Spent some time over the weekend on an Ifos master control program targeting TINI. It’s a Java app wrapped around a tiny [sic] built-in web server and works great so far. Well, I should qualify that: it works great until I run it on the TINI. Being Java (supposably1 cross-platform), the program can be developed and tested on my Mac, where it’s spiffy and quick. On TINI, however, there are two major issues:

  • TINI supports only a subset of the Java 1.1.8 distribution. It’s a large subset, but it’s still a subset.
  • TINI is much much much slower than I expected.

jamod control of Ifos successful

I am finally able to demonstrate direct jamod control of Ifos.

Love git, love gitosis (and svn2git is great, too)

Just officially converted all my source repositories to Git from Subversion. I’ve played with Git off and on since 2006, when my friend bsharpe first introduced it to me, but there was always so much inertia attached to the status quo… I use something else at my job, I don’t really contribute to any distributed projects, my tools have no Git integration, I hardly ever branch, what I have is plenty fast enough, etc. etc.

No more excuses.

Gitosis does not like multiple writable values per group

I spent a long time trying to figure out why this wasn’t working in my gitosis.conf:

[gitosis]
 
[group PIC]
members  = peter
writable = PIC/datasheets
writable = PIC/framework
writable = PIC/ifos
writable = PIC/modbus
writable = PIC/test
writable = PIC/tools/pp

GeSHi language file for PIC assembler (18Fxxxx)

I occasionally use GeSHi on this site (via the GeSHi Filter Drupal module) to add syntax highlighting to code snippets, but usually not PIC assembler. Even though it lists MPASM among its supported formats, GeSHi highlighting has always been uneven and incomplete, at least when applied to my PIC18F242-based code. For example:

;; ----------------------------------------------
;;  void restart()
;;
;;  Reset the countdown period for the millisecond timer.
;;
restart:
   ; Set up the basic timer operation.
   movlw    b'00001000'
            ; 0------- TMR0ON       ; turn off timer
            ; -0------ T08BIT       ; use 16-bit counter
            ; --0----- T0CS         ; use internal instruction clock
            ; ---X---- TOSE         ; [not used with internal instruction clock]
            ; ----1--- PSA          ; do not prescale timer output
            ; -----XXX T0PSx        ; [not used when prescaler inactive]
   movwf    T0CON
 
   ; Establish the countdown based on calculated MIPS.
   movlw    kTickDelay >> 8
   movwf    TMR0H
   movlw    kTickDelay & 0xff
   movwf    TMR0L
 
   ; Clear the timer interrupt flag.
   bcf      INTCON, TMR0IF
   btfsc    INTCON, TMR0IF          ; is the flag clear now?
     bra    $-2                     ; no, wait for it to change
 
   ; Unmask the timer interrupt and turn on the countdown timer.
   bsf      INTCON, TMR0IE
   bsf      T0CON, TMR0ON
   return

Makefiles for use with GPUTILS

Now that I’ve switched to GPUTILS from MPLAB, makefiles have re-entered my life. I’ve always hated writing them, the last time being five or six years ago for BREW projects, an atavism not unlike my recent return to assembler. As I sat down to write three new ones (and they’re about as straightforward as makefiles get), all the unpleasantness came flooding back to me. Forgettable macros, single stems, arcane completion rules—I thought about documenting my innumerable complaints, but found someone had already summarized them perfectly.

Snow Leopard and ruby-serialport

As soon as I upgraded to Snow Leopard, my mastery of the hardware serial port looked decidedly unhealthy:

peter@McMullen ~/Documents/saphum $ irb -r ifos/ifos.rb
/Library/Ruby/Gems/1.8/gems/ruby-serialport-0.7.0/lib/serialport.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/ruby-serialport-0.7.0/lib/serialport.bundle, 9): no suitable image found. Did find: (LoadError)
        /Library/Ruby/Gems/1.8/gems/ruby-serialport-0.7.0/lib/serialport.bundle: no matching architecture in universal wrapper - /Library/Ruby/Gems/1.8/gems/ruby-serialport-0.7.0/lib/serialport.bundle
        from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
        from /Library/Ruby/Gems/1.8/gems/ruby-serialport-0.7.0/lib/serialport.rb:1
        from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
        from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
        from ../modbus/modbus.rb:25
        from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
        from ./ifos.rb:19
        from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb/init.rb:253:in `load_modules'
        from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb/init.rb:251:in `each'
        from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb/init.rb:251:in `load_modules'
        from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb/init.rb:21:in `setup'
        from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb.rb:54:in `start'
        from /usr/bin/irb:13
Syndicate content