It's been a long-running joke that the Cemetech servers are hosted on an array of CSEs somewhere and given the performance of the Minecraft server, I'm inclined to take it as fact :P However, earlier today I was able to actually run a webserver on a CE, using jacobly's USB libs, a USB ethernet adapter, and the uIP network stack. The site is currently (at the time of this writing - it will probably go down in less than an hour) online at http://commandblockguy.xyz:33998. When it does go down, you can still see a backup of the site on the Internet Archive.

This was relatively simple to set up. I basically just copied the uIP code, and tweaked it to work with the CE's clocks and the USB ethernet device. The main holdup was actually with DHCP, as the example code that was included with uIP just didn't work - it entered an endless loop because it failed to acknowledge that it had received data.

I'm still making improvements to the code - I think the next step will be to replace the checksum and 32 bit arithmetic functions that uIP implements in C with faster ones written in assembly. After that, I'll post the code on my GitHub so that others can give it a try.

EDIT: I'm taking the server down now so that I don't run the battery down all the way overnight. I'll try to bring it back up about 5-5:30 PM ET tomorrow.
Good work, nice to see someone actually tackling this and opening a wide range of possibilities Smile
So you're using uIP indeed, I missed you on IRC yesterday to ask about that.
Reminds me of Samir Ribic's TCP/IP suite for the TI-68k series, nearly two decades ago.

You could certainly remove the USB / Ethernet adapter requirement by keeping the standard USB descriptors and using a computer-side USB / Ethernet software adapter, preferably based on libticables for reasons related to Windows driver annoyances (on other OS, you could do raw libusb), though I'm of course biased. From a browser environment, while WebUSB should be able to do the USB side of the job, I'm not aware that one can inject and receive arbitrary packets on layers 2-3-4 (ARP and above)...
Update: the server is back up again at http://commandblockguy.xyz:33998/, for now. I've disconnected the battery and connected it to a DC power supply so that I can leave it up without worrying about discharging the battery. Ping me on SAX/IRC/Discord if it goes down.
Wow, that is really quite impressive! I always thought the internet struggled on devices with limited ram and processing power. I guess that has more to do with either bloated or deprecated software than actual hardware capabilities.

Maybe that running joke can become a reality Razz . It would take a seriously massive bank of CSE's, though.
I would love to see a video of how this works. Wink

Anyway I find this useful good job!! Smile
Amazing work!!!

So, this is really attention-grabbing! Like, I love this idea!

But can something like this be made into more of like a web browser on a CE? Like, is a web browser possible??
Yes, though I really don't feel like writing a UI for it.

Also, the calculator wouldn't be able to handle most webpages today. This page here is 42 KB with another 6KB of stylesheet data, and Cemetech is really simple as far as webpages go. I imagine that it would use even more memory than that to actually render a page, even if you were really clever with memory usage. Modern pages also heavily rely on Javascript, which simply isn't happening on a calculator.
commandblockguy wrote:
Yes, though I really don't feel like writing a UI for it.

Also, the calculator wouldn't be able to handle most webpages today. This page here is 42 KB with another 6KB of stylesheet data, and Cemetech is really simple as far as webpages though. I imagine that it would use even more memory than that to actually render a page, even if you were really clever with memory usage. Modern pages also heavily rely on Javascript, which simply isn't happening on a calculator.


That’s unfortunate to hear Sad

But, if the calc has to be used with an Arduino, couldn’t it be possible *if the usb libs support this* to maybe have internet passing through to the calc, like this project, but also maybe having a sort of memory expansion, like using a flash drive with it too?
I DON’T KNOW HOW ARDUINO chips work, or if the usb libs support 2 inputs, or even if memory expansion is possible on a CE... I just don’t know...

Either way, I wish the best for this project!
I'm not using an Arduino with this. This is directly connected to my router via a USB ethernet adapter. You could use an external drive as swap space, but it would be slow. If you are using external hardware anyways you might as well just use VNC or something like browsh to stream in a website from a proxy server.
commandblockguy wrote:
I'm not using an Arduino with this. This is directly connected to my router via a USB ethernet adapter. You could use an external drive as swap space, but it would be slow. If you are using external hardware anyways you might as well just use VNC or something like browsh to stream in a website from a proxy server.


Oh my bad, I wasn’t sure about the Arduino. When I’m replying, I cannot see earlier posts on mobile Safari.
I think I'll make this into an actual library so that other people can use it too. Before I do that, though, I feel like I need to decide on a suitably cool name for it. A lot of other calculator projects have used scientific or technical names (e.g. Cesium, Xenon, KryptonIDE), so I was considering the names "Callosum" and "Vinculum," which are both anatomical terms that refer to specific things that connect other things together. I'm open to name suggestions of any kind if anyone else can think of anything clever. The name would only refer to the library for the Ethernet / ARP / IP / TCP / UDP / DHCP components, and the webserver will be a separate project that uses that.

Also, should I create a new thread for the library, or continue using this one?
commandblockguy wrote:
I think I'll make this into an actual library so that other people can use it too. Before I do that, though, I feel like I need to decide on a suitably cool name for it. A lot of other calculator projects have used scientific or technical names (e.g. Cesium, Xenon, KryptonIDE), so I was considering the names "Callosum" and "Vinculum," which are both anatomical terms that refer to specific things that connect other things together. I'm open to name suggestions of any kind if anyone else can think of anything clever. The name would only refer to the library for the Ethernet / ARP / IP / TCP / UDP / DHCP components, and the webserver will be a separate project that uses that.

Also, should I create a new thread for the library, or continue using this one?

Great idea! I'd love to tinker with it, and I'm sure a lot of others would too! This project would take all the low level grunt work out of making web projects with the CE, which is definitely something to look forward to.
Regarding a name, notice that all the other projects you mentioned are based on chemical elements specifically. If you would like to stick with that theme but also refer to the fact that it bonds things together, you could maybe go for Fluorine for its extremely high electronegativity.
Wow this is amazing! I've always wanted to try and get a webserver running on my Nspire under linux, but never had an ethernet adapter to make it work. Even getting that running though would be a lot less impressive than what you've done here. Now the next step is to add the ability to write web applications in BASIC on the calc Razz
This is just amazing! I learned about this from TheLastMillennial, and I wanted to try to replicate this. (Eventually my end goal is to get a basic web browser working, and yes I know that's a huge step. Just want to try!)

What USB / Ethernet adapter did you use? Or does it not matter?

This is just such a cool project. Thanks!
Any USB ethernet adapter that uses the USB CDC ECM protocol should work. Unfortunately, that's not the type of information that's usually available on an Amazon page, so it's hard to tell without actually buying it and checking the USB descriptors. Here's the one I use, which is basically guaranteed to work: https://www.amazon.com/dp/B013G4CEQE/

You may also want to see my post about Nanotube, which has a link to actual code.
Okay thanks! I already have the Github page, since it was the first thing that comes up when you google, "nanotube ti 84 plus ce". I hope to be able to replicate these results. That actual nanotube post helps as well as the irCE post linked from that one. It's really interesting stuff! Thanks!
I think it'd be cool to use a hub and not just a normal usb to ethernet adapter since they are more useful Exclamation
  
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