Quozl's Open Source - Electronics

Quozl works in outback Australia as a firmware and test engineer for a non-profit in Miami that makes laptops for children, and for a business as a systems administrator.

Quozl worked on Open Firmware (IEEE 1275-1994), which uses the Forth programming language. For many years Quozl maintained the version that is used on the One Laptop per Child computers, the most complete and extensive version ever.

| top | all articles in one page | summary by date | summary by category |

Articles in Category Electronics

IP over serial on Raspberry Pi

Electronics
How to set up IP over 3.3V serial between a Raspberry Pi and a host computer running Linux.

Prepare the host computer;

  • install the ppp package
    sudo apt install --yes ppp
  • attach a USB to 3.3V serial adapter to the appropriate GPIO pins, and plug it in to the computer,
  • identify the device, let's assume it appears as /dev/ttyUSB0,
  • run as root
    pppd nodetach debug noauth nocrtscts local passive /dev/ttyUSB0 115200 lcp-max-configure 10000

    (this will repeatedly try to establish a connection, because the LCP configure-request transmission count is set very high).
Prepare the Raspberry Pi;

  • install the ppp package
    sudo apt install --yes ppp
  • add two lines to /etc/rc.local before the exit
    systemctl stop serial-getty@ttyAMA0.service
    pppd updetach debug nocrtscts noauth local 10.1.0.1:10.1.0.2 /dev/ttyAMA0 115200
  • reboot
The link will be established, and you can ping or SSH to 10.1.0.1.

Use different addresses if required.

What it looks like on the host computer

using channel 9
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa67760f> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xa67760f> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0x25b9b80a]
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x25b9b80a> <pcomp> <accomp>]
rcvd [LCP EchoReq id=0x0 magic=0xa67760f]
sent [LCP EchoRep id=0x0 magic=0x25b9b80a]
rcvd [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [CCP ConfAck id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
rcvd [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 10.1.0.1>]
sent [IPCP ConfAck id=0x1 <compress VJ 0f 01> <addr 10.1.0.1>]
rcvd [LCP EchoRep id=0x0 magic=0xa67760f]
rcvd [CCP ConfAck id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Deflate (15) compression enabled
rcvd [IPCP ConfNak id=0x1 <addr 10.1.0.2>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 10.1.0.2>]
rcvd [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr 10.1.0.2>]
local  IP address 10.1.0.2
remote IP address 10.1.0.1
Script /etc/ppp/ip-up started (pid 80399)
Script /etc/ppp/ip-up finished (pid 80399), status = 0x0
  
(25 September 2022)

Embedded.fm on Forth

Forth Programming Electronics
Quozl was interviewed on embedded.fm about the Forth language:

(20 October 2016)

NetComm V100 VoIP ATA lost password fix

Electronics
How to reset the password on a NetComm V100 VoIP ATA:
  • in an antistatic workplace, remove the front rubber feet, remove the two screws, separate the bottom from the top by 5mm, then exert about 300g of backward pressure on the bottom; it will separate from clips at the back,

  • remove the PCB and place on workbench, locate the four serial port header pins, between the two largest chips, (or imagine a line drawn from the ethernet socket to the WAN LED; the header is half way along that line),

  • attach a 3.3V USB serial adaptor to the header pins, pin 2 is ground, pin 1 is transmit data from the ATA, the pin adjacent to pin 1 is receive data to the ATA, and the pin adjacent to pin 2 is a 3.3V supply from the ATA,

  • configure a terminal program for 115200 baud, and power up the ATA, lots of text will appear,

  • wait for the User name prompt, then hit enter twice, and a [root @ home]$ prompt will appear, like this:
    User name: MAX_VOICE_CHANNELS:3
    Password: [root @ home]$ 
    
  • type auth to enter the user configuration mode,
    [root @ home]$ auth
    [root @ auth]$ 
    
  • add a new user, in the example below the user is qz
    [root @ auth]$ adduser qz -o -services cli -permissions admin
    Enter password: qz
    
     User Name Succefully Added.
    [root @ auth]$ listusers
    1          root                                HTTP CLI FTP    - ADMIN
    2          qz                                  CLI             - ADMIN
    [root @ auth]$ exit
    
  • save settings to flash
    [root @ home]$ save
    save: codectype = 0, dsp = 0
    
    COUNTRY is 6
    **********[Current Flash used is 5739bytes(MAX is 16384bytes)]**********
    
    Configuration saved successfully
    
  • power cycle the ATA, then try to telnet to it with the new username, and explore the configuration options.
      (03 June 2011)

Desk Charger Timer

Linux Electronics
If you pay for the power at your desk, and your power is expensive, you learn the value of turning stuff off. Chargers for gadgets seem to multiply, and each adds a bit more to the bill.

Yet they don't actually need to be on all the time.

A quick hack is done to have a Python script turn on a bank of gadget chargers, and turn them off under automated control.

(5 February 2010)

IP over AX.25

Linux Electronics Radio
There's lots of stuff on the 'net for amateur radio operators who want to get into the transmission of internet packets (IP) over radio ... but it is widespread, occasionally conflicting, and often out of date.

Here's a quick attempt to bring things into the current century ... the task is to get a ping(8) between two computers using two handheld amateur radio transceivers.

(24 December 2009)

/dev/port to /dev/parport0

Linux C Programming Electronics
So you've got an old program using a parallel port on Linux, but it uses /dev/port or direct port access instead of /dev/parport0. Why worry? Because the old method doesn't let you use PCI or USB parallel ports.

Quozl had to fix it. Publishing it in case somebody needs it. Check out the change from k74.c to k74-ppdev.c in my repository.

(19 May 2009)

Kernel Patching to Fix Audio Socket Electrical Damage

Linux C Programming Electronics
Laptop speakers stopped working. Only the right channel of the headphones remains. But using a very old driver made the speakers work. Turns out electrical damage from an attached sound system broke the headphone detection. The operating system was faithfully turning off the amplifier. Software fix to the rescue ... Update: a remastered patch for alsa-driver-1.0.20.

(18 May 2009)

Usage Monitoring of a UHF CB Repeater

Network Programming Electronics
Question was, if the ham radio club had to put solar panels in to run the repeater on the mountain, how much power would be needed? Without climbing the mountain to measure it. Here Quozl hacks up a repeater usage monitor, consisting of a spare handheld radio connected to a laptop audio input.

(31 October 2008)

Starting APRS on Linux

X-Windows Programming Network Programming Electronics
Automatic Packet Reporting System (APRS) is an amateur radio system for real-time tactical digital information. How do you get started with APRS on Linux in Australia? Install xastir, configure it to grab data, watch the event stream build on a map.

(15 October 2008)

Rain Gauge Restoration

Electronics
Restoring an old gauge to measure rain, using a pedometer as the counting display.

(14 October 2008)

Human Interrupt Request Lines

Linux C Programming Electronics
As a software engineer, Quozl often sees himself as part of one great big system, in which he is a component subsystem, along with whatever computer he is using.

But in a reactive role, where most of the time is spent responding to one interrupt after another, one needs a way to service these human interrupts. Most people seem to do it with telephone ringers, text message alert tones, pagers, or popup windows. Focus stealing is annoying. Lose of concentration more so.

Hence the TCP/IP Distributed LED Mimic Panel, consisting of an array of eight LEDs driven from a parallel port that sits on the desk, and a set of spare computers around the house with displays that show a graphical version of the same panel.

(16 April 2008)

Build your own UPS

Electronics
After a UPS was destroyed by lightning, Quozl has made his own from the otherwise working batteries. It's nothing much, but if you've got a set of batteries that need a use, here's one way to do it. Combines a battery charger, the batteries, and an inverter, to power a computer. If the power goes out, the computer continues to run from the batteries.

Update: more batteries added.

(2 April 2007)

Doorbell

PIC Microcontrollers Electronics
Quozl needed a doorbell pulse extender, to make sure that when people press the button the noise will occur for a defined time, and pressing the button again won't trigger it again. The circuit is a very simple use of a PIC microcontroller.

(18 September 2006)

Light Switch

PIC Microcontrollers Electronics
Quozl needed another night light in the kitchen, so used a couple of bright LEDs and a control circuit connected to a motion detector.

(12 August 2006)

Alarm Clock

Electronics PIC Microcontrollers Linux
Quozl was sick of his old alarm clock and made a new one, easier to use, much more intelligent, but above all heaps of fun.

Update: a schematic diagram for the project.

(12 June 2005)

BlueTooth

Electronics Linux
Quozl bought a couple of 100m USB BlueTooth dongles and tried them out, making a coverage map.
(8 February 2004)

Psuedo-Random LED Flasher

PIC Microcontrollers Electronics
Quozl made a little gadget to cause visitors to ask what it was. Just one cheap microcontroller chip, an LED, and a power supply. Updated to include schematic and PCB instructions.

(15 May 2003)

Pump Controller

PIC Microcontrollers Electronics
Drought in outback Australia, so Quozl made a solar powered pump controller to pipe water from a well 2km away to his house. A 40-pin microcontroller used to control a pump ... overkill, but fun.

(23 December 2002)

Uniden UH-040XR Interfacing

PIC Microcontrollers Electronics
Quozl wanted to interface a PIC to a UHF CB.

(22 December 2002)

Irrigation Controller

PIC Microcontrollers Electronics
Quozl has developed a very simple rotary irrigation controller for his vegetable garden. Used to replace one water valve with three, it allowed the re-use of cabling to a valve location.

(16 July 2002)

Temperature Sensor

PIC Microcontrollers Electronics Linux
Quozl has developed a temperature sensor circuit for computers to monitor temperatures, but with sufficient intelligence on the circuit so that it can be used with any computer that had a serial port.

Update: released source code for the microcontroller program under the GNU Public License.

(13 January 2002)

Kitsrus Telephone Call Logger

Linux C Programming Electronics
Two Linux or UNIX programs for the Telephone Call Logger kit 164 sold by Kitsrus. Includes a logging daemon (k164d) for unattended use, and a GTK+ based GUI (k164).

(16 December 2001)

Linux Speedometer, Odometer, and Trip Computer

PIC Microcontrollers Electronics Linux C Programming
Implemented on a 386/25 8Mb DECpc laptop, this Linux application attaches to a PIC 16F84 microcontroller which is then attached to a vehicle speed sensor. The program displays current speed, distance travelled, and allows the marking of waypoints and the calculation of distance to the next town.

Update: adjustments for higher sampling rates, and a schematic contributed by a reader.

(19 October 2001)

PIC 16F877 Uptime

PIC Microcontrollers Electronics
Quozl continues work on his PIC parameter passing stack, building some more general purpose modules within the architecture. This example program includes modules for LCD display access, vectored execution and binary coded decimal conversion.

(5 March 2001)

Emu Fat Monitor

PIC Microcontrollers Electronics Linux Social
The outback emu farm up the road had a dodgy freezer. Quozl used his temperature sensor for remote monitoring, using a pair of decrepid modems as lightning protection. Read all about it.

(3 March 2001)

Videopad Base Station Protocol Daemon

Electronics Linux C Programming Network Programming
Quozl is releasing under the GNU Public License code that he wrote to interface a Linux system to a Granite Communications Base Station BS5, an exotic device that talks over radio to a Videopad VP5 hand-held LCD keypad terminal.

(11 July 1999)

Technical Aid to the Disabled Projects

PIC Microcontrollers Electronics
Quozl works as a technical volunteer for Technical Aid to the Disabled. PIC Microcontrollers were used in the projects to reduce cost and complexity, and Linux was used extensively.

(7 July 1999)

Remote Weather Station using Tandy 102 Laptop

Social Electronics
Quozl owns half a mountain with a weather station on it, and some of his friends who also have these old Tandy 102 laptops were interested in pictures of how it was done. A Linux system is used to graph and summarise the data. gnuplot is used within a PERL CGI script to deliver the graphs to a web browser as inline GIF images.

(18 February 1999)


quozl@us.netrek.org