Giter VIP home page Giter VIP logo

robandr / thinner-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davidcranor/thinner-client

0.0 1.0 0.0 32.28 MB

This project implements an STM32F based thin client which can send and receive data over serial, read a PS/2 keyboard, and display the contents of a 480x240 framebuffer on an NTSC television.

C 37.63% Processing 0.01% HTML 56.31% Assembly 2.68% CSS 0.09% Perl 0.02% JavaScript 0.13% C++ 1.67% LSL 1.34% Python 0.09% Makefile 0.04% Shell 0.01%

thinner-client's Introduction

This project implements an STM32F based thin client which can send and receive data over serial, read a PS/2 keyboard, and display the contents of a 480x240 framebuffer on an NTSC television.

The included main.c implements a vt100 serial terminal with 80x24 characters.  Tools are also included to upload vial the STM32F's build in bootloader and an FTDI cable.

In order to make it work (and if you are using bash and Ubuntu)

paste the following into /etc/init/ttyUSB0.conf:

******************************************************************

start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

respawn
exec /sbin/getty -L 57600 ttyUSB0 vt100

******************************************************************

Now you can start and stop the ttyUSB0 login process

using sudo [start, stop] ttyUSB0

Put this in your /etc/bash.bashrc to actually give the serial port the login process:

******************************************************************

if [ "$TERM" == "vt100" ]; then
       export TERM=xterm
       export ROWS=25
       export COLUMNS=80
       export LANG=POSIX
       # Redundant settings, for other folks
       export LINES=$ROWS
       stty rows $ROWS
       stty cols $COLUMNS
fi

******************************************************************

The board is designed so that the top layer can be made at home, with some easy drillable/solderable vias to a ground plane on the back side.  The SD card slot is the only thing on the bottom of the 2 layer design, and is not important at this point (it isn't even supported in the code yet, and isn't included on the BOM).

If you want to write your own NTSC display stuff using this project, all you have to do (assuming you already have the arm toolchain) is make a main.c which includes the following:
 
stm32f10x.h
stm32f10x_exti.h
thinnerclient.h
 
as well as a call to thinnerClientSetup();
 
then, you have access to the following:
 
frameBuffer[BUFFER_VERT_SIZE][BUFFER_LINE_LENGTH];
uint8_t buffer_get_key()
uint8_t buf_dequeue()
 
anything written to frameBuffer appears on the screen.
buffer_get_key and buf_dequeue retrieve bytes from the keyboard buffer and USART receive buffer, respectively.
 
check out thinnerclient.h and thinnerclient.c for details.


Known bugs:

-Slight screen glitching because of serial receive and keyboard interrupts.  Fixing this may involve messing with the interrupt priorities
-A bit of RAM can be freed by putting the font into program memory.  However, this causes a small glitch near the top of the screen when the framebuffer is refreshed every frame.

******************************************************************

xvsmfbg stands for X virtual shared memory frame buffer grabber. It is designed to grab frames from Xvfb, and spit them at a fixed rate to stout. 

You can use it to send frames from your computer to a thinner client and display them on a TV.  The code to implement this is not currently in this repo, but it should be pretty simple to write - just read stuff out of the serial buffer and put into the frame buffer. 

******************************************************************


David Cranor
cranor (at) media (dot) mit (dot) edu
8/31/2010

thinner-client's People

Contributors

davidcranor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.