Lazzzorauth: Unterschied zwischen den Versionen

aus Metalab, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Wechseln zu: Navigation, Suche
(Protocols)
K
(18 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
[[Datei:lazzzorauth.jpg|300px|thumb|left|done.]]
 +
 +
<p style="clear:both">
 +
 +
== SYSTEM IS LIVE! HERE IS HOW IT WORKS ==
 +
 +
'''You need a key, or a key owner to log in for you before you can lazzzor!'''
 +
 +
If you have lazzzor privileges but not yet a key, get in touch with [[Benutzer:mzeltner|mzeltner]], [[Benutzer:overflo|overflo]] or [[Datei:core.png]]!
 +
 +
<font color='Red'>Important notes: if you try to print '''without anyone being logged in, CorelDraw will freeze''', and print jobs will have to be cancelled!</font>
 +
 +
Currently public list of people with lazzzorprivileges:
 +
 +
* [[Benutzer:Amir|Amir]]
 +
* [[Benutzer:vierlex|vierlex]]
 +
* [[Benutzer:mzeltner|mzeltner]]
 +
* [[Benutzer:metaz|metaz]]
 +
* [[Benutzer:overflo|overflo]]
 +
* [[Benutzer:WSyS|WSyS]]
 +
* [[Benutzer:Pk|PK]]
 +
 +
=== Workflow / Howto ===
 +
 +
* '''Logging in''': put in your key
 +
* Print as per usual!
 +
* '''Be externally responsible''': hold logout button for 3 seconds
 +
* External (i.e. not you!) print as per usual
 +
* '''Log out''': tap logout once (if you're done lazzzoring or overseeing lazzzoring!)
 +
 
== Hardware  ==
 
== Hardware  ==
 +
 +
  
 
Consists of:
 
Consists of:
  - Raspberry Pi
+
  - Seagate Dockstar (because the raspberry pi SD-cards died several times)
 
  - Arduino
 
  - Arduino
  - 16x2 LCD
+
  - RGB 16x2 LCD
  - OneWire (iButton suport)
+
  - OneWire Socket (iButton support)
  - 3 Leds for status indication
+
  - A red Button
- 1 Button
+
 
  - a 6-Port Network Switch
 
  - a 6-Port Network Switch
 
  
 
== Software ==
 
== Software ==
  
Occidentalis 0.1 (RaspberryPI distro from Adafruit)
+
dockstar linux distro from usb stick
Node.js
+
 
Arduino code
+
Node.js Server / Database
 +
 
 +
Arduino code (because there was a spare arduino laying around..)
 +
 
  
  
Zeile 21: Zeile 54:
  
 
Hardware documentation
 
Hardware documentation
* tbd (how is everything connected)
+
[[Datei:Lazzzorauth_bb_small.png|200px|thumb|left|Breadboard aufbau (made with fritzing)]]
 +
[[Datei:Lazzorauth sensor.jpg|200px|thumb|left|The hall effect sensor + Preamp]]
  
Software documentation
+
 
* tbd (pitfalls, config, buildprocess)
+
There is a hall effect sensor placed right over the valve of the airassist.
 +
 
 +
This valve is opened to enable a static airflow as soon as a laserjob starts and is disabled when the job ends.
  
 
== Protocols ==
 
== Protocols ==
Arduino SENDS:
 
  
  
{|
+
All states are now handled by the embedded system.
!align ="left" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"|<small>Code</small>
+
 
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>Parameter<small>
+
The Arduino only displays what the embedded System sends it.
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>Expected reply<small>
+
 
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>What does it mean<small>
+
The arduino sends ibutton scans and pushbutton events.
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>Example<small>
+
 
|-
+
<pre>
|style="border:1px dotted lightgray;"| I
+
//this code is followed by the button id
|style="border:1px dotted lightgray; text-align:center;"|<iButton ID>
+
#define BUTTON_ID_SCANNED  'I'
|style="border:1px dotted lightgray; text-align:center;"| A, N
+
 
|style="border:1px dotted lightgray; text-align:center;"| IButton scanned
+
// error is followed by error description (like CRC error)
|style="border:1px dotted lightgray; text-align:center;"| I:33-000000000000
+
#define ERROR_CODE  'E'
|-
+
 
|style="border:1px dotted lightgray;"| X
+
// when button is triggered
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
#define LOGOUT_USER  'B'
|style="border:1px dotted lightgray; text-align:center;"| O
+
// when button is long pressed
|style="border:1px dotted lightgray; text-align:center;"| Lazzzor shutdown button hit (eXit)
+
#define EXTERNAL_USER_RESPONSIBLE  'X'
|style="border:1px dotted lightgray; text-align:center;"| X
+
 
|-
+
//button was removed, this event is ignored by embedded system
|style="border:1px dotted lightgray;"| P
+
#define BUTTON_REMOVED  'L'
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
 
|style="border:1px dotted lightgray; text-align:center;"| P
+
// sensor from valve magnetic field
|style="border:1px dotted lightgray; text-align:center;"| Ping! /Heartbeat
+
#define LASERJOB_STARTED  'J'
|style="border:1px dotted lightgray; text-align:center;"| P
+
#define LASERJOB_FINISHED  'S'
|}
+
</pre>
 +
 
 +
 
 +
The embedded System sends:
 +
<pre>
 +
'A' followed by text for the FIRST line
 +
'B' folloowed by text for the second line
 +
'C' Turn color on LCD to
 +
 
 +
GREEN =1
 +
RED =2
 +
BLUE =4
 +
 
 +
 
 +
</pre>
 +
 
 +
== Where ==
 +
 
 +
LazzzorAuth runs @ 10.20.30.27
  
 +
Its located right begind the Lazzzorstation on the wall.
  
  
Raspberry sends:
+
== Links ==
 +
[[https://github.com/Metalab/LazzzorAuth/ Arduino + Embedded system code on github ]]
  
 +
== Gotchas ==
 +
The Arduino used is a Arduino UNO but it's bootloader is from an Arduino DUEMILANOVE.
  
{|
+
Pick this as target when compiling a new firmware for it..
!align ="left" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"|<small>Code</small>
+
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>Parameter<small>
+
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>Expected reply<small>
+
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>What does it mean<small>
+
! align ="center" style="border:1px dotted lightgray; border-bottom:1px solid lightgray;"| <small>Example<small>
+
|-
+
|style="border:1px dotted lightgray;"| A
+
|style="border:1px dotted lightgray; text-align:center;"|<username>
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| Authenticated
+
|style="border:1px dotted lightgray; text-align:center;"| A:OVERFLO
+
|-
+
|style="border:1px dotted lightgray;"| N
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| Not authenticated (invalid Button)
+
|style="border:1px dotted lightgray; text-align:center;"| N
+
|-
+
|style="border:1px dotted lightgray;"| O
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| Off (in response to X)
+
|style="border:1px dotted lightgray; text-align:center;"| O
+
|-
+
|style="border:1px dotted lightgray;"| P
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| Heartbeat / PING
+
|style="border:1px dotted lightgray; text-align:center;"| P
+
  
|-
+
When the Arduino is plugged in it displays "Linux booting.. hang in there"
|style="border:1px dotted lightgray;"| E
+
|style="border:1px dotted lightgray; text-align:center;"| <Error>
+
|style="border:1px dotted lightgray; text-align:center;"| NONE
+
|style="border:1px dotted lightgray; text-align:center;"| Some Error occured
+
|style="border:1px dotted lightgray; text-align:center;"| E:Network down!
+
  
 +
Once The embedded system is up it sends a welcoming message over serial and this flushed the display.
  
|}
+
[[Kategorie:Howto]]
 +
[[Kategorie:Infrastruktur]]
 +
[[Kategorie:Lazzzor]]
 +
[[Kategorie:Metalab_OS]]
 +
[[Kategorie:Projekte]]

Version vom 2. Februar 2013, 13:06 Uhr

done.

SYSTEM IS LIVE! HERE IS HOW IT WORKS

You need a key, or a key owner to log in for you before you can lazzzor!

If you have lazzzor privileges but not yet a key, get in touch with mzeltner, overflo or Core.png!

Important notes: if you try to print without anyone being logged in, CorelDraw will freeze, and print jobs will have to be cancelled!

Currently public list of people with lazzzorprivileges:

Workflow / Howto

  • Logging in: put in your key
  • Print as per usual!
  • Be externally responsible: hold logout button for 3 seconds
  • External (i.e. not you!) print as per usual
  • Log out: tap logout once (if you're done lazzzoring or overseeing lazzzoring!)

Hardware

Consists of:

- Seagate Dockstar (because the raspberry pi SD-cards died several times)
- Arduino
- RGB 16x2 LCD
- OneWire Socket (iButton support)
- A red Button
- a 6-Port Network Switch

Software

dockstar linux distro from usb stick

Node.js Server / Database

Arduino code (because there was a spare arduino laying around..)


How

Hardware documentation

Breadboard aufbau (made with fritzing)
The hall effect sensor + Preamp


There is a hall effect sensor placed right over the valve of the airassist.

This valve is opened to enable a static airflow as soon as a laserjob starts and is disabled when the job ends.

Protocols

All states are now handled by the embedded system.

The Arduino only displays what the embedded System sends it.

The arduino sends ibutton scans and pushbutton events.

//this code is followed by the button id
#define BUTTON_ID_SCANNED   'I'

// error is followed by error description (like CRC error)
#define ERROR_CODE  'E'

// when button is triggered
#define LOGOUT_USER  'B'
// when button is long pressed
#define EXTERNAL_USER_RESPONSIBLE  'X'

//button was removed, this event is ignored by embedded system
#define BUTTON_REMOVED  'L'

// sensor from valve magnetic field
#define LASERJOB_STARTED  'J'
#define LASERJOB_FINISHED  'S'


The embedded System sends:

'A' followed by text for the FIRST line
'B' folloowed by text for the second line
'C' Turn color on LCD to 

GREEN =1
RED =2
BLUE =4


Where

LazzzorAuth runs @ 10.20.30.27

Its located right begind the Lazzzorstation on the wall.


Links

[Arduino + Embedded system code on github ]

Gotchas

The Arduino used is a Arduino UNO but it's bootloader is from an Arduino DUEMILANOVE.

Pick this as target when compiling a new firmware for it..

When the Arduino is plugged in it displays "Linux booting.. hang in there"

Once The embedded system is up it sends a welcoming message over serial and this flushed the display.