{"id":17244650,"url":"https://github.com/kost/dcled","last_synced_at":"2025-04-14T04:08:29.230Z","repository":{"id":1368677,"uuid":"1319130","full_name":"kost/dcled","owner":"kost","description":"Dream Cheeky USB Message Board","archived":false,"fork":false,"pushed_at":"2021-09-15T22:45:05.000Z","size":115,"stargazers_count":26,"open_issues_count":3,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-27T18:01:42.173Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.jeffrika.com/~malakai/dcled/index.html","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kost.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-02-02T03:38:09.000Z","updated_at":"2023-01-05T03:50:02.000Z","dependencies_parsed_at":"2022-07-29T11:09:37.893Z","dependency_job_id":null,"html_url":"https://github.com/kost/dcled","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kost%2Fdcled","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kost%2Fdcled/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kost%2Fdcled/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kost%2Fdcled/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kost","download_url":"https://codeload.github.com/kost/dcled/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819404,"owners_count":21166477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T06:26:29.390Z","updated_at":"2025-04-14T04:08:29.195Z","avatar_url":"https://github.com/kost.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"dcled - userland driver for Dream Cheeky (Dream Link?) USB LED Message Board\n\nCopyright 2009,2010,2011 Jeff Jahr \u003cmalakais@pacbell.net\u003e \n\nThis is free software.  G'head, use it all you want.  Because of the use of\nlibhid, however, this might now be considered GPL licensed.  I kind of like the\nArtistic License myself.  Anyway, if you are planning to incorporate this code\ninto your product or are otherwised concerned about the licensing, have your\npeople contact my people and we'll work it out.\n\nVersion 1.0 took ~12 hours to write, and was my first foray into usb device\nprogramming.  This is probably not a real good example of how to do ANYTHING.\n\nDcled runs on linux, and perhaps other operating systesm.  To use it, you need\nto have the usb hiddev loaded- on my system that seems to be the module named\n'usbhid', and it is loaded by default.  When you plug in the message board, the\nsystem ought to see it and create an entry in /dev/usb/hiddev* for it.  You can\ncheck if the device is loaded correctly with this command:\n\nlsusb -d 1d34:0013 -v\n\nThat out to output a whole lot of stuff that you probably dont care about-\nunless it outputs nothing.  If it outputs nothing, then you have a problem with\nyour usb. Or maybe you have message board with a different vendor and product\nid.\n\nBUILDING IT:\n\nAs of dcled version 1.4, you are going to need a copy of the libhid-dev files\nin order to build dcled.  If you are running debian or ubuntu, try running\n'apt-get install libhid-dev' to get the right files installed.\n\nType 'make'.  That should build an executable called 'dcled'.  If that doesnt\nwork, try compling it by hand.  There is an install option in the makefile.  If\nthe first make command was successful, run 'make install' as root to copy the\nexecutable into /usr/local/bin.\n\nAs of dcled version 1.8, there is a linux udev rules file that will set the\npermissions of the dcled device such that members of the plugdev group can\naccess the hardware without being root.  It seems to work pretty well under\nUbuntu linux, but it isn't very well tested elsewhere and I can't vouch for how\nwill it will work under other OS's.  If you want to give it a shot, type\n'make udev'.  That will copy the file into place and restart the udev\nsubsystem.\n\nRUNNING IT:\n\nYou are going to need read/write access to the mesage board device in order to\nuse dcled.  This means you can either run dcled as root, suid the exe, or\nfigure out how to set the device permissions under hotplug if the method\nsuggested by the installation instructions didn't work for you.  If you choose\nto run it as root, do try not to hurt anything.  You've been warned.\n\nUsage- ./dcled [opts] [files]\n\n        --brightness  -b   How bright, 0-2\n        --clock       -c   Show the time\n        --clock24h    -C   Show the 24h time\n        --bcdclock    -B   Show the time in binary\n        --debug       -d   Mostly useless\n        --echo        -e   Send copy to stdout\n        --help        -h   Show this message\n        --message     -m   A single line message to scroll\n        --nodev       -n   Don't use the device\n        --preamble    -p   Send a graphic before the text.\n        --repeat      -r   Keep scrolling forever\n        --fastprint   -f   Jump to end of message.\n        --speed       -s   General delay in ms\n        --test        -t   Output a test pattern\n\nAvailable preamble graphics:\n\n         1 - dots       - A string of random dots\n         2 - static     - Warms up like an old TV\n         3 - squiggle   - A squiggly line\n         4 - clock24    - Shows the 24 hour time\n         5 - clock      - Shows the time\n         6 - spiral     - Draws a spiral\n         7 - fire       - A nice warm hearth\n         8 - bcdclock   - Shows the time in binary\n\n\nI set up dcled so that it works like cat.  If you run dcled with a list of\nfiles, it will cat each of those files to the message board.  If you dont name\nany files at all, dcled reads from stdin, so that you can use it as a pipe.\nThere is also the --message=\"\" option in case you want to send a single line to\nit.\n\nEXAMPLES:\n\nRun a test pattern:\ndcled -t  \n\nHello World:\ndcled -m 'Hello World!'\n\nHello World part 2:\necho 'Hello World!' | dcled\n\nHell World part 3:\necho Hello \u003ef1\necho Hello \u003ef2\ndcled f1 f2\n\nIf you want to have dcled run as a clock all the time, try adding using the clock and repeat options.\n\ndcled --clock --repeat\n\nAs of dcled 1.6, you can call the preamble type either by number or by name:\n\ndcled -p static -m \"Hello World\"\ndcled -p 2 -m \"Hello World\"\n\nTo see a demo of all the preamble types, run the test pattern:\n\ndcled --test\n\nHere is how I use it to monitor my game server syslog file:\n\ntail -f syslog | dcled -e -p static\n\nWHAT IS UP WITH BCDCLOCK?\n\nA couple of the guys at work have these LED desk clocks that show the time in a\nform of binary notation called 'BCD'.  That stands for 'binary coded decimal'.\nThe clock is showing the time like normal- 2:25:29 for twenty nine seconds\nafter two twentyfive for example- but instead of printing it like normal, each\ndigit is printed as a column of binary bits.  The 1 bit is at the bottom of the\nscreen, with 2, 4, and then 8 on top of it.  Here is an example-\n\n.....................\n.....................\n.....................\n.................O...\n...........O.........\n.....O...O.....O.....\n...........O.....O...\n   0 2   2 5   2 9\n\nHaving a BCD clock on your desk is pretty geeky... but I think having a USB\nprogrammable one that can scroll messages too is even better!\n\n\nWHAT IS UP WITH THE FONT FILE FORMAT?\n\nI was cleaning out my postmaster mail box and saw that Stefan Misch was having\na hard time mailing me at my usual adress.  Its a good thing that I thought to\nclean up the postmaster box, becuase it turns out he had submitted a patch that\nhard coded three new fonts into dcled!\n\nI felt really bad about having that patch sit around unseen for over a month,\nso to make up for it, I decided it was time to add loadable font files to\nthe project.  That, and it was raining.\n\nIf you want to add a font of your own, check out one of the .dlf files included\nin the distribution.  The first five lines of the file are the header, and are\norder dependant.  i.e. The \"Descirption\" data has to appear on the third line\nof the file.\n\nAfter the header comes the individual character definitions.  Each charater is\ndefined on an 8x7 bitmap.  The Size parameter in the header tells how much of\nthe 8x7 bitmap is actually used by the font.   The characters don't all have to\nbe defined, and they don't have to appear in order in the file.  The first\ntwo-digit hex number determines which ascii character being defined.  The next\ncharacter is skipped by dcled, it is just there as a human readable hint for\nwhat the character is.  The next seven numbers are the row data for the\ncharacter bit patterns.\n\nThe default location for font files is /usr/local/share/dcled.  Put your .dlf\nfile into that location and dcled will try to load it.\n\n\nWHAT IS UP WITH MOVING TO LIBHID?\n\nI got a message from Sam Dineley about a problem he was having with dcled under\nkernel 2.6.24. It looks like there is a problem with the linux usbhid driver\nthat is causing a large number of warnings to be klogged when the display is in\nuse. I bumped my kernel to 2.6.26 and am getting the same problem. The display\nstill seems to work, although it is very slow, and the error messages fill up\nthe logs. Sadly, it seems that the usb bus will eventually lock up too under\nthese conditions.\n\nI started looking at what could be going wrong, but this is an area of the\nsystem that I have no familiarity with at all- this program was my first visit\ninto the land of usb programming. This looks to be a problem with the linux\nusbhid driver, but maybe there is something that my program or the messageboard\nhardware is doing to trigger the problem?  Who knows.  As soon as I saw the\nlinux hid 'quirks' section in the kernel, I figured that this was an area of\nexperimentation that would have to wait for some other rainy afternoon.  I'm in\nCalifornia and we are in the middle of a drought, so there it sat.\n\nIn the mean time, Michael Wensley was smart enough to make dcled work with\nlibhid, and kind enough to show me how he did it.  It seems to work without\nerror on my systems, so there we go!  Problem solved.\n\n\nCREDITS:\n\nI used the docs written by Alvin Wong of Dream Link to get the device protocol\nright.  Way to go with releasing hardware specs!  Awesome!\n\nI took the font data from pictures of the X11 \"5x7\" font.  Its a long story.\n\nAdditional contributions made by:\n\n  * Sam Dineley     - Bug reports\n  * Andy Scheller   - Clock code, redrew the 'g', great feedback\n  * Michael Wensley - Application of libhid clue stick\n  * James Bruce     - First to get it to compile under Mac OSX.\n  * Glen Smith      - Wrote the spiral and fire animations.\n  * Raymond         - Initial udev rules file\n  * Thomas Ilnseher - Bug reports\n  * Robert Flick    - Fast Print mode for keeping a still message displayed,\n                      Mac Homebrew build formula.\n  * Stefan Misch    - Created the small, sga, and small_inv fonts\n\nIf you want to contribute to dcled, send me your code diffs!  Be sure to\nspecifiy if you DONT want me to include your name or email address in the\ncredits.\n\n-jsj\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkost%2Fdcled","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkost%2Fdcled","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkost%2Fdcled/lists"}