π
<-
Chat plein-écran
[^]

USB Communication Between Nspire and Python

:32tins: :32tinsktpb: :32tinsktpn: :32tinscas: :32tinstpkc: :32tinstpktpb: :32tinstp: :32tinscastp: :32tinscmc: :32tinscx: :32tinscxcas:

USB Communication Between Nspire and Python

Unread postby dinkydaffy » 22 Feb 2024, 00:46

Hello all, I am new to the TI reengineering space, so I don't know if this is a simple task, but I have spent quite a while scouring the various TI forums and have yet to find much information regarding this topic.

For context, I have been working on a project for my data science gig, and I would like to find a way to establish communication between my python script on my PC and the USB port of my TI nSpire CX. I would like to start by sending strings back and forth autonomously, and then move towards more interesting data types. I would be willing to do so via .tns files so long as I can encode and decode them in python.

I would like to do this without any external hardware (TI-Python, TI-Innovator Hub, custom PCB boards, etc) and without the use of the TI Computer Link Software. Ideally the connection would be established solely via python over the USB.

Listening on the computer side should be pretty easy (pyusb, libusb), but I've come to find out that serial output from the calculator is not as simple as I assumed. I've read that nSpire micropython has this functionality, but I haven't been able to find any implementations of this. Another option would be something like a key logger developed here by MishaShapo (viewtopic.php?f=20&t=18348&p=201340#p201340), but I presume there is an easier way of going about this.

There is also a wiki page details the USB protocol used for the Nspire (https://hackspire.org/index.php?title=USB_Protocol), but I was wondering if any libraries exist that may simplify this process. I found tilibs and it seems very useful, but I am unsure of how ti implement it outside of the TILP software, as I would like to keep it within my python script and do not know how I could correctly integrate these c libraries with my current python script.

Another option would be to use Lua, as the ASI seems like it could get the job done, but my calculator is an nSpire CX version 3.0.2.1791 and does not have access to this software. I am about to upgrade and I am willing to jailbreak with Ndless to get the CAS functionality, but I would like to have more certainty in my plan before I move forward.

Any help with this would be greatly appreciated.
User avatar
dinkydaffy
Niveau 0: MI (Membre Inactif)
Niveau 0: MI (Membre Inactif)
Level up: 20%
 
Posts: 1
Joined: 21 Feb 2024, 09:02
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: USB Communication Between Nspire and Python

Unread postby Lionel Debroux » 23 Feb 2024, 09:10

For the purpose of building a libti* client, the new version of libticalcs' test_ticalcs_2 front-end, https://github.com/debrouxl/tilibs/tree ... runk/tests , is certainly more approachable than TILP. But you'd still have to use libti* from Python; I don't remember about someone else doing a usable Python front-end for libti*, though there was recently a partial C++ wrapper in https://github.com/debrouxl/tilibs/issues/84 .
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
User avatar
Lionel DebrouxSuper Modo
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 11.2%
 
Posts: 6859
Joined: 23 Dec 2009, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Class: -
GitHub: debrouxl


Return to Problèmes divers / Aide débutants

Who is online

Users browsing this forum: No registered users and 29 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
Phi NumWorks jailbreak
123
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
917 utilisateurs:
>861 invités
>51 membres
>5 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)