So as some of you know I have been working on a silverlink clone and guess what.

IT WORKS Very Happy

Now the not so fun news, it's slow. 1.1KB/s average. Where as the original is closer to 4.4KB/s average. Why its so slow I honestly have no idea as of the moment.




Things it seems to not handle ATM. It does not like to overwrite variables. I think I know why that's the next thing to fix. And it occasionally freezes because I have not enabled usb reset yet (and other power save features).

Anyone have an arduino leonardo OR clone to test?

Source available here Very Happy
https://bitbucket.org/Geekboy1011/silverlinkclone
I do not have a leonardo.

I think it is great that it mostly works, great job!
How did you reverse engineer the USB side of this? I assume the serial side is standard TI protocol?
Yes the serial side is the standard half duplex DBUS protocol that most of their calculators use.

For the usb side I actually used a software side USB logger.

http://desowin.org/usbpcap/tour.html

With wireshark to be exact.



The packets get slightly mangled because they are what the software side sees but it was enough to figure out that the silverlink just expects the raw Ti Link Protocol data encapsulated in a bulk USB transfer packet and then the controller parses and sends that appropriately. The hardest part was actually dealing with the fact that the silverlink is designed to only receive/send 32 bytes at a time which makes things kinda hectic.

I need to spend more time with the logger trying to see why its failing on certain request types and which ones they are and I need to case them out. Hopefully there Isn't anything glaringly wrong with it. I also wish I knew why it was so slow :/ I currently have no idea where it is being bottle necked. I/O or USB side. I am told it matches the speed of the old grey/serial link so I am not to unhappy with it seeing as it was coded in less then a weekends amount of time total. (Actually the entirety of the code that is in there now took 2 hours to get USB functional Then 3 rewrites to get the actual data handling working working. The final rewrite of which only took this afternoon So I am happy with it even in its half functional state!)
Have you tried digging into libticables?
I have looked in to it briefly to double check some of the stuff I was doing on the USB end of things. Mostly making sure that I was sending / receiving data appropriately over USB Due to my lack of knowledge on USB.
Other then that I have not looked very far into libticables AFAIK they implement talking to a silverlink which I just use TiLP to do for me when I need to test things (This also works with Ti Connect as of the moment which tells me I am doing something right Very Happy )
Yeah - I was just thinking it might be useful to automate some test cases at a lower level than TILP, and give you somewhere to check how the protocol is defined rather than having to infer from packet logs.
Cool hack Smile
Is that the first workable SilverLink clone ?

Quote:
it was enough to figure out that the silverlink just expects the raw Ti Link Protocol data encapsulated in a bulk USB transfer packet and then the controller parses and sends that appropriately.

Yes, that's "hidden" in plain sight in the libticables source code. I mentioned the relevant files on IRC Wink

Quote:
Yeah - I was just thinking it might be useful to automate some test cases at a lower level than TILP, and give you somewhere to check how the protocol is defined rather than having to infer from packet logs.

elfprince is right. You could use test_ticalcs_2 (libticalcs: tests folder) and titools (by Benjamin Moody, modified by Jonimus). Jonimus added tidump to use the 83+ family direct memory dump command, which is about the most difficult test you can inflict to your SilverLink clone (on the receiving side).
You could add a pair of command-line tools: one for ROM dumping through the optimized libticalcs ROM dumping protocol, one for sending an OS. Each command-line front-end is pretty simple.

For testing purposes, assuming the Arduino's USB controller can do the job (unlike the TI-Z80, TI-68k and Nspire's controller, the Arduino's controller is not host-capable, at least in multiple revisions of the Arduino, and non-host-capable controllers usually have additional functionality limitations) it would be interesting to use a max packet size higher than 32 bytes. 64 bytes for a start, or 128 bytes. libticables is supposed to use the packet size embedded into the USB descriptor; it packet sizes > 64 bytes don't work due to libticables, I'd consider this a bug in need of fixing.

FWIW, I have an Arduino Uno (originally bought for usage as a CALCnet bridge), and I have some wire-ended link cables somewhere.
I honestly have no idea if it is the first functional silverlink clone out there.

I remember that, though I had figured that out before you linked that iirc.

I actually did dump a rom with it already. It reported a steady 2KB/s which was rather nice.

As for raising the max packet size I intend to do just that once I get it fully functional and stuff then I will start tweaking it for performance/any other crazy hack we can do.

Cased in error code support seems to be a little happier now with regards to everything. Save TiLP. it does not like to give proper errors in TiLP, works fine in Ti Connect though.
Good luck cleaning up the code! I think the hardware you're using probably explains the speed difference. I'll glance more thoroughly at your code at some point, but I suspect you're not doing anything terribly inefficient that is causing the slowdown relative to the real Silverlink.

Edit: For those who don't bother reading the Cemetech front page much, I posted news about this project:
Cemetech front page wrote:
Texas Instruments' Silverlink is a product to connect calculators without USB ports (namely everything except the TI-84 Plus series and the TI-89 Titanium) to computers' USB ports to transfer files, screenshots, and operating systems. The Silverlink was first introduced about fifteen years ago, and the early models are already starting to show their age. A number of Silverlinks, including my own, have failed over time, and we anticipate that the rest will gradually lose their firmwares (with no way of repairing them) in the next decade or two. To fill this gap, ideas for a community-coded Silverlink clone have been kicking around for several years. Tim "geekboy1011" Keller has taken the initiative in creating Silverlink clone software for the Arduino Leonardo (ATmega32U4) microcontroller development board.

Tim started from my Arduino to TI calculator linking routines, which he ported from Arduino "C" to bare-AVR C. He was able to deduce the file transfer protocols from a combination of USB sniffing, the venerable TI Link Protocol & File Format Guide, and occasional sanity-checking against the TILP repository. Tim is using the LUFA library for AVRs to handle USB; the flexibility of the library lets his Silverlink clone appear to be an original Silverlink to the host computer, and thus requires no new drivers. Since it appears to be a regular Silverlink to computer-side software, Tim's clone works with both TI-Connect and TiLP, the two popular software options for linking TI calculators and computers.

We look forward to Tim's continuing work on this project, and hope this and other projects will help retired calculators to remain useable and useful for many years to come. You can find more information about this project as well as an ongoing project log in the topic linked below.

More Information
SilverLink clone information and progress log: Cemetech, Omnimaga.
Cemetech source article: A Silverlink Clone to Rescue Pre-USB Calculators

If I am not having slowdowns on the I/O side of communications it might be worth looking into how usb actually works and stepping away from lufa. I have no idea of the restrictions imposed by lufa and or how much cruft may/may not be in its routines when put next to mine. I could very well be calling functions for no reason other then well I can. But function first speed second.
Is that an Adafruit display I spy?
yes it is that is an adafruit 128*32 OLED spi display I love it. Though it is currently not hooked up it just happens to live on my breadboard Razz
Planning on rewriting this to use an interrupt based scheme to make it more stable and hopefully fix the issues with it randomly hanging that I have not yet figure out.

Note: Before doing that write a counter that runs after the usb call and if its > x send a message over serial to see if we have hung.
Regarding the speed: are you using the digitalWrite/digitalRead commands? Direct port accesses are significantly (around 50x) faster, and they're not very difficult.

http://www.arduino.cc/en/Reference/PortManipulation
Well assuming you did not read the thread. Yes I am doing manual port manipulation I actually do not use the arduino code base at all! The slowness has not been figured out why yet nor have I actually put time into this project in a week now been working on other stuff. I might start working in this again this weekend though.
Sorry about that. I admit I skimmed heavily when reading through the thread.

However, I'd love to take a look at the source. I have a leonardo board handy and not tied up in any particular project.
Where do I go to get a copy of this program?
roryyamm wrote:
Where do I go to get a copy of this program?


What are you trying to accomplish? If I'm reading this topic correctly it sounds like they were talking about the USB connection and communication. Are you looking for the program they made for the calculator and computer? Or something else entirely?
Alex wrote:


What are you trying to accomplish? If I'm reading this topic correctly it sounds like they were talking about the USB connection and communication.


That's exactly what I'm talking about, too - my silverlink died, and I've been trying to rig up a replacement USB connection, paranoid that the next Silverlink I buy will just do the same thing.
  
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 2
» 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