π
<-
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 44 guests

-
Search
-
Social TI-Planet
-
Featured topics
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Offre de test des nouveautés de rentrée 2024 par Casio. Enseignant(e), reçois gratuitement 1 exemplaire, à ton choix, de la Graph Light ou bien de la Graph Math+
14€ remboursés par Casio sur l'achat de ta calculatrice Graph 35 d'ici le 31 Octobre 2024
10€ remboursés par Casio sur l'achat de ta calculatrice Graph 90+E d'ici le 31 Décembre 2024
10€ remboursés par Casio sur l'achat de ta calculatrice Graph 25 d'ici le 31 Décembre 2024
8€ remboursés par Casio sur l'achat de ta calculatrice Graph Math+ d'ici le 31 Octobre 2024
Reprise de ton ancienne fx-92 Collège ou Graph 25/35/90 à 3€ peu importe son état. Même non fonctionnelle et donc invendable, même ancienne Graph 35 non conforme aux programmes (pas de Python), même ancienne Graph 25/35 inutilisable aux examens (pas de mode examen) et donc invendable. Etiquette de retour fournie, pas de frais de port à payer.
3€ remboursés par Casio sur l'achat de ta calculatrice fx-92 Collège d'ici le 30 Septembre 2024
5€ de remise immédiate sur l'achat de ta calculatrice TI-83 Premium CE Edition Python chez les revendeurs partenaires
4€ de remise immédiate sur l'achat de ta calculatrice TI-82 Advanced Edition Python chez les revendeurs partenaires
3€ de remise immédiate sur l'achat de ta calculatrice TI-82 Advanced chez les revendeurs partenaires
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234567891011121314
-
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.
1018 utilisateurs:
>944 invités
>69 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)