<<

Neobrick Instruction Manual

October 30, 2008

1 Connectors 1.1 Power The neobrick has 3 SMA connections for power: +5V, +12V, and GND. The shield on both the +5V and +12V are also connected to ground internally, but the GND return SMA should be connected to minimize voltage drop. The connections are located on the main housing of the neobrick. Note: the order of the SMA connectors is +5V/+12V/GND. Identifying the GND terminal, if the labelling/markings are unreadable, may require using a multimeter to check continuity between GND and the shields of the +5V/+12V and SHUTDOWN signals, as well as pin 5 on the DB9 RS232 connector.

1.2 Adapter box The adapter box on top of the neobrick has three connections: Ethernet, serial (for debugging), and the SHUTDOWN signal. The SHUTDOWN signal, if not connected, should be terminated somehow (pulled down to ground). A simple 50 ohm SMA terminator works ne. The serial connection is wired up as a DTE (so a crossover serial cable - female-to-female is needed) and operates 115,200 bps, 8 bits, 1 stop bit, no parity, and no ow control. Ethernet is congured as a xed IP address (10.0.0.2), and is wired up as a crossover cable, so only a straight cable from a PC to the Neobrick is needed.

1.3 Internal connections 1.3.1 Adapter box Inside the adapter box, a two-pin shunt connects the RESET output of the watchdog to the RESET input of the CPU. The watchdog resets the system every ~60 seconds if the watchdog process is not running, so any BIOS changes, etc. must be done with the RESET disconnected.

1 1.3.2 Internal to pressure housing The connections inside the pressure housing are:

• the 3 SMA power connections, which are soldered directly to the CPU and HDD interface board

• a DB9 connection containing the serial port, reset line, and shutdown signal

• a 2mm 6-pin header for the Ethernet port Removal of all 3 of these connections will leave the main neobrick electronics removable from the pressure housing.

1.3.3 Between the CPU and HDD The only connection between the CPU and HDD is a 2mm x 44 pin ribbon cable containing the IDE and +5V power signals. These signals go to a SATA-to-IDE interface board which plugs into the HDD directly. The interface board also has a +12V power cable for the HDD. The SATA-to-IDE interface board is then removable from the HDD. The only other connections between the CPU and HDD are 4 standos for mechanical purposes. Block diagrams are shown in Fig. 2 and Fig.

2 Operating System

The Neobrick runs a micro distribution of Linux based on a tiny version of the C library called uClibc. The distribution can be found at www.uclibc.org.

2.1 Root lesystem The neobrick does not contain a full distribution of Linux: only a small subset of commands are available due to space concerns: [, [[, ash, , , , , , chroot, , clear, , crond, date, , , , dmesg, , , egrep, env, false, fdisk, fgrep, free, fsck, getty, , halt, hdparm, , hwclock, id, ifcong, ifdown, ifup, init, , killall, killall5, klogd, linuxrc, , logger, login, logread, , md5sum, , , mknod, , mount, , nohup, ping, powero, , , rdate, readlink, reboot, reset, , , route, run-parts, sh, , start-stop-daemon, stty, switch_root, sync, syslogd, , telnetd, , , true, tty, umount, , usleep, watchdog, yes Note that for some of these commands, they must be executed via busybox, i.e.: busybox sync. Also available are

2 Figure 1: Block diagram of the entire Neobrick system (from outside). Note that the relative orientations of the SMA, adapter box, and RS232 may not be accurate. The order of the SMA connectors is +5V/+12V/GND.

3 Figure 2: Block diagram of the inside of the Neobrick.

4 httpd (does not work), i2cdetect, i2cdump, i2cget, i2cset, vsftpd, nbsd_wd, neobrickd, wd

The important software programs which might not be known are wd, nbsd_wd, neobrickd, and vsftpd:

• nbsd_wd: the Neobrick Shutdown watchdog. Watches for the assertion of the SHUTDOWN signal.

• neobrickd: updates the /mnt/neobrick.status le. • wd: Watchdog daemon. Prevents the hardware watchdog from rebooting the system every 30 s.

• vsftpd: the Very Secure FTP Daemon. FTP server.

The source code for neobrickd and nbsd_wd are located in the root/ directory of the root-uclibc package.

3 Software patching

Since the Neobrick was sealed into the housing relatively early, software patching is needed for ideal operation due to two minor mistakes in the software stored in ash:

1. vsftpd writes a log to /var/log/vsftpd.log . Since /var is a ramdisk on the Neobrick, this log will eventually ll up and could cause problems (note that it also might not - it may simply cause No space left on device for vsftpd, which would be ignored - although the neobrick status le may stop updating).

2. neobrickd outputs the space left/available as a 32-bit integer - a 64-bit value is needed.

Since both a telnet server and FTP server are available, software patching is relatively easy. The patchnb script accomplishes this. patchnb opens a connection to the telnet server using the Net::Telnet perl script module, and patches the /etc/vsftpd.conf le. It then informs the FTP server to reload its conguration (via SIGHUP) and transfers a new copy of neobrickd via FTP using the Net::FTP perl module, stops the old copy of neobrickd, replaces it, and starts the new copy. If any part of this process fails, it attempts to reboot the Neobrick and returns with an code of 1. If it is unable to connect to the Neobrick, it returns an exit code of 2. If everything completes successfully, it exits with code 0.

5 4 Other information

If problems are observed with the neobrick, the simplest thing is to connect a (straight-through) serial cable to the serial port. The settings are 115,200 bps, 8 bits, no parity, and 1 stop bit. The neobrick redirects all console to the serial port, so the BIOS screen and power-on-self-test (POST) are all visible on the serial port. After the BIOS, the console output stops briey (as the system goes through DOS to load Linux) before launching Linux, at which point the console output resumes. Important Note: if the system is unable to launch into Linux, it will reboot after ~1 minute due to the hardware watchdog. The hardware watchdog can be disabled by opening the top of the adapter box and removing the 2-pin shunt connecting the reset line. Note that if the neobrick drive dies, the system will most likely be unable to boot into Linux due to the boot priority table being incorrect. This can be xed by going into the BIOS, going to the Boot Priority menu, selecting Hard Disk Drives and selecting SCSI Disk as the primary boot device.

6