I briefly mentioned in #cemetech about a week ago a project I'm working on called "tinc", short for "TI netcat". My original plan was to write a program that can talk to a calculator and can either connect or listen for connections over the network. The current incarnation doesn't speak over the network but rather only over stdin/stdout, but it can still speak over the network with the help of nc (or perhaps even inetd). If I decide not to add networking functionality to tinc, I'll probably rename the project to "ticat".

I've been working with Lionel Debroux and Benjamin Moody to make it work with ticables reliably. Now it's at a point where it should be pretty stable (but it's still not ready for a real release yet). I've only tested it with TiEmu and Punix (not that the OS should make a difference).

Get tinc here: https://github.com/abbrev/tinc

Anyway, here's a little networked tinc demo (using nc for the network part):

Code:
$ mkfifo pipe
$ <pipe nc -l 8002 | ./tinc -c tiemu >pipe

In Punix on the calculator (TiEmu) I ran the "uterm" program, which is a terminal program that talks over the link port (kind of like minicom in *nix or Hyperterminal in Windows). Then I browsed to http://localhost:8002/ in Firefox.

In the following screenshot, the first 9 lines (11 lines with line wrapping) starting at "GET / HTTP/1.1" are the HTTP request from Firefox. The next 6 lines (starting at "HTTP/1.1 200") are the HTTP reply that I manually typed on the calculator. Firefox displayed the text "Hello world!" in plain text as soon as I hit enter on the last line. Hooray for an impractical web server. Smile




Another use for tinc is to use the Punix shell from a real terminal. This works only if Punix is listening for logins over the link port, which is not the case with the demo above (the link port can be opened only once at a time in Punix).

Anyway, here's a short run using the Punix shell in my Linux terminal:

Code:
$ ./tinc -c tiemu

server login: root
password:
stupid shell v0.2
root@server:~# help
available applets:
 tests     top       cat       echo      true      false     clear     uname
 env       id        pause     batt      date      adjtime   malloc    pid
 pgrp      poweroff  times     sysctltest ps        bt        crash     mul
 div       kill      time      exit      status    help
root@server:~# echo hello world!
hello world!
root@server:~# exit

server login:

This was actually my first use of tinc, but I think the HTTP demo is more impressive. Smile

I hope I can get tinc ready for release before too long, and I hope we all can find useful and innovative uses for tinc. I already thought about writing a VNC server for Punix as a sort of replacement for the TI screenshot functionality. Who knows what else we can come up with?


Edit to mention Benjamin Moody for help with ticables.
For a lack of anything more profound to post here, congratulations and great job! I'm sure there are a ton of things to do with this; feel free to look at some of the things I'm pondering with CALCnet/gCn for inspiration. And by the same token, I'm sure some of the applications that you design will be things implementable for CALCnet that I didn't think of.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement