I am trying to get TILP to automatically transfer files when i plug in my calculator. i added the following udev rule:


Code:
ACTION=="add", ATTRS{product}=="TI-84 Plus", RUN+="/lib/udev/calctransfer.sh"


which runs


Code:
#!/bin/bash
{
tilp --calc=ti84+ --no-gui --timeout=450 /home/pi/ti84/files/* >/home/pi/ti84/out.txt

}&


when i plug in my calculator, the output file appears containing the version and warranty info, but no files are transferred. running the shell script from the terminal transfers the files correctly. any ideas why it's not working when run from udev?
TILP's command-line interface is sub-par. Try again using titools instead ?
Try adding a small delay, maybe? Also, in TiLP's GUI, I always refresh the directory list before transferring stuff to reduce weird error messages; I don't know how relevant that is for the command line.
turns out using


Code:
tilp --calc=ti84+ --no-gui --timeout=450 /home/pi/ti84/files/*.8Xp
tilp --calc=ti84+ --no-gui --timeout=450 /home/pi/ti84/files/*.83p
tilp --calc=ti84+ --no-gui --timeout=450 /home/pi/ti84/files/*.8xk


works
Did you have any other things in /home/pi/ti84/files? And did it work when you manually typed "tilp --calc=ti84+ --no-gui --timeout=450 /home/pi/ti84/files/* >/home/pi/ti84/out.txt" into the terminal?

And wait a minute, how did you get TiLP working on a Pi?
Hitechcomputergeek wrote:
And wait a minute, how did you get TiLP working on a Pi?


Presumably 'sudo apt-get install tilp2'
libti*/gfm/tilp are portable Smile
Not only they can be compiled for (at least) Windows, MacOS X, Linux and FreeBSD, but also, on Linux, many ISAs are supported, as evidenced by the Debian builds:
https://packages.debian.org/sid/libticonv7
https://packages.debian.org/sid/libtifiles2-9
https://packages.debian.org/sid/libticables2-6
https://packages.debian.org/sid/libticalcs2-11
https://packages.debian.org/sid/gfm
https://packages.debian.org/sid/tilp2
I had to add root to plugdev. that was it. the udev rule was being executed by root, and it silently failed because root wasn't part of plugdev. I did the separate extensions because it would transfer all of whatever extension it found first and then stop. as for TILP on a pi, i just used synaptic. i guess someone already compiled it for rpi.
Nice, too bad you have to rename any .8Cp files you have to .8xp so TiLP will even send it to a TI-84 Plus C Silver Edition. *pokes Lionel Debroux*

EDIT: Wait, how come root can't access plugdev? I thought root was supposed to be able to access EVERYTHING. Like the SYSTEM account on Windoze.

Also, this might be a better way of doing it:

Code:

#!/bin/bash
{
cd ~/ti84/files;
tilp --calc=ti84+ --no-gui --timeout=450 *.8xp *.8xk *.83p;
} &
Quote:
Nice, too bad you have to rename any .8Cp files you have to .8xp so TiLP will even send it to a TI-84 Plus C Silver Edition. *pokes Lionel Debroux*

The work for identifying variable types through magic numbers has started, mainly by Benjamin Moody.
I think it still had to be a member of the group. that's about when it started working for me.
  
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