Update

At long last, the first publicly available pre-release/testing release is out -- Version 0.0.92. We have done significant testing of the portions that work, but as always, issues may arise that we are unaware of. You may head to http://titrek.us/downloads.php to obtain this version.

What Works this Version

- Splash Screen and all menu options
- Log In, Registration, Disconnect
* test the ever loving Jesus out of those and we will push more updates through the autoupdate system as they are implemented.

Features Added:

- About Screen
- Program and Graphics Autoupdate (untested -- can only be tested when updates are available)
- ship initialization implemented, but sending to client not yet implemented

This program requires the C libraries, as well as USBDRVCE and SRLDRVCE. If you do not have these, you will see a red alert message on your splash screen indicating that "Networking disabled!". You will also see this is networking fails to initialize on your device for some reason. You may see this message for a few seconds before it disappears, which indicates that you serial driver has properly initialized. At this point, you can initialize the bridge for calc to server communication. The bridge, graphics, and client are all available at the project website via the link above.

The bridge folder has a config.json within it. That file has 6 configuration options:

"server" : This is the IP address of the server to which you wish to connect. To connect to my existing test server, the IP is play.titrek.us. This server will eventually be packaged for others to run their own instances should they wish... in this case, substitute that IP with the correct one.

"port" : This is the port on which the server is run. To connect to my test server, the port number is 51701. As with the previous config option, if you are hosting your own instance, you replace this with your own port.

"debug" : This flag determines whether debug information about the connection is printed to the Terminal as you use the bridge. This debug information includes packet size word and control code of the sent packet (useful for determining if your calculator is responding to server correctly. To assist with this, the Control Codes are public at https://github.com/acagliano/titrek-calc/blob/master/src/network/controlcodes.h)

"mode" : This flag determines whether the bridge will initialize into serial mode (for calc to server) or pipe mode (for CEmu to server). The valid values are:
serial | default (for calc to server)
cemu | pipe (for CEmu to server)

"pipe-in" | "pipe-out" : This is the path to temporary "pipe" files that are used by CEmu to emulate the serial library. This particular mode can take a few tries to initialize properly due to wonkiness with the initialization/file existence checking. Try starting CEmu once, then launch the game, let it create the pipe files, then quit CEmu completely, restart CEmu, start the bridge, then relaunch the game. I have had moderate success with this procedure.


Any questions pertaining to the bridge can be directed to commandblockguy.
Questions pertaining to the server, to beck.
Questions pertaining to the client or website, to me.
You can of course contact all of us via the project Discord at https://discord.gg/DBUXE6U
Please use discussion for general questions/conversation suggestions. And bug reports for bug reports.
Sorry for the (stupidish/newbish) question, but where can I find the USB drivers? Laso, would you mind giving a little more detail on how to set up a bridge? Also, my apologies if I asked this in the wrong place, I was a little bit confused.
TIny_Hacker wrote:
Sorry for the (stupidish/newbish) question, but where can I find the USB drivers? Laso, would you mind giving a little more detail on how to set up a bridge? Also, my apologies if I asked this in the wrong place, I was a little bit confused.

I have placed links to all components of the project in the #updates channel on the project discord. The usb and srl drivers are there as well. The client, graphics, and bridge download are all also on the website's downloads page. The bridge is as simple as extracting the zip, then editing the config file as I indicated, and then running bridge.py in the command line. Also, this is a python3 program, not a python2 program. You will need to run it with `python3 bridge.py`. You will also need to install the serial module for python3, via `pip3 install serial`.

Also, after some testing with ONT this morning it appears that something within the project (command suspects the srldrv/usbdrv) doesn't play nicely with Windows and it's USB stuff. So if you have a Windows computer and experience issues with connecting to the calc with the bridge, let us know.
I tried that, but I keep getting this error:

Code:
Traceback (most recent call last):
  File "bridge.py", line 3, in <module>
    import socket, json, serial, serial.tools.list_ports, threading, sys
ModuleNotFoundError: No module named 'serial.tools'

I'm using an iMac running OSX 10.9.5, if that helps.
TIny_Hacker wrote:
I tried that, but I keep getting this error:

Code:
Traceback (most recent call last):
  File "bridge.py", line 3, in <module>
    import socket, json, serial, serial.tools.list_ports, threading, sys
ModuleNotFoundError: No module named 'serial.tools'

I'm using an iMac running OSX 10.9.5, if that helps.


You need to install the serial library.

Code:
pip3 install serial

(might be pyserial).
You will need to install pip3. Homebrew or build from source or macports will handle it nicely for you.
I tried what you said, and it seemed to work, but it just keeps saying "Logging you in...". I went to play.titrek.us and tried to log in but nothing happened. Any idea what is going on?
TInyHacker, it is possible that the account you created bugged out... triggered an exception and thus didn't respond to you. We have an issue with the server at present where new users aren't getting account.json files created for them... we're working on that. It could be what's afflicting you. What username did you use?

Also this is an Urgent suggestion request, as it's a matter of server security. And I need advice from those among us who are more skilled with security than I am. I know my way around it decently, but you know...

Anywho, I logged into the server yesterday to investigate some things and found two very strange directories created... one named ''$'\036' and another named ''$'\f'. I found these highly concerning, as they seemed hacker-esque to me and command also affirmed they look like attempts at shell access. As it stands presently, I genuinely doubt that passing data like that to the server *can* trigger shell access, as the server is very stringent about how it parses the data, but nonetheless, I want to implement some additional security both in-service and out-of-service.

Firstly, my intent is to make sure that every connection starts with the login packet. And to automatically drop any packet that contains special characters coming from the user. Every connection attempt will, if it's coming from the calculator. I can use this to my advantage, causing any connection attempt that does not begin with Login to add that IP address to a list of malicious IPs and immediately disconnect the IP. I will also have the service itself reject any connection attempt from an IP on that list immediately. Also, I plan to write a cron script that parses the malicious users list and adds those IP addresses to an iptables custom rule chain.

Any other suggestions?
That's precisely the sort of thing fail2ban is designed to do.
Security we settled upon:
If the first packet is not a Login, disconnect the user.
If the message contains forbidden characters, respond with "Bad Format" and drop the packet

We've also implemented a fail2ban compatible logfile output for when events like this trigger, so that, if the two methods above prove insufficient, we can point a custom fail2ban jail at the server's malicious.txt log.
@ACagliano I used the username TInyHacker.
TIny_Hacker wrote:
@ACagliano I used the username TInyHacker.

I highlighted you in the project discord.
Odd... I tried what you said but it still just says "Logging you in..."

EDIT: I tried creating a new account, but it didn't work. The calculator acted like I was signing in with an already existing account, except it never finished "Logging you in..."
TIny_Hacker wrote:
Odd... I tried what you said but it still just says "Logging you in..."

EDIT: I tried creating a new account, but it didn't work. The calculator acted like I was signing in with an already existing account, except it never finished "Logging you in..."

If you already logged in (successfully) once, it saved your login stuff. You can press the [Del] key right after pressing <Play Game> to reset the login buffers and re-input your info. Also run the bridge in debug mode and let me know what you see.
I tried creating a new account again and it still said "Logging you in..." Here is what was in the debugger:

Code:
Running in debug mode.
Connected.
Serial listening.
^C to exit.
C->S: Type   1, size 23
C->S completed:  23


After I quit the bridge, I got this:


Code:
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/serial/serialposix.py", line 483, in read
    ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
Are you on CEmu?
If so try it from a physical calc, and set mode to serial in the config. The pipe mode is buggy still.
I have been using it from a physical calc. It could be I have the config.json file incorrectly set, I will check about that.
Yea, let's see your config options for it.
Here is what I had (I didn't really know what to put in, I kinda just guessed):

Code:
{
   "server": "play.titrek.us",
   "port":   51701,
   "debug":  true,
   "mode": "serial",
   "pipe_in": "/tmp/cemu-fromcalc",
   "pipe_out": "/tmp/cemu-tocalc"
}
Are you on Windows? If so, do you have TI-Connect? If so, it's conflicting with the serial drivers for this.
I am on Mac, as I said earlier. Maybe I have too old of an OS? I am using OS X 10.9.5. I do have TI-Connect, but I don't think that is the problem if I am not on windows.
  
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
» Goto page Previous  1, 2, 3 ... 7, 8, 9, 10, 11  Next
» View previous topic :: View next topic  
Page 8 of 11
» 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