Author Topic: IRC on the Nspire  (Read 25732 times)

0 Members and 1 Guest are viewing this topic.

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
IRC on the Nspire
« on: March 24, 2012, 05:17:07 pm »
Hi :)

I have written a tiny IRC client for the Nspire using RS232.
It requires a program on the PC to be running that forwards a TCP connection to the calculator.
The IRC protocol is completely handled by the Nspire.

At the moment it is really limited, it can join one channel and read/write messages, it can view status changes, joins/parts and receive PMs.
It is based on Nspire I/O (1.0) and I'm currently updating it to work with 2.0 which would make it possible to have multiple channels, IRC color codes and more.
I won't release the source of this version, because it is really messy and buggy, but maybe I'll release a better version of it in the next days :P



The PC software is written in Python. It waits for IP/Host and port to be sent from the calc and then opens a socket.




And this is how the next version will probably look like :)


Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: IRC on the Nspire
« Reply #1 on: March 24, 2012, 05:27:39 pm »
O.O

That's impressive!
* HOMER-16 wonders if this will go like gCn and Gossamer and well eventually see an internet browser for the Nspire. :P

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline renatose

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 209
  • Rating: +4/-0
  • watch out the power balls
    • View Profile
Re: IRC on the Nspire
« Reply #2 on: March 24, 2012, 05:37:02 pm »
Gr8 :D try to connect it to the omnimaga IRC channel once it is more stable ;)

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: IRC on the Nspire
« Reply #3 on: March 24, 2012, 05:39:33 pm »
That works already. I can get it there if you want ;)

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: IRC on the Nspire
« Reply #4 on: March 24, 2012, 05:58:12 pm »
Nice! How do you handle the serial connection? Do you use stdin, or talk directly to the hardware?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: IRC on the Nspire
« Reply #5 on: March 24, 2012, 06:00:37 pm »
Did you just create a gCn clone for the TI-Nspire? O.O

This is nice. We already have this for the 83+, as well as an internet browser (without cookie support and in text mode), so it would definitively be nice to see more internet-related stuff happen.

By the way if this wasn't for the extra hardware requirements, this would have big potential for online games on the TI-Nspire too, like some of the Cemetech 83+ games.

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: IRC on the Nspire
« Reply #6 on: March 24, 2012, 06:04:23 pm »
Nice! How do you handle the serial connection? Do you use stdin, or talk directly to the hardware?
I use direct HW access, because there are no asynchronous functions for reading available. And I don't have that annoying clock.

(Source of my UART functions here)

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: IRC on the Nspire
« Reply #7 on: March 24, 2012, 06:07:02 pm »
Hey, that's pretty cool :D

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline hellninjas

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 625
  • Rating: +17/-0
    • View Profile
Re: IRC on the Nspire
« Reply #8 on: March 24, 2012, 06:32:24 pm »
My mind has been blown!
Very cool job!

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: IRC on the Nspire
« Reply #9 on: March 24, 2012, 10:31:10 pm »
WOW!

Excellent Job!  This is Amazing! ;D


Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: IRC on the Nspire
« Reply #10 on: March 25, 2012, 08:01:34 am »
I use direct HW access, because there are no asynchronous functions for reading available. And I don't have that annoying clock.

(Source of my UART functions here)
Thanks  for the code!
I wanted to do something similar, but did not have the knowhow for direct hw access.

Great :)

Offline Chockosta

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 447
  • Rating: +169/-6
    • View Profile
Re: IRC on the Nspire
« Reply #11 on: March 25, 2012, 09:48:18 am »
Impressive !
This is really nice, great job...

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: IRC on the Nspire
« Reply #12 on: March 25, 2012, 11:26:42 am »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: IRC on the Nspire
« Reply #13 on: March 25, 2012, 12:46:10 pm »
Nice. I almost think it would be a good idea to make a front page news about it here too when there is a download available. :)

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: IRC on the Nspire
« Reply #14 on: March 25, 2012, 01:26:28 pm »
I'm currently working on a better version, but I'll have (most likely) no time for programming next week.
So, either I get the update finished today, or I will release the current (buggy and unstable) version later this evening ;)

EDIT:
I ran into some issues with receiving data with my own functions. Probably the FIFO of the internal UART gets filled too fast because I'm not handling any interrupts...
So, I won't get it finished today.

At least, my first version is working.
The server/port/nick/ident/realname/channel are hardcoded, so you'll have to recompile it if you want to change it (to compile it, you'll need this).
Attached is the source + a binary for the #omnimaga channel and, of course, the Python script ;)

Spoiler For default config:
#define SERVER "irc.prison.net"
#define PORT 6667
#define NICK "nspire"
#define IDENT "compu"
#define REALNAME "TI-Nspire IRC beta test"
#define CHANNEL "#omnimaga"

The python script has to be run first, then click on irc.tns - it should connect automatically.
Oh, and you'll have to change the serial port number in this line (+ you need to have pySerial installed):
Code: [Select]
port = serial.Serial(15,115200)
« Last Edit: March 25, 2012, 04:39:22 pm by compu »