Jump to content
IGNORED

TIPI Usage and Support


jedimatt42

Recommended Posts

5 hours ago, jedimatt42 said:

TIPI's Samba configuration for /etc/samba/smb.conf:


[TIPI]
comment=TI-99/4A Files
path=/home/tipi/tipi_disk
public=no
browseable=Yes
writeable=Yes
only guest=no
guest ok=Yes
create mask=0644
directory mask=0755
force user=tipi

 

then, you should be able to force some restarting:

 


sudo systemctl reenable smbd
sudo systemctl restart smbd

If there are issues, they'll be in the /var/log/daemon.log, I believe... you can also

 


sudo systemctl status smbd

 

Still an issue it seems...

tipi@tipi:~ $ sudo systemctl reenable smbd
Removed /etc/systemd/system/multi-user.target.wants/smbd.service.
Created symlink /etc/systemd/system/multi-user.target.wants/smbd.service → /lib/systemd/system/smbd.service.
tipi@tipi:~ $ sudo systemctl restart smbd
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
tipi@tipi:~ $ sudo system ctl status smbd
sudo: system: command not found
tipi@tipi:~ $ sudo systemctl status smbd
● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2021-07-21 20:20:16 CDT; 30s ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 21710 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)
  Process: 21711 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=127)
 Main PID: 21711 (code=exited, status=127)

Jul 21 20:20:16 tipi systemd[1]: Starting Samba SMB Daemon...
Jul 21 20:20:16 tipi smbd[21711]: /usr/sbin/smbd: error while loading shared libraries: libldb.so.1: cannot open shared object file: No such file or directory
Jul 21 20:20:16 tipi systemd[1]: smbd.service: Main process exited, code=exited, status=127/n/a
Jul 21 20:20:16 tipi systemd[1]: smbd.service: Failed with result 'exit-code'.
Jul 21 20:20:16 tipi systemd[1]: Failed to start Samba SMB Daemon.

 

Edited by Vorticon
  • Thanks 1
Link to comment
Share on other sites

Make a couple images. .as cards are cheap. I have a mapped drive on my PC pointing to the raspberry pi and am constantly making backups because my daily code writing changes as I progress on the program I'm writing. But I can also reach it with my cellphone and backup to the pi after a bunch of photos or docs I downloaded since my automated backup will get it off the pi later.

Edited by GDMike
  • Like 2
Link to comment
Share on other sites

21 minutes ago, arcadeshopper said:

Yes it's in the wiki open PI.HTTPS:URL

I am working on some searches, but can you point me there?  I just went through to wikis and an FAQ and could not find specs on this.

 

Via a Google search, I found your blog which shows syntax example

OLD PI.HTTP://ftp.whtech.com/Users/Gregory%20McGill/TIPIMAP/TIPIMAP

https://www.arcadeshopper.com/wp/category/tiblog/

 

I might need some assistance sometime in the next month or so.

  • Like 1
Link to comment
Share on other sites

8 minutes ago, OLD CS1 said:

I am working on some searches, but can you point me there?  I just went through to wikis and an FAQ and could not find specs on this.

 

Via a Google search, I found your blog which shows syntax example


OLD PI.HTTP://ftp.whtech.com/Users/Gregory%20McGill/TIPIMAP/TIPIMAP

https://www.arcadeshopper.com/wp/category/tiblog/

 

I might need some assistance sometime in the next month or so.

https://github.com/jedimatt42/tipi/wiki

 

specifically https://github.com/jedimatt42/tipi/wiki/PI.HTTP

 

also you can do https servers and full io with 

 

https://github.com/jedimatt42/tipi/wiki/PI.TCP

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, OLD CS1 said:

Two questions remain unanswered: I am assuming OLD is a GET request, but what is the user-agent string? Also, how is SAVE handled via a URL at the http protocol level?

 

PI.HTTP works more like this:

 

The PI performs a file transfer of the URL, such as with curl... Then depending on the operation requested, it attempts to OPEN or LOAD the file. If it was a LOAD ( like when BASIC does OLD ) then it is a one and done program image... if it is an OPEN, the file is converted to a bunch of records, and held in memory until CLOSE or you revisit the title screen.

 

There is no SAVE to the PI.HTTP, or WRITE, those operations will return an error. 

 

I don't set an explicit user agent, or special HTTP request headers... https://github.com/jedimatt42/tipi/blob/be9f31256ebca10940406428141164886a1d65c3/services/CurlFile.py#L156  <- Oh, hey! it's not a curl, but a wget shell command - I think that was because wget had pretty favorable defaults... 

 

PI.TCP opens a socket... you can OPEN, READ, WRITE, and CLOSE...you cannot seek ( RESET ) and whatever you send needs to be compatible with the server hosting that port. There is no automatic insertion of newlines or anything like that... if you need to send a CR, then you send a CR ( CHR$(13) )

 

PI.TCP does not do SSL, and you have to implement whatever application layer protocol in the TI side software.. You can implement HTTP POST this way.

Link to comment
Share on other sites

23 minutes ago, OLD CS1 said:

@jedimatt42 Any chance I can convince you to add a -U or --user-agent= to your wget?  Classic99 uses "Classic99TipiSim/1.0" as its user-agent string.  Something similar would help automatically identify the TIPI.

Sure... that'll be easy enough... I'll include the substring "Tipi" to allow a common matching criteria on the server.

 

edit: easy enough for sure... it'll look like "ti994a-Tipi/2.30" where 2.30 is the TIPI PI side version number.

 

I'll release the update after caffeine and breakfast tomorrow.

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

6 minutes ago, OLD CS1 said:

Rock on!

 

So, no SAVE with PI.HTTP and no PI.FTP.  Now I am sad.  Does the TIPI include curl?

 

I've implemented FTP in 4A space: https://github.com/jedimatt42/ti99-ftp

 

Originally I implemented PI.HTTP directly in python... but then had trouble with certs and HTTPS support, so just started delegating to an OS tool... I should add a more generalized PI.WGET that handles all the url types it supports... 

  • Like 1
Link to comment
Share on other sites

41 minutes ago, jedimatt42 said:

I've implemented FTP in 4A space: https://github.com/jedimatt42/ti99-ftp

 

Originally I implemented PI.HTTP directly in python... but then had trouble with certs and HTTPS support, so just started delegating to an OS tool... I should add a more generalized PI.WGET that handles all the url types it supports... 

Gotcha.  My goal is to be able to host files which are accessible from the TIPI via OLD and SAVE.  Not a big deal if you are using system tools.  wget and curl work just fine.  For my saving purposes, curl -F would work just fine. Something like

curl -A 'Tipi/2.30' -F 'TIFILES=@filename' https://web.site/user/

(bear in mind, I do not have a TIPI yet... so I will have to pester @Tursi, too :))

  • Like 3
Link to comment
Share on other sites

I would argue that isn't your goal. Sounds like a solution proposal to an actual goal.

 

Posting to web servers is extremely specific to the server. 

 

If I am going to offer SAVE over PI.HTTP, I think I need to offer the server it can save to. Along with authentication in the very least. User agent isn't good enough as I am prone to angering bad actors that could retaliate against the user base. Something like a 4A writable NETRC that holds extra user details per server to pass as headers...

 

I haven't gone down that route, cause it is easier to use the Linux OS to configure synchronization of a folder under 'tipi_disk' and satisfy most general goals. Using tools like ssh certs and rsync. Or other suites like owncloud, nextcloud, or their big commercial friends.  Then you get normal full set of file operations from the 4A. 

 

PI.HTTP acts more like RS232. than DSK1. presently, from a device point of view.

 

None of that is a 'no', but rather a request for use case details and brainstorming.

 

Might also be time to write up file sync solutions... 

Link to comment
Share on other sites

@Vorticon noticed, that TIPI's /BAS /XB DV80 to PROGRAM image loading doesn't handle lines longer than 80 characters...

 

What should the line continuation be? This will require pre-processing before sending to xbas.py ( which I already do to extract the DV80 into a linux text file... ) so I can join lines together before conversion to PROGRAM image.

 

?? next line starting with a number could indicate not to join... no number would indicate to definately join... 

 

Or maybe the better solution is to use TIDBIT syntax... IDK if it joins lines automatically or not?

 

Link to comment
Share on other sites

14 minutes ago, jedimatt42 said:

What should the line continuation be? This will require pre-processing before sending to xbas.py ( which I already do to extract the DV80 into a linux text file... ) so I can join lines together before conversion to PROGRAM image.

?? next line starting with a number could indicate not to join... no number would indicate to definately join... 

 

Or maybe the better solution is to use TIDBIT syntax... IDK if it joins lines automatically or not?

 

 

I thought about that while taking a walk few moments ago and also came up with the idea to look for the line number as indicator of the new line.

Link to comment
Share on other sites

1 hour ago, jedimatt42 said:

I would argue that isn't your goal. Sounds like a solution proposal to an actual goal.

 

Posting to web servers is extremely specific to the server. 

 

If I am going to offer SAVE over PI.HTTP, I think I need to offer the server it can save to.

I promise I am not hiding anything else.  Simply, if SAVE PI.HTTP produces a predictable submission, then it is easier to write the server-side.  I do not see it was your responsibility to provide a server-side solution, just document how it is done.  Using the curl I gave above, it is a simple matter in PHP to accept the submission.  To prevent anyone from over-writing a file, there will also be a token in the URL provided from the TI side so the TIPI side of things does not need to be more complicated than separating out the file from the URL.

 

The goal is, simply put, a repository for files to be stored and accessed via TIPI's available HTTP facility.  Nothing more, nothing less.  A TIPI-specific* web filesystem, if you will.  I was playing a little last night and it is feasible, but the back-end is going to be a bit of a bitch.

 

21 minutes ago, jedimatt42 said:

Or maybe the better solution is to use TIDBIT syntax... IDK if it joins lines automatically or not?

From https://dnotq.io/tidbit/tidbit.html

Quote
  • Long lines can be split by ending a line with .. (double period). These lines will be joined into one long line and the XB limit of 140 characters will be checked.
  • Lines that end with the XB multi-statement operator ::, THEN, or ELSE, or where an ELSE statement is on the next line, will automatically join the next line.

Is this what you meant?

 

* Though it need not be limited to the TIPI.  So long as the page knows that the file is in the PUT field TIFILES and there is an authentication token in the URL, it can accept the submission.  There are some minutia to work out, like response codes for bad submissions (bad token, not in TIFILES format, &c.)

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

30 minutes ago, retroclouds said:

 

I thought about that while taking a walk few moments ago and also came up with the idea to look for the line number as indicator of the new line.

Does anyone already know... is it safe to join with a  ' ' (SPACE) or maybe I should only join if the line ends with a "::" so that the author is in control. 

 

Tidbit docs to the rescue

Link to comment
Share on other sites

5 minutes ago, OLD CS1 said:

I promise I am not hiding anything else.  Simply, if SAVE PI.HTTP produces a predictable submission, then it is easier to write the server-side.  I do not see it was your responsibility to provide a server-side solution, just document how it is done.  Using the curl I gave above, it is a simple matter in PHP to accept the submission.  To prevent anyone from over-writing a file, there will also be a token in the URL provided from the TI side so the TIPI side of things does not need to be more complicated than separating out the file from the URL.

 

5 minutes ago, OLD CS1 said:

 

The goal is, simply put, a repository for files to be stored and accessed via TIPI's available HTTP facility.  Nothing more, nothing less.  A TIPI-specific web filesystem, if you will.  I was playing a little last night and it is feasible, but the back-end is going to be a bit of a bitch.

 

There is a whole lot missing operation wise... no LVL2 IO support for anything under 'PI.' device. Only LVL3 (basically, the set of operations you can do from BASIC)

 

URI1-3. devices are aliases for PI.HTTP or PI.HTTPS.. so they inherit the functionality and restrictions. In theory if a CATALOG is implemented by the server, and it sends back something like a TIFILES DIS/FIX38(or whatever, I always get that wrong) with the catalog data, then something versatile like older DM2K's might even browse it. A couple people have proven this theory. 

 

5 minutes ago, OLD CS1 said:

 

From https://dnotq.io/tidbit/tidbit.html

Is this what you meant?

Awesome! Thanks! 

  • Like 1
Link to comment
Share on other sites

A RESTful API maps well to the DSR operations. I integrated JS99er with the Google Drive API some years ago, but because of increased security restrictions this it getting more difficult to maintain, and I'm not sure how well it works any longer. But if saving is allowed there has to be a way to authorize the user, and using a token issued by a public authentication provider like Google is probably the easiest way to go if you don't want to maintain your own use database and authentication server.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...