Easy To Do is very useful utility which gives you ability to organize your daily tasks with a few taps.
It
is extremely simple and easy to use to do list: mark your tasks as done
when they are accomplished, carry-over task to another day or make it
recurring, set task priority - manage them in agile way.
Easy To Do will sort all your tasks automatically in accordance with best time management practices.
It is completely free and fits both phones and tablets with Android starting from 2.3.3.
Download it using links above or scan this QR-coded link with your device:
Tungsten Owl
Electronics and programming
Sunday, February 9, 2014
Wednesday, January 29, 2014
Keeyper Password Manager 1.2 released
Keeyper is simple, fast and secure password manager. It holds all your
passwords at your fingertips protected with master password.
You don't need any connection to access your password records - only Android device and your master password. Keeyper stores passwords encrypted, so you shouldn't worry about safety of your data.
Keeyper password keeper designed to be extremely simple and reliable software with ability to search through password records and generate strong passwords in one tap.
New excellent features has been added: now you can backup and restore your passwords database using export and import buttons at the settings menu.
Keeyper Password Manager is available two versions:
You don't need any connection to access your password records - only Android device and your master password. Keeyper stores passwords encrypted, so you shouldn't worry about safety of your data.
Keeyper password keeper designed to be extremely simple and reliable software with ability to search through password records and generate strong passwords in one tap.
New excellent features has been added: now you can backup and restore your passwords database using export and import buttons at the settings menu.
Keeyper Password Manager is available two versions:
- Keeyper Password Manager Free - database import feature is not available, export feature is available, few advertisements included
- Keeyper Password Manager - paid full-featured version without advertisements
Tuesday, August 13, 2013
ATMega128 and Nokia 1202 LCD
Nokia 1202/1203/1280 LCD is small, cheap and easy to interface with. It has 12 pins (face side, pins up from the left to the right):
There are many various library implementations for this display, you may download one of them here (Nokia 1100 LCD library updated to work with Nokia 1202 display by Chiper http://digitalchip.ru/):
- NC
- RESET
- CS
- GND
- SDA
- SCL
- VDD 3.3 V
- VDD 3.3 V
- GND
- LED- (GND)
- LED+ 3.3 V
- NC
There are many various library implementations for this display, you may download one of them here (Nokia 1100 LCD library updated to work with Nokia 1202 display by Chiper http://digitalchip.ru/):
Labels:
ATMega,
ATMega128,
AVR,
LCD,
Nokia 1100,
Nokia 1202,
Nokia 1203,
Nokia 1280
Wednesday, July 3, 2013
Accessing 24LC512 EEPROM: TWI/I2C emulation
Theory
Please refer to official 24LC512 specification and appropriate article at the Wikipedia for detailed information on 24LC512 EEPROM and theoretical vision of TWI/I2C protocol:
Practice
The following connection scheme and code is intended to be used with Atmel AT90USB162 MCU. First of all, we need to choose which MCU pins will be our SCL and SDA lines, I have chosen PB1 (pin 15) for SCL and PB2 (pin 16) for SDA. Refer to the Fritzing circuit in the previous post for connection scheme.Define ports:
#define SCLPORT PORTB
#define SCLDDR DDRB
#define SDAPORT PORTB
#define SDADDR DDRB
#define SDAPIN PINB
#define SCLPIN PINB
#define SCL PB1
#define SDA PB2
SCL and SDA signal edges:
#define TWI_SDA_LOW SDADDR |= (1 << SDA)
#define TWI_SDA_HIGH SDADDR &= ~(1 << SDA)
#define TWI_SCL_LOW SCLDDR |= (1 << SCL)
#define TWI_SCL_HIGH SCLDDR &= ~(1 << SCL)
24LC512 commands, ACK/NACK (acknowledge) and delays definitions:
#define _24LC512_WRITE 0b10100000
#define _24LC512_READ 0b10100001
#define ACK_ACK 1
#define ACK_NACK 0
#define Q_DEL _delay_loop_2(3);
#define H_DEL _delay_loop_2(5);
TWI/I2C commands (Init/Start/Stop/Write/Read):
void TWI_Init (void) {
SDAPORT &= ~(1 << SDA);
SCLPORT &= ~(1 << SCL);
TWI_SDA_HIGH;
TWI_SCL_HIGH;
}
void TWI_Start (void) {
TWI_SCL_HIGH;
H_DEL;
TWI_SDA_LOW;
H_DEL;
}
void TWI_Stop (void) {
TWI_SDA_LOW;
H_DEL;
TWI_SCL_HIGH;
Q_DEL;
TWI_SDA_HIGH;
H_DEL;
}
uint8_t TWI_Write (uint8_t Data) {
uint8_t i;
uint8_t ACK;
for (i = 0; i < 8; i++) {
TWI_SCL_LOW;
Q_DEL;
if (Data & 0x80) {
TWI_SDA_HIGH;
}
else {
TWI_SDA_LOW;
}
H_DEL;
TWI_SCL_HIGH;
H_DEL;
while ((SCLPIN & (1 << SCL)) == 0);
Data = Data << 1;
}
TWI_SCL_LOW;
Q_DEL;
TWI_SDA_HIGH;
H_DEL;
TWI_SCL_HIGH;
H_DEL;
ACK = !(SDAPIN & (1 << SDA));
TWI_SCL_LOW;
H_DEL;
return ACK;
}
uint8_t TWI_Read (uint8_t ACK) {
uint8_t Data = 0x00;
uint8_t i;
for (i = 0; i < 8; i++) {
TWI_SCL_LOW;
H_DEL;
TWI_SCL_HIGH;
H_DEL;
while ((SCLPIN & (1 << SCL)) == 0);
if (SDAPIN & (1 << SDA)) {
Data |= (0x80 >> i);
}
}
TWI_SCL_LOW;
Q_DEL;
if (ACK) {
TWI_SDA_LOW;
}
else {
TWI_SDA_HIGH;
}
H_DEL;
TWI_SCL_HIGH;
H_DEL;
TWI_SCL_LOW;
H_DEL;
TWI_SDA_HIGH;
return Data;
}
Finally, functions for accessing 24LC512 EEPROM:
uint8_t _24LC512_WriteByte (uint16_t Address, uint8_t Data) {
TWI_Start();
if (!TWI_Write(_24LC512_WRITE)) {
TWI_Stop();
return FALSE;
}
if (!TWI_Write(Address >> 8)) {
TWI_Stop();
return FALSE;
}
if (!TWI_Write(Address)) {
TWI_Stop();
return FALSE;
}
if (!TWI_Write(Data)) {
TWI_Stop();
return FALSE;
}
TWI_Stop();
_delay_ms(5);
return TRUE;
}
uint8_t _24LC512_WritePage (uint16_t Address, uint8_t* Page, uint8_t Count) {
TWI_Start();
if (!TWI_Write(_24LC512_WRITE)) {
TWI_Stop();
return FALSE;
}
if (!TWI_Write(Address >> 8)) {
TWI_Stop();
return FALSE;
}
if (!TWI_Write(Address)) {
TWI_Stop();
return FALSE;
}
while (Count--) {
if (!TWI_Write(*Page++)) {
TWI_Stop();
return FALSE;
}
}
TWI_Stop();
_delay_ms(5);
return TRUE;
}
uint8_t _24LC512_ReadByte (uint16_t Address, uint8_t* Data) {
TWI_Start();
if (!TWI_Write(_24LC512_WRITE)) {
TWI_Stop();
return FALSE;
}
if (!TWI_Write(Address >> 8)) {
TWI_Stop();
return FALSE;
}
if (!TWI_Write(Address)) {
TWI_Stop();
return FALSE;
}
TWI_Start();
if (!TWI_Write(_24LC512_READ)) {
TWI_Stop();
return FALSE;
}
*Data = TWI_Read(ACK_NACK);
TWI_Stop();
return TRUE;
}
uint8_t _24LC512_ReadPage (uint16_t Address, uint8_t* Page, uint8_t Count) {
TWI_Start();
if (!TWI_Write(_24LC512_WRITE)) {
TWI_Stop();
return FALSE;
}
if (!TWI_Write(Address >> 8)) {
TWI_Stop();
return FALSE;
}
if (!TWI_Write(Address)) {
TWI_Stop();
return FALSE;
}
TWI_Start();
if (!TWI_Write(_24LC512_READ)) {
TWI_Stop();
return FALSE;
}
Count--;
while (Count--) {
*Page++ = TWI_Read(ACK_ACK);
}
*Page++ = TWI_Read(ACK_NACK);
TWI_Stop();
return TRUE;
}
That's it, very simple.Download full library sources:
Labels:
24LC512,
AT90USB162,
AVR,
EEPROM,
Emulation,
I2C,
TWI,
Workaround
Saturday, June 22, 2013
Keyring project version 1.0
Background
I have too many passwords to keep them in mind, so one day I have decided to develop my own hardware secured password storage. It should have met the following requirements to satisfy my needs:- Usability: hardware and software should be simple in usage and maintenance.
- Security: it should have basic internal pseudo-encryption (it is enough for the first version) and it should not store master password.
- Storage: device should be able to store about a hundred passwords at a minimum.
- Performance: password retrieve time should not exceed 1 second.
- Sizes: device with enclosing should have typical size of USB stick.
- Price: should not exceed $30.00.
- Portable Password Vault – project at Hack A Day
- SplashID KeySafe – stores up to 4 GB of data secured
Architecture
On the client side there is a small program in Python, which sends requests to Keyring device via USB, retrieves replies and fetches data. Server side receives requests, performs required actions and sends back replies.
Refer to the table 1 for Keyring Interaction Protocol (KIP) commands, to the table 2 for KIP statuses and to the table 3 for KIP variable sizes.
Command
|
Value
|
Description
|
ACCESS |
0
|
Accesses Keyring
using master password. Authentication should be done using this
command prior to performing any other actions, otherwise FAIL
status will be returned for every action. Session is initially set by this command and should be used for further interaction by UI. Request: [Command][Session][Master password] Reply: [Command][Status] |
LIST |
1
|
Returns the list
of record statuses chunk-by-chunk – returns the specified chunk
of statuses. Request: [Command][Session][Chunk number] Reply: [Command][Status][Chunk list] |
READ |
2
|
Reads record data.
Full reading should be done in two steps: first reply contains
description, the second one contains password. Request: [Command][Session][Number] Reply: [Command][Status][Description] – after the first request [Command][Status][Password] – after the second request |
WRITE |
3
|
Writes data to the
specified record. Request: [Command][Session][Number][Description][Password] Reply: [Command][Status] |
DELETE |
4
|
Deletes specified
record. Request: [Command][Session][Number] Reply: [Command][Status] |
MASTER |
5
|
Changes master
password. Device should not be disconnected/powered off during
this operation, otherwise data integrity is not guaranteed. Request: [Command][Session][New master password] Reply: [Command][Status] |
FORMAT |
6
|
Formats Keyring –
clears data and resets master password to default –
“OWLSANKEYRING”. Request: [Command][Session] Reply: [Command][Status] |
FLUSH |
7
|
Flushes number
flag for READ command – service command. Request: [Command][Session] Reply: [Command][Status] |
RESET |
8
|
Resets Keyring –
clears access flag and session (sign out analogue). Request: [Command][Session] Reply: [Command][Status] |
PROGRAM |
9
|
Sets programming
flag, device enters DFU bootloader after the next reset. Request: [Command][Session] Reply: [Command][Status] |
Table 1
Status
|
Value
|
Description
|
FAIL |
0
|
Command execution has failed |
DONE |
1
|
Command performed successfully |
Table 2
Variable
|
Size,
bytes
|
Description
|
Command | 1 | Refer to table 1 for the list of available commands. |
Session | 4 | Unique ID that should be assigned to the connection on every ACCESS command invocation. |
Status | 1 | Refer to table 2 for the list of available statuses. |
Number | 4 | Record number – number of pair description + password. |
Description | 32 | Description (hint) for the password. |
Password/Master password | 16 | – |
Chunk number | 4 | Number of record list status chunk. |
Chunk list | 32 | List of record statuses. Refer to table 4 for KIP record statuses details. |
Table 3
Record
status
|
Value
|
Description
|
FREE |
0
|
Record space is free |
DATA |
1
|
Record space contains data |
CORRUPTED |
2
|
Corrupted record space – cannot be verified |
Table 4
Notes:
Hardware
Hardware core of the Keyring is Atmel AT90USB162 MCU (image 1), it has several important features which meet my initial requirements:
The other required components are:
For enabling DFU programmer you will also need to implement HWB (hardware boot) and RST (reset) buttons. Take a look at image 3 for complete circuit – moreover, it shows connections to FT232RL board for serial programming. Image 4 depicts circuit after assembling components on the breadboard.
Keyring Firmware consists of the following modules:
TWI/I2C library pins are mapped to hardware pins the following way:
Notes:
- Master password is not stored anywhere, only its hash in order to authenticate user.
- Default master password is equal to signature – “OWLSANKEYRING” (uppercase, without quotes).
- USB data packet size is 64 bytes.
Internal and external EEPROM structure is presented in the table 5.
Location
|
Offset,
bytes
|
Item
|
Internal | 0 | Signature – “OWLSANKEYRING” (w/o quotes) |
Internal | 128 | Master password CRC32 hash |
Internal | 256 | Programming flag |
External | 0 | CRC32 hash table – used in CRC32 calculations |
External | 1024 | Records statuses list |
External | 2048 | Records data |
Table 5
Hardware
- Size – 7x7x1 mm in TQFP32 package.
- Price – $5 per unit.
- Performance – up to 16 MIPS at 16 MHz.
- Interface – USB 2.0.
- Storage – 16 kbytes of flash, 512 bytes of internal EEPROM.
Also it has DFU bootloader which will make your life easier with programming FLIP software – you don't need to use serial programmer anymore.
As a storage unit I have utilized Microchip 24LC512 I2C EEPROM (image 2), which has 512 kbits (64 kbytes) of memory – quite enough to store a hundred of passwords with their short descriptions (hints):
As a storage unit I have utilized Microchip 24LC512 I2C EEPROM (image 2), which has 512 kbits (64 kbytes) of memory – quite enough to store a hundred of passwords with their short descriptions (hints):
- Size – 6x4.9x1.25 mm in SOIC8 package.
- Price – $3 per unit.
- Performance – page (128 bytes) write time is 5 ms max.
- Interface – TWI/I2C.
- Storage – 65536 bytes.
Image 1 |
Image 2 |
- 22 Ohm resistors for MCU USB data lines
- 4.7 uF bypass capacitor for MCU USB
- 16 MHz quarz for MCU
- 22 pF load capacitors for quartz
- 100 nF ceramic (fast) and 4.7 uF bypass capacitors
- 4.7 kOhm pull-up resistors for EEPROM
- USB-A SMD connector
- Material for PCB
- Enclosure
Type
|
Component
|
Count
|
Price
per unit, $
|
Total
price, $
|
MCU
|
AT90USB162
|
1
|
5.04
|
5.04
|
EEPROM
|
24LC512
|
1
|
2.94
|
2.94
|
Quartz
|
HC-49/SMD
16 MHz
|
1
|
2.58
|
2.58
|
Capacitor
|
22 pF
|
2
|
0.02
|
0.04
|
Capacitor
|
100 nF
|
2
|
0.05
|
0.10
|
Capacitor
|
4.7 uF
|
2
|
0.05
|
0.10
|
Resistor
|
22 Ohm
|
2
|
0.01
|
0.02
|
Resistor
|
4.7
kOhm
|
2
|
0.01
|
0.02
|
Connector
|
USB-A
SMD
|
1
|
1.83
|
1.83
|
PCB
material
|
Glass
textolite
|
–
|
1.00
|
1.00
|
Enclosure
|
Plastic
box
|
1
|
2.00
|
2.00
|
15.67
|
Table 6
For enabling DFU programmer you will also need to implement HWB (hardware boot) and RST (reset) buttons. Take a look at image 3 for complete circuit – moreover, it shows connections to FT232RL board for serial programming. Image 4 depicts circuit after assembling components on the breadboard.
Image 3 |
Image 4 |
Firmware
Keyring Firmware utilizes LUFA library for interaction via USB interface. AT90USB162 MCU does not have “native” TWI/I2C interface for interaction with 24LC512 EEPROM chip, so the corresponding library is implemented to emulate it.Keyring Firmware consists of the following modules:
- LUFA
- TWI/I2C firmware library
- Core firmware
TWI/I2C library pins are mapped to hardware pins the following way:
- SCL – pin 15 (PB1)
- SDA – pin 16 (PB2)
Software
Keyring Software is simple and written in Python, it utilizes PyUSB library and PyQt and consists of the following components:- PyQt
- PyUSB library
- Core library
- Core software
- Connect – authenticate at the Keyring (image 5).
- Reset – sign out and disconnect.
- Browse records (image 6).
- View password (image 7).
- Edit record (images 8-9).
- Delete record (image 8).
- Add record (image 10).
- Set master password (image 11).
- Format device.
Image 5 |
Image 6 |
Image 7 |
Image 8 |
Image 9 |
Image 10 |
Image 11 |
Schematics
I have designed two variants of PCB schematics:- Debug (images 12-20): includes pins for serial programming and required elements for hardware boot and reset buttons on the board
Image 12 |
Image 13 |
Image 14 |
Image 15 |
Image 16 |
Image 17 |
Image 18 |
Image 19 |
Image 20 |
- Release (images 21-27): has only serial programming (with external Vcc/Vss) and HWB/RST pins and is much smaller than debug version
Image 21 |
Image 22 |
Image 23 |
Image 24 |
Image 25 |
Image 26 |
Image 27 |
Both are two-sided PCBs with minimum amount of vias and maximum wire thickness (0.4 mm).
Sizes (w/o pins, enclosure and USB connector):
After first upload device will auto-format itself and will not be visible for a few seconds.
Its USB vendor ID and device ID are 0x03eb:0x204f, which corresponds to “LUFA Generic HID Demo Application”.
To use Keyring Software you should prepare appropriate environment:
Also please be notified that Keyring software is rather raw yet.
And here you may get AVRDUDE (Linux 32/64) with FT232RL serial bitbang programming mode support:
Sizes (w/o pins, enclosure and USB connector):
- Debug: 60x30x8 mm.
- Release: 40x25x8 mm.
Programming
Programming should be performed in a several steps:- Connect Keyring to FT232RL serial programmer.
- Upload new bootloader which supports 16 MHz quartz using avrdude to Keyring.
- Upload new fuses values to enable 16MHz support.
- Disconnect serial programmer.
- Connect Keyring to PC via USB.
- Enter DFU bootloader: Press RST and HWB buttons, then release RST button and finally release HWB button.
- Upload Keyring Firmware (Firmware/Keyring.hex) using FLIP software.
- Reset device (plug out and plug in it again or press RST button).
After first upload device will auto-format itself and will not be visible for a few seconds.
Its USB vendor ID and device ID are 0x03eb:0x204f, which corresponds to “LUFA Generic HID Demo Application”.
Installation
Currently Keyring Software has been tested only under Linux (Ubuntu/Mint), the next version will support Microsoft Windows.To use Keyring Software you should prepare appropriate environment:
- Install Python.
- Install Qt and PyQt.
- Install PyUSB library.
- Copy rules.d/81-owlsan-keyring.rules permissions file to /etc/udev/rules.d/ in order to have non-root access to Keyring.
Also please be notified that Keyring software is rather raw yet.
License
- OWLSAN Keyring Hardware is licensed under Creative Commons Attribution-ShareAlike 3.0 Unported License, refer to corresponding LICENSE.txt file or proceed via the link for more information: http://creativecommons.org/licenses/by-sa/3.0/
- OWLSAN Keyring Firmware is licensed under GNU GPLv3, refer to corresponding LICENSE.txt file or proceed via the link for more information: https://gnu.org/licenses/gpl.html
- OWLSAN Keyring Software is licensed under GNU GPLv3, refer to corresponding LICENSE.txt file or proceed via the link for more information: https://gnu.org/licenses/gpl.html
Downloads
The packages below contain all data related to this project: circuits, PCB schematics, bills of materials, firmware and software source codes and some required software.And here you may get AVRDUDE (Linux 32/64) with FT232RL serial bitbang programming mode support:
- avrdude_5.10-1_i386.deb
- avrdude_5.10-1_amd64.deb
- avrdude-ftbb-linux-x86.tar.gz
- avrdude-ftbb-linux-x86_64.tar.gz
Links
Labels:
24LC512,
AT90USB162,
AVRDUDE,
Bitbang,
DFU,
EEPROM,
Emulation,
FLIP,
FT232RL,
I2C,
Keyring,
LUFA,
Password Manager,
Password Secure Storage,
Project,
PyQt,
PyUSB,
Serial,
TWI,
USB
Subscribe to:
Posts (Atom)