SPARCstationLX

November 12, 2023 - Lesezeit: ~1 Minute

Am Wochenende habe ich meine Sun SPARCStationLX mal hervorgeholt und gestartet. Die Sun läuft einwandfrei, nach dem ich sie seit März nicht mehr in Betrieb hatte.

https://think.dvs8818.de/sch%C3%B6ne-alte-sun-workstation

Verbindung wurde über ein MacBookPro mit xQuartz hergestellt. So kann ich mir den Dekstop der Sum auf dem Mac anzeigen lassen. Monitor ist also nicht erforderlich.

Aus dem Terminal auf dem Mac folgendes eingeben um den Desktop anzuzeigen:

/usr/X11/bin/Xquartz -query <IP der Workstation>


IBM AIX UNIX rootvg clonen

Oktober 27, 2023 - Lesezeit: 4 Minuten

Neuer Job, habe jetzt wieder mit einem richtigen UNX und vernünftiger Hardware (Power) zu tun.

Platte in der rootvg unter LVM clonen.

Los geht es:

rootvg für Update auf hdisk2 clonen

# lspv

hdisk0          00fb6d5ad90bec17                    rootvg          active

hdisk1          00fb702765ce7eba                    data            active

hdisk2          none                                None

Klonen der rootvg auf altinst_rootvg

# alt_disk_copy -d hdisk2 -B

# lsvg

rootvg

data

altinst_rootvg

Aufwecken der altinst_rootvg, FS unter /alt_inst gemountet

# alt_rootvg_op -W -d hdisk2

Mit dem FS arbeiten

# cd /alt_inst/home/weidnertsa

Deaktivieren der altinst_rootvg inkl. Erzeugen des Bootsektors

# alt_rootvg_op -S -t

Bootlist auf hdisk2 umstellen

# bootlist -m normal -o hdisk2

System von hdisk2 (geclonte rootvg) booten

# shutdown -Fr 

Prüfen, von welchem Device gebootet worden ist

# getconf -a | grep BOOT_DEVICE

BOOT_DEVICE:                            hdisk2

# lspv

hdisk0          00fb6d5ad90bec17                    old_rootvg

hdisk1          00fb702765ce7eba                    data            active

hdisk2          00fb70276ffdc455                    rootvg          active

==>hdisk2 ist aktive rootvg 

Die hdisk0 soll wieder unsere rootvg werden und den Inhalt der hdisk2 komplett übernehmen

Löschen der old_rootvg

# alt_rootvg_op -X old_rootvg

Kontrolle old_rootvg nicht mehr vorhanden

# lsvg

rootvg

data

# lspv

hdisk0          00fb6d5ad90bec17                    None

hdisk1          00fb702765ce7eba                    data            active

hdisk2          00fb70276ffdc455                    rootvg          active

hdisk0 in rootvg aufnehmen

# extendvg -f rootvg hdisk0

# lspv

hdisk0          00fb6d5ad90bec17                    rootvg          active

hdisk1          00fb702765ce7eba                    data            active

hdisk2          00fb70276ffdc455                    rootvg          active

Mirror aufsetzen, hdisk0 hinzufügen

# mirrorvg -c2 -s rootvg hdisk0

syncen

# syncvg -P5 -v rootvg

oder

# varyonvg rootvg

bootblock auf hdisk0 schreiben und bootliste auf hdisk0 ändern

# bosboot -a -d /dev/hdisk0

# bootlist -m normal -o hdisk0

hdisk2 aus mirror entfernen

# unmirrorvg -c1 rootvg hdisk2

# migratepv hdisk2 hdisk0

# reducevg rootvg hdisk2

Bootrecord von hdisk2 entfernen

# chpv -c hdisk2

Volumemanger Besitz löschen

# chpv -C hdisk2

Attribute löschen

# chdev -l hdisk2 -apv=clear

# lspv

hdisk0          00fb6d5ad90bec17                    rootvg          active

hdisk1          00fb702765ce7eba                    data            active

hdisk2          none                                None

bootliste kontrollieren

bootlist -m normal -o


CMS und FreeBSD aktualisiert

April 4, 2023 - Lesezeit: ~1 Minute

Ich habe das CMS für diesen Blog einmal aktualisiert. Bei der Gelegenheit wurde auch das Betriebssystem (FreeBSD) auf den aktuellen Stand gebracht.

System is up and running.


LED Strip kurze Vorstellung

Februar 12, 2023 - Lesezeit: 8 Minuten

Die Beleuchtung für meine Bar mit einem LED Strip ist fertig gestellt.

Stückliste:

  • LED Strip WS2812B mit 25 RGB LEDs
  • Arduino Nano
  • USB Steckernetzteil mind. 5 V / 1 A, qualitativ hochwertig
  • Gehäuse für den Arduino (3D-Druck)
  • Kunststoffhalter für den Anschluß der Kabel an den Strip

Der Strip kann selbstverständlich auch mehr als 25 LEDs besitzen, die Anzahl muß dann im Arduino Code angepasst werden. Dazu später mehr.

Ich wollte eigentlich zur Steuerung einen ATtiny85 verwenden, allerdings hätte ich den erst programmieren, dann auf einer Platine die Schaltung zusammenlöten müssen usw. Aus diesen Gründen habe ich mich für einen Arduino Nano entschieden. Ein weiterer Vorteil besteht darin, dass ich jederzeit den Code und damit den Ablauf des Farbspiel ändern kann.

Das Ganze sollte mit nur einem Anschlußkabel USB und passendem USB Steckernetzteil betrieben werden. Bei dem USB Steckernetzteil auf eine gute Qualität chten, d.h. es sollte saubere 5 Volt liefern und für mind. 1 Ampere ausgelegt sein. Ich verwende hier ein altes iPhone USB Steckernetzteil.

Der Strip benötigt in meiner Konfiguration ca. 220 mA, d.h. auch mit einer USB Powerbank mit z.B. 1000 mAh, kann die Beleuchtung gute 4 Stunden betrieben werden. Nur für den Fall, das keine Steckdose in der Nähe ist.

Ganz wichtig an dieser Stelle ist, die 5 Volt für den LED Strip müssen am Eingang des Arduino Nano abgegriffen werden. Deshalb ist auch ein gutes Netzteil wichtig, bei dem die 5 Volt nicht gleich unter Last zusammenbrechen. Die Verkabelung vom Arduino zu dem Strip sollte möglichst kurz sein.

Für die Verbindung des Strip werden 3 Leitungen benötig. 5 Volt, GND und Data IN (Pin 6 am Arduino)

Auf keinen Fall die 5 Volt von einem Ausgang des Arduino abgreifen, da dieser nur ca. 20 bis 40 mA liefern kann. Ich habe die 5 Volt, wie bereits beschrieben, direkt an der Eingangs USB Buchse des Arduino abgegriffen.

Aufbau:

Der Ardunio Nano im Gehäuse aus dem 3D Drucker

Anschluß des Stripe in dem Kunststoffhalter

Der Ganze Strip mit 25 LEDs, der noch an der Bar angebracht werden muß

Ich habe als Grundlage für den Code das Beispiel aus der Arduino IDE verwendet und für meine Bedürfnisse angepasst.

Diese Zeilen müssen ggf. geändert werden.

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1:
#define LED_PIN    6

// How many NeoPixels are attached to the Arduino?
#define LED_COUNT 25

Der Code:

// Program for LED Strip
// For LED WS2812B Strip
// Modified from original Arduino strandtest
// © 22.01.2023 by Thomas Weidner
// tweidner@mac.com

// From original source code
// A basic everyday NeoPixel strip test program.

// NEOPIXEL BEST PRACTICES for most reliable operation:
// - Add 1000 uF CAPACITOR between NeoPixel strip's + and - connections.
// - MINIMIZE WIRING LENGTH between microcontroller board and first pixel.
// - NeoPixel strip's DATA-IN should pass through a 300-500 OHM RESISTOR.
// - AVOID connecting NeoPixels on a LIVE CIRCUIT. If you must, ALWAYS
//   connect GROUND (-) first, then +, then data.
// - When using a 3.3V microcontroller with a 5V-powered NeoPixel strip,
//   a LOGIC-LEVEL CONVERTER on the data line is STRONGLY RECOMMENDED.
// (Skipping these may work OK on your workbench but can fail in the field)

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
 #include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1:
#define LED_PIN    6

// How many NeoPixels are attached to the Arduino?
#define LED_COUNT 25

// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
// Argument 1 = Number of pixels in NeoPixel strip
// Argument 2 = Arduino pin number (most are valid)
// Argument 3 = Pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
//   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)


// setup() function -- runs once at startup --------------------------------

void setup() {
  // These lines are specifically to support the Adafruit Trinket 5V 16 MHz.
  // Any other board, you can remove this part (but no harm leaving it):
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
  clock_prescale_set(clock_div_1);
#endif
  // END of Trinket-specific code.

  strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip.show();            // Turn OFF all pixels ASAP
  strip.setBrightness(100); // Set BRIGHTNESS to about 1/5 (max = 255)
}


// loop() function -- runs repeatedly as long as board is on ---------------

void loop() {
  // Fill along the length of the strip in various colors...
  colorWipe(strip.Color(255,   0,   0), 150); // Red Delay
  colorWipe(strip.Color(  0, 255,   0), 150); // Green Delay
  colorWipe(strip.Color(  0,   0, 255), 150); // Blue
  colorWipe(strip.Color(  255,   255, 255), 150); // White
  colorWipe(strip.Color(  255,  114, 86), 150); // Orange
  rainbow(50);             // Flowing rainbow cycle along the whole strip
}


// Some functions of our own for creating animated effects -----------------

// Fill strip pixels one after another with a color. Strip is NOT cleared
// first; anything there will be covered pixel by pixel. Pass in color
// (as a single 'packed' 32-bit value, which you can get by calling
// strip.Color(red, green, blue) as shown in the loop() function above),
// and a delay time (in milliseconds) between pixels.
void colorWipe(uint32_t color, int wait) {
  for(int i=0; i<strip.numPixels(); i++) { // For each pixel in strip...
    strip.setPixelColor(i, color);         //  Set pixel's color (in RAM)
    strip.show();                          //  Update strip to match
    delay(wait);                           //  Pause for a moment
  }
}

// Rainbow cycle along whole strip. Pass delay time (in ms) between frames.
void rainbow(int wait) {
  // Hue of first pixel runs 5 complete loops through the color wheel.
  // Color wheel has a range of 65536 but it's OK if we roll over, so
  // just count from 0 to 5*65536. Adding 256 to firstPixelHue each time
  // means we'll make 5*65536/256 = 1280 passes through this loop:
  for(long firstPixelHue = 0; firstPixelHue < 5*65536; firstPixelHue += 256) {
    // strip.rainbow() can take a single argument (first pixel hue) or
    // optionally a few extras: number of rainbow repetitions (default 1),
    // saturation and value (brightness) (both 0-255, similar to the
    // ColorHSV() function, default 255), and a true/false flag for whether
    // to apply gamma correction to provide 'truer' colors (default true).
    strip.rainbow(firstPixelHue);
    // Above line is equivalent to:
    // strip.rainbow(firstPixelHue, 1, 255, 255, true);
    strip.show(); // Update strip with new contents
    delay(wait);  // Pause for a moment
  }
}


3D-Druck Teller für Wechselgeld

Februar 1, 2023 - Lesezeit: ~1 Minute

Meine Frau benötigt einen kleinen Teller um das Wechselgeld zu hinterlegen.

Also fix einen Teller entworfen und gedruckt. 4 Stunden Druckzeit, knapp 16m Filament. Aber der Teller ist wirklich stabil.


Arduino LED Strip im Testbetrieb

Januar 23, 2023 - Lesezeit: ~1 Minute

Den Arduino Sketch habe ich nun entprechend meinen Wünschen angepasst. Zur Zeit befindet sich das Ganze im Dauerbetrieb (Test). Anbei ein paar Bilder, sieht real aber sehr viel schöner aus. Die Qualität der Aufnahmen ist mit der Kamera nicht wirklich gut. Momentan verwende ich einen Stripe mit 25 RGB LEDs. Die Fraben des Regenbogen wandern über den Stripe.

In den nächsten Tagen werde ich den Arduino UNO (Entwicklungsumgebung) versuchen durch einen ATtiny zu ersetzen. Für die Steuerungsaufgabe ist der Arduino überperformant.

Danach wird die Bar mit dem LED Stripe hoffentlich verschönert. Eine Anleitung werde ich hier veröffentlichen.