Author Topic: A solution to HP connectivity problems  (Read 16879 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
A solution to HP connectivity problems
« on: October 20, 2013, 06:43:04 pm »
As you might have noticed, when you connect your HP Prime to the computer then open the Connectivity Kit software, it takes about 10 minutes before the software has finished displaying the entire calculator content. It is not as bad when you have a small amount of programs (takes around 30 seconds), but when you have about 30 KB of them, 10 minutes is what it takes (with some chances of the connection dying in the meantime), meaning that if you create a game that is 500 KB large, you'll most likely have to wait several hours before the software finally detects it, pretty much rendering transfer of any large files (or small files from an overcrowded calc) impossible.

In addition to that, the connectivity kit software itself cannot transfer files. The only way is to open the program code in the software, copy its entire content, then create a new program on the calculator and paste the code in there. Once done, you hit save, but the issue is that it takes about 30 seconds per kilobytes before the updated program finally appears on the calc and there is nothing telling you it's actually sending at all!

Also, in the connectivity kit, you cannot transfer anything to the calc until the software is done 100% reading the calc content. If you want to backup often, you better wipe out your entire calc content and only keep what you're working on.

The alternate way is to use the HP Prime emulator, which sends files directly to the calc. However, it comes with the same problem about slow file transfers and 90% of the time the emulator will stop detecting the calc after one minute or so, meaning you have to disconnect and reconnect it over and over and making the transfer of any larger file impossible.


Since it is unclear yet if this software will be updated anytime soon and work better, I wonder if it would be best to have third-party tools, such as a HPLP software (in reference to the TILP name)? Anyway I saw this post on TI-Planet at http://tiplanet.org/forum/viewtopic.php?p=150590#p150689 and I think that Lionel and Critor might have started doing so, so I thought I would bring this up in case anyone with the knowledge or time to do it would be willing to help. Here is the current Github project URL (for now): https://github.com/debrouxl/hpcomm

I wonder if this software would manage to get around the long delays for file transfers too?
« Last Edit: October 20, 2013, 06:43:29 pm by DJ Omnimaga »

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: A solution to HP connectivity problems
« Reply #1 on: October 21, 2013, 03:36:58 pm »
Thanks. I have just renamed the repository to hplp: https://github.com/debrouxl/hplp , which makes more sense...

This morning, I split the code across multiple files, introducing the exact same organization as libticables + libticalcs. Not that it makes the program any closer to user consumption, but it makes the code base nicer.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: A solution to HP connectivity problems
« Reply #2 on: October 21, 2013, 11:09:45 pm »
Cool to hear. Apparently Tim didn't have this slowness issue I mentionned above, so I'll send him a program that fails to send at a reasonable speed. It was just a program that scrolled through the entire Super Sonic Ball sprite sheet and it was over 10 KB large, but I had a different version with updated sprites that was much larger (around 18-28 KB IIRC). I hope it's not computer compatibility issues >.< (I use Windows 7 64 bits and a first gen i7 computer from 2010).
« Last Edit: October 21, 2013, 11:10:55 pm by DJ Omnimaga »

Offline XiiDraco

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 513
  • Rating: +32/-5
  • Forget the numbers, just call me, Recreation.
    • View Profile
    • Black-Lark Games
Re: A solution to HP connectivity problems
« Reply #3 on: October 21, 2013, 11:28:51 pm »
I don't remember exactly what I did, But I managed to put files onto my Prime, after I copied it and pasted into some sort of folder. Took me no time at all...

Hmmm I wish I could remember what I did...

EDIT:Oh I just put the program into folder in the files for the connectivity kit and then right click on it in connectivity and hit send to class.
(You might have just said that, but I didn't understand)
« Last Edit: October 21, 2013, 11:33:13 pm by XiiR3CR34T10N »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: A solution to HP connectivity problems
« Reply #4 on: October 21, 2013, 11:55:22 pm »
How large were your files btw?

Also what is the send to class function? ???

Offline XiiDraco

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 513
  • Rating: +32/-5
  • Forget the numbers, just call me, Recreation.
    • View Profile
    • Black-Lark Games
Re: A solution to HP connectivity problems
« Reply #5 on: October 22, 2013, 01:20:36 am »
Here this is what I do.

As far as I can tell it's instantaneous.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: A solution to HP connectivity problems
« Reply #6 on: October 22, 2013, 01:41:36 am »
Oh right, that part. I wonder, though... what is the speed difference between that and just sending normally via the emulator or other methods?

Offline XiiDraco

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 513
  • Rating: +32/-5
  • Forget the numbers, just call me, Recreation.
    • View Profile
    • Black-Lark Games
Re: A solution to HP connectivity problems
« Reply #7 on: October 22, 2013, 01:46:00 am »
Not a clue, just works for me XD.

Turns out asteroids doesn't work.
Flashes then crashes.
« Last Edit: October 22, 2013, 01:46:54 am by XiiR3CR34T10N »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Re: A solution to HP connectivity problems
« Reply #8 on: October 22, 2013, 12:11:53 pm »
Strange, I had no problem with it. ??? Key detection was weird but that's due to its programming.

EDIT: Btw where can I find the calc folders in the connectivity kit? I use Windows 7 and parts of your path isn't visible in the screenshot.


EDIT: By the way, I just ran another test and to read through 86 KB of memory content, the connectivity kit took me about 8 minutes (before I could finally update any program from there). Once done, I tried to send the Super Sonic Ball update that is 46 KB large and it took about 1 minute. I think the long delays I got might have been due to the connectivity kit not having been done reading my calc yet, but even 1 minute is still rather slow when you know that many games will reach hundreds of KB of memory.
« Last Edit: October 23, 2013, 02:38:10 am by DJ Omnimaga »

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: A solution to HP connectivity problems
« Reply #9 on: October 25, 2013, 06:10:45 am »
Attached is an initial success for screenshot functionality through libhpcalcs on critor's Prime (thanks a lot for the many dumps and tests !), after manual edition of the PNG file to remove data which the lower layers of the code do not filter yet :)
Yup, the calculator's timestamp is broken. And the libhpcalcs code does not yet send or receive files to/from the calculator, which limits its practical usefulness, for now...
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Ryleh

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +2/-0
    • View Profile
Re: A solution to HP connectivity problems
« Reply #10 on: October 25, 2013, 05:31:11 pm »
I for one am looking forward to any improvements to the software. Trying to create programs on this thing right now are a pain.

Gratitude to anyone/everyone working on doing so.
« Last Edit: October 25, 2013, 05:31:54 pm by Ryleh »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: A solution to HP connectivity problems
« Reply #11 on: October 25, 2013, 06:15:22 pm »
Great Lionel :)

And yes I agree Ryleh. Fortunately, writing the actual code on the emulator or connectivity software then testing is quite easy compared to other calcs. It's just sending it on the real calc or coding it directly on it that can be a nightmare.  I managed to finally send a 46 KB program to my calc faster than mentionned above, but it still took about 8 minutes including the delay when the software was reading my calc content.

Welcome here Ryleh by the way. If you have any chance/time, would you like to share some of your creations with us in the future and introduce yourself in the intro sub-forum? :)

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: A solution to HP connectivity problems
« Reply #12 on: October 26, 2013, 01:55:46 am »
Yesterday evening, critor confirmed that my latest changes produce a directly usable PNG file. The colors are still messed up, but I'm outputting verbatim the data part of the packets produced by the calculator (or so I think, at least :D).
« Last Edit: October 26, 2013, 03:50:27 am by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Re: A solution to HP connectivity problems
« Reply #13 on: October 26, 2013, 07:32:19 am »
I wonder if this could eventually be used as some sort of real time screen capture if combined with Camstudio and such software or if it would be too choppy? Of course we can do it with the emulator, though, so maybe it wouldn't be a good idea to focus on such feature before getting linking to work, although the emu runs too fast.

Anyway good luck and great progress so far! :)

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: A solution to HP connectivity problems
« Reply #14 on: October 29, 2013, 03:33:43 am »
Screenshotting and backup are supposed to be implemented reliably, besides the strange colors in the screenshots (but I'm not mangling the output). Printing logging output to a file instead of the horribly Windows terminal tremendously helps for reliability...
I'm not aware critor transferred back a file created by test_hpcalcs to the calculator using the HP Connectivity Kit.

What's holding further implementation of libhpcalcs / test_hpcalcs at this point, is the integrity checking value: 16-bit value in the header of packets, which varies with the variable name and the variable contents. I can't find how it is computed, even with a brute-forcing program, which I've posted at http://tiplanet.org/forum/viewtopic.php?p=151303#p151303 : the more eyes and brains, the better !
There seem to be such integrity checking values in the packets used for sending and receiving individual files, so I assume that these operations cannot work until we get this integrity-checking computation right.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.