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

Message non lude dinkydaffy » 22 Fév 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.
Avatar de l’utilisateur
dinkydaffy
Niveau 0: MI (Membre Inactif)
Niveau 0: MI (Membre Inactif)
Prochain niv.: 20%
 
Messages: 1
Inscription: 21 Fév 2024, 09:02
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: USB Communication Between Nspire and Python

Message non lude Lionel Debroux » 23 Fév 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.
Avatar de l’utilisateur
Lionel DebrouxSuper Modo
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Prochain niv.: 11.2%
 
Messages: 6859
Inscription: 23 Déc 2009, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: -
GitHub: debrouxl


Retourner vers Problèmes divers / Aide débutants

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 91 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
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
-
Faire un don / Premium
Pour plus de concours, de lots, de tests, nous aider à payer le serveur et les domaines...
Faire un don
Découvrez les avantages d'un compte donateur !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partenaires et pub
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1761 utilisateurs:
>1749 invités
>7 membres
>5 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Autres sites intéressants
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)