Doorbell

From VoidWarranties - Hackerspace Antwerp, Belgium
(Difference between revisions)
Jump to: navigation, search
(Tring!!! Laten we beginnen ...)
(We gaan dit toch echt maken, hè?)
Line 7: Line 7:
 
|Short description=Voidwarranties acces and availablity platform V.A.A.P
 
|Short description=Voidwarranties acces and availablity platform V.A.A.P
 
}}
 
}}
=An extendable monitoring rig=
+
=Scoping the extendable monitoring rig=
 
This platform exists in physical and logical form
 
This platform exists in physical and logical form
 
so it will be created out of sensors, detectors, push buttons
 
so it will be created out of sensors, detectors, push buttons
Line 18: Line 18:
 
*sends mails or twitters when the space is not open etc...
 
*sends mails or twitters when the space is not open etc...
 
==Hardware implementation==
 
==Hardware implementation==
* A donated [http://soekris.com/products/net4526.html soekris 4526]: a 486 PC in a 5x3" form-factor (has Ethernet and could boot a custom linux install on limited flash memory)
+
* A donated [http://soekris.com/products/net4526.html soekris 4526]: a 486 PC in a 5x3" form-factor, has Ethernet and can boot a custom linux install on limited flash memory.
* An arduino doing the low-end physical monitoring of input gathered by some sensors in the space. Interfacing the arduino directly serially with the soekris board? That would be cool. The COM port might be usable. Some help is needed to pull this off.
+
* An Arduino doing the low-end physical monitoring of input gathered by some sensors in the space. Interfacing the arduino directly serially with the soekris board? That would be cool. The COM port might be usable. Some help is needed to pull this off.
 
+
 
==Missing==
 
==Missing==
*Can someone get there hands on one of those [[Image:stop.jpg|75px]]
+
*Can someone get their hands on one of those [[Image:stop.jpg|75px]]
 +
 
 +
= Soekris prepping=
 +
There might be better boards available, but the soekris 4526 is what is available locally.
 +
==PXE booting the soekris beast==
 +
To put a useful OS on the board some hurdles are supposed to be taken. The board allows to boot over the network with PXE, effectively downloading the kernel and a ramdisk over ethernet and starting. To allow for this you need to do several things:
 +
# A TFTP server, providing a download location for the kernel and ramdisk for the unit, which will finally end you with a command prompt. This would allow to start installing data on the flash limited amount of RAM available.
 +
# A DHCP server instructing the board after requesting info where the tftpd data. Just an essential convenience on the network at early PXE boot
 +
# A serial console view to monitor what the board is actually doing
 +
# wireshark, to see what is going wrong during the PXE-phase, whilst the serial console is only showing garbled text...
 +
* Having a CompactFlash card option ready as a reply to the above would be great asset technically, but the board has only got 2 Mini-PCI interfaces. Suggestions are welcome if there is an easy way to mount a compact flash on the PCI interfaces.
 +
 
 +
So far the following is in place:
 +
===A TFTP daemon===
 +
On a Ubuntu install 10.04 LTS
 +
<pre>$ sudo apt-get install tftpd-hpa</pre>
 +
 
 +
Have this in your /etc/default/tftpd-hpa:
 +
<pre># /etc/default/tftpd-hpa
 +
 
 +
TFTP_USERNAME="tftp"
 +
TFTP_DIRECTORY="/var/lib/tftpboot"
 +
TFTP_ADDRESS="0.0.0.0:69"
 +
# disable options. Het soekris bordje vindt "opties" blijkbaar niet goed
 +
#TFTP_OPTIONS="--secure"
 +
</pre>
 +
And restart the tftp-hpa daemon.
 +
===A DHCP daemon===
 +
Assumption here is to have the tftpd process running on the same machine as the DHCP server!
 +
<pre>$ sudo apt-get install dhcp3-server</pre>
 +
Contents of a sample /etc/dhcp3/dhcpd.conf file are as follows:
 +
<pre>
 +
ping-check = 1;
 +
log-facility local7;
 +
 
 +
option broadcast-address 192.168.178.255;
 +
option domain-name-servers 192.168.178.1;
 +
 
 +
subnet 192.168.178.0  netmask 255.255.255.0 {
 +
        range 192.168.178.210 192.168.178.250;
 +
}
 +
# Soekris installations
 +
group {
 +
        #filename="pxelinux.0" ; # Results in: Only absolute filenames allowed
 +
        #filename="/pxelinux.0" ; # Results in: Forbidden directory
 +
        filename="/var/lib/tftpboot/pxelinux.0" ;
 +
        option domain-name-servers 192.168.178.1 ;
 +
        option routers 192.168.178.1 ;
 +
        host soekris4526 {
 +
                hardware ethernet 00:00:24:c2:38:0c ;
 +
        }
 +
}
 +
</pre>
 +
Please note, you would probably essentially need to change the network (192.168.178.x), use a ethernet cross-cable or both.
 +
==Minicom setup==
 +
To monitor the board during ''early-boot'' you need to set up mincom (if you like cu too...).
 +
<br/>
 +
The following eternally interesting key strokes are of value:
 +
* Push CTRL-A Z (Leave the CTRL key alone when you press the Z-key): Puts you to the ''Menu''
 +
* Push CTRL-A X to stop minicom, when you had enough
 +
* Push CTRL-A Z o
 +
Have this as the communication settings for ''Serial port setup'' to monitor the PXE process:
 +
<pre>
 +
OPTI+-----------------------------------------------------------------------+     
 +
Comp| A -    Serial Device      : /dev/ttyUSB0                              |     
 +
Port| B - Lockfile Location    : /var/lock                                |     
 +
    | C -  Callin Program      :                                          |     
 +
Pres| D -  Callout Program      :                                          |     
 +
    | E -    Bps/Par/Bits      : 19200 8N1                                |     
 +
    | F - Hardware Flow Control : No                                        |     
 +
    | G - Software Flow Control : No                                        |     
 +
    |                                                                      |     
 +
    |    Change which setting?                                              |     
 +
    +-----------------------------------------------------------------------+
 +
</pre>
 +
Now, you also know the correct Baud-rate :) Save this file (don't forget running minicom as root, or else you waste more time...)
 +
==Boot process==
 +
For unknown reasons the PXE boot sequence does not reflect in a visually appealing display in the serial console output. Through a wireshark capture it was noticable that the linux kernal and the ramdisk file are downloaded by the soekris board. During that processes the serial console post some gibberish output in the upper left 10x4 character output, showing it is doing something (as confirmed by the concurrent wireshark capture). Then the console screen turns blank. Some help would be very helpful to get this issue resolved! Currently stuck...

Revision as of 23:27, 7 April 2011


Doorbell
What:
Voidwarranties acces and availablity platform V.A.A.P
Doorbel.jpg
Participants:
Jobj
Category:
Electronics
Locations:
Den Bunker

Contents

Scoping the extendable monitoring rig

This platform exists in physical and logical form so it will be created out of sensors, detectors, push buttons but will also contain decision logarithms and best practice policy.

Requirements

This might all sound abstract but in practice it will be a doorbell that decides to work depending on the fact that the space is:

Hardware implementation

Missing

Soekris prepping

There might be better boards available, but the soekris 4526 is what is available locally.

PXE booting the soekris beast

To put a useful OS on the board some hurdles are supposed to be taken. The board allows to boot over the network with PXE, effectively downloading the kernel and a ramdisk over ethernet and starting. To allow for this you need to do several things:

  1. A TFTP server, providing a download location for the kernel and ramdisk for the unit, which will finally end you with a command prompt. This would allow to start installing data on the flash limited amount of RAM available.
  2. A DHCP server instructing the board after requesting info where the tftpd data. Just an essential convenience on the network at early PXE boot
  3. A serial console view to monitor what the board is actually doing
  4. wireshark, to see what is going wrong during the PXE-phase, whilst the serial console is only showing garbled text...

So far the following is in place:

A TFTP daemon

On a Ubuntu install 10.04 LTS

$ sudo apt-get install tftpd-hpa

Have this in your /etc/default/tftpd-hpa:

# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
# disable options. Het soekris bordje vindt "opties" blijkbaar niet goed
#TFTP_OPTIONS="--secure"

And restart the tftp-hpa daemon.

A DHCP daemon

Assumption here is to have the tftpd process running on the same machine as the DHCP server!

$ sudo apt-get install dhcp3-server

Contents of a sample /etc/dhcp3/dhcpd.conf file are as follows:

ping-check = 1;
log-facility local7;

option broadcast-address 192.168.178.255;
option domain-name-servers 192.168.178.1;

subnet 192.168.178.0  netmask 255.255.255.0 {
        range 192.168.178.210 192.168.178.250;
}
# Soekris installations
group {
        #filename="pxelinux.0" ; # Results in: Only absolute filenames allowed
        #filename="/pxelinux.0" ; # Results in: Forbidden directory
        filename="/var/lib/tftpboot/pxelinux.0" ;
        option domain-name-servers 192.168.178.1 ;
        option routers 192.168.178.1 ;
        host soekris4526 {
                hardware ethernet 00:00:24:c2:38:0c ;
        }
}

Please note, you would probably essentially need to change the network (192.168.178.x), use a ethernet cross-cable or both.

Minicom setup

To monitor the board during early-boot you need to set up mincom (if you like cu too...).
The following eternally interesting key strokes are of value:

Have this as the communication settings for Serial port setup to monitor the PXE process:

OPTI+-----------------------------------------------------------------------+      
Comp| A -    Serial Device      : /dev/ttyUSB0                              |      
Port| B - Lockfile Location     : /var/lock                                 |      
    | C -   Callin Program      :                                           |      
Pres| D -  Callout Program      :                                           |      
    | E -    Bps/Par/Bits       : 19200 8N1                                 |      
    | F - Hardware Flow Control : No                                        |      
    | G - Software Flow Control : No                                        |      
    |                                                                       |      
    |    Change which setting?                                              |      
    +-----------------------------------------------------------------------+

Now, you also know the correct Baud-rate :) Save this file (don't forget running minicom as root, or else you waste more time...)

Boot process

For unknown reasons the PXE boot sequence does not reflect in a visually appealing display in the serial console output. Through a wireshark capture it was noticable that the linux kernal and the ramdisk file are downloaded by the soekris board. During that processes the serial console post some gibberish output in the upper left 10x4 character output, showing it is doing something (as confirmed by the concurrent wireshark capture). Then the console screen turns blank. Some help would be very helpful to get this issue resolved! Currently stuck...

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
Content Creation
Belgian Spaces