HP-Prime File extension



#6

Hello everyone. Really enjoying the discussions on Prime. I got the HP48 when it was new, and wrote an emulator for it (the code is em48 - which I think people used in later emulators). Waited so long to get really excited again, sad that I am!

Got my Prime a few days ago, and gently getting used to it with the great conversations on here.

I am using Linux - havent looked at the CDROM yet, but can we up/download to Linux?

What is the normal file extension for Prime programs? (So I can add syntax coloring to my editor).

thanks


#7

Hello,



AFAICT, there's no Linux (or more generally, third-party) tool for communicating with a HP Prime for the purposes of transferring files or upgrading the firmware.

We know, from the USB descriptors, that the Prime uses standard USB classes for both of those purposes: HID for file transfer, MSD for firmware upgrade. Therefore, it doesn't require users to install extra drivers, unlike, say, TI's calculators and cables, which use vendor-specific class.

However, the firmware upgrade protocol has not been fully reverse-engineered, and I'm not aware of any published work on reverse-engineering the file transfer protocol. USB protocols reverse-engineering work was recently eased by Wireshark gaining the ability to consume Windows usbpcap dumps :)



The normal file extension for Prime programs is .hpprgm. Prime programs are mostly UTF-16 little-endian texts, with a bit of extra metadata at the beginning.



These pieces of information are not (yet) found on wiki4hp. See http://tiplanet.org/hpwiki/index.php?title=HP_Prime and its sub-pages for more details.


#8

Great - thank you debrouxl. Thats very useful to know. (Shame they are UTF-16 and not UTF-8, but never mind!)

My Linux has problems seeing the HP - I presume the USB ID isnt in the known table, which is easy enough to fix, or will happen on the newer kernel/distro updates.

Interesting that we need to decode the USB protocol. I will ponder if its possible to leverage a Windows VM to monitor the traffic.

thanks


#9

Yup, the USB ID wasn't in the table. I've just added it at https://usb-ids.gowdy.us/read/UD/03f0 , it should therefore appear in a future upgrade.



Unless HP officially documents it, we need to decode the USB protocol. That falls under the "reverse-engineering for interoperability purposes" category and is fortunately squarely legal in most countries :)

For this purpose, we can definitely leverage virtualized Windows. I occasionally did for minor changes to the third-party implementation of the TI Nspire protocol I'm currently the maintainer of. 99% of the work on the Nspire protocol was done years ago by the previous maintainer.



In 2013, Wireshark became a more friendly solution than e.g. SniffUSB commented text dumps, which the previous maintainer and I used for the Nspire.


#10

Not really much to decode, but be aware it may still change with future updates (as will programming - some commands changed/added/removed/etc).

TW


#11

That's understandable :)

As long as there's a way to identify the OS somehow (version number / feature level / date / whatever), it's possible to cope with changes.

#12

Hello

-> decode USB protocol

If you are trully interested in creating a linux con kit, contact me and I will help as much as I Can...

cyrille


Possibly Related Threads...
Thread Author Replies Views Last Post
  Cannot delete file Les Koller 4 580 11-07-2013, 12:17 AM
Last Post: Les Koller
  File Format: hpprgm Thomas Chrapkiewicz 6 825 10-30-2013, 09:32 PM
Last Post: Thomas Chrapkiewicz
  go71b 'lexs' or 'raws' file format? Christoph Giesselink 2 436 08-21-2013, 02:53 AM
Last Post: Christoph Giesselink
  How do you print a 'data' file on the HP 71B to the HP 2225B thinkjet? Geoff Quickfall 3 508 08-18-2013, 04:32 PM
Last Post: Geoff Quickfall
  How to use XnView to create .gro4 file as in OpenFire? arturfeghali 2 346 06-27-2013, 05:57 PM
Last Post: jerome ibanes
  41CL :TROUBLE IN FILE TRANsFER aurelio 22 1,812 06-18-2013, 03:44 PM
Last Post: aurelio
  How to save WP34s programs to a file? Harald 9 867 04-26-2013, 01:44 PM
Last Post: Walter B
  [WP 34s] How to get the latest version of file xyz Walter B 3 423 03-17-2013, 05:52 AM
Last Post: Alexander Oestert
  File transfers over USB Charles C(UK) 5 536 08-10-2012, 08:04 AM
Last Post: Charles C(UK)
  PDF File of Short & Sweet Math Challengers Bill (Smithville, NJ) 10 808 04-05-2012, 04:09 PM
Last Post: Mike T.

Forum Jump: