π
<-

Are Calc-To-Calc Connections Possible Using Ndless?

C, C++, ASM...

Are Calc-To-Calc Connections Possible Using Ndless?

Message non lude catastropher » 28 Déc 2017, 20:02

Hey guys! If possible, I'd really like to get multiplayer working with X3D. I tried writing a small USB driver test (and registered it with usb_register_driver), but none of the match, attach, or detach functions ever seem to get called. Granted, I didn't make it a resident program because I'd like to have the driver run in-game. Does USB functionality get disabled when running an ndless program? Does anyone have an idea how I might go about implementing bidirectional calc-to-calc communication? Thanks!
Avatar de l’utilisateur
catastropherProgrammeur
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Prochain niv.: 68%
 
Messages: 13
Inscription: 30 Sep 2015, 18:05
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Are Calc-To-Calc Connections Possible Using Ndless?

Message non lude Vogtinator » 28 Déc 2017, 20:19

The OS has to be running for the communication with USB peripherals to work.
This means you'll have to re-enable IRQs and share the devices with other parts of the OS.

Not much is known about the gadget-side USB stack. It's probably based on some ancient version of https://www.jungo.com/st/products/usb-device-stack/

It's probably the best option to only use the NavNet API for communication. There's some code on https://github.com/compujuckel/nsocket/ ... /nsocket.c and documentation on hackspire: https://hackspire.org/index.php/Syscalls#NavNet
Avatar de l’utilisateur
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Prochain niv.: 1.6%
 
Messages: 217
Inscription: 29 Mar 2014, 15:55
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Are Calc-To-Calc Connections Possible Using Ndless?

Message non lude catastropher » 28 Déc 2017, 20:34

Thank you very much! Is NavNet still broken for calc-to-calc communication? If so I'm thinking that I could have a PC-side server that just relays packets between the calcs. Thanks for such a quick response!
Avatar de l’utilisateur
catastropherProgrammeur
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Prochain niv.: 68%
 
Messages: 13
Inscription: 30 Sep 2015, 18:05
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Are Calc-To-Calc Connections Possible Using Ndless?

Message non lude Vogtinator » 28 Déc 2017, 20:47

NavNet should work fine between calcs as you can send files without issues.
Avatar de l’utilisateur
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Prochain niv.: 1.6%
 
Messages: 217
Inscription: 29 Mar 2014, 15:55
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Are Calc-To-Calc Connections Possible Using Ndless?

Message non lude catastropher » 28 Déc 2017, 23:17

For some reason, NavNet seems to cause a reboot on the Nspire classic when calling TI_NN_NodeEnumInit(). I'm running OS 3.9.0.463 with Ndless 4.4. I'm using the code you linked to for nsocket. It seems to work on the CX though. Do you have any idea what the problem could be?
Avatar de l’utilisateur
catastropherProgrammeur
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Prochain niv.: 68%
 
Messages: 13
Inscription: 30 Sep 2015, 18:05
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Are Calc-To-Calc Connections Possible Using Ndless?

Message non lude Vogtinator » 28 Déc 2017, 23:30

catastropher a écrit:For some reason, NavNet seems to cause a reboot on the Nspire classic when calling TI_NN_NodeEnumInit(). I'm running OS 3.9.0.463 with Ndless 4.4. I'm using the code you linked to for nsocket. It seems to work on the CX though. Do you have any idea what the problem could be?


It looks like the syscalls were never added for OS 3.9.x:

Code: Tout sélectionner
Warning: Syscall 'TI_NN_NodeEnumInit' not found in 'OS_ncas-3.9.0.idc'!
Warning: Syscall 'TI_NN_NodeEnumInit' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_NodeEnumInit' not found in 'OS_ncascx-3.9.1.idc'!
Warning: Syscall 'TI_NN_NodeEnumInit' not found in 'OS_cascx-3.9.1.idc'!


If you'd like to have those, just report which set of syscalls you need for which OSs and I can try to fix that.
Avatar de l’utilisateur
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Prochain niv.: 1.6%
 
Messages: 217
Inscription: 29 Mar 2014, 15:55
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Are Calc-To-Calc Connections Possible Using Ndless?

Message non lude catastropher » 28 Déc 2017, 23:41

Just looking over the nsocket source code, it looks like it uses the following syscalls:

Code: Tout sélectionner
TI_NN_CreateOperationHandle
TI_NN_NodeEnumInit
TI_NN_NodeEnumNext
TI_NN_NodeEnumDone
TI_NN_DestroyOperationHandle
TI_NN_Connect
TI_NN_Write
TI_NN_Read
TI_NN_GetConnMaxPktSize
TI_NN_Disconnect


Would it be possible to add those for CAS OS 3.9.0? I'm not sure which are missing, as it never got past the TI_NN_NodeEnumInit(). I believe TI_NN_CreateOperationHandle() worked though. Thank you!
Avatar de l’utilisateur
catastropherProgrammeur
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Prochain niv.: 68%
 
Messages: 13
Inscription: 30 Sep 2015, 18:05
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Are Calc-To-Calc Connections Possible Using Ndless?

Message non lude Vogtinator » 29 Déc 2017, 00:04

Attached is a ndless_resources with the missing TI_NN_ syscalls added.

TI_NN_GetConnMaxPktSize doesn't seem to be there anymore, I assume it got inlined by the compiler. I assume you can just use whatever works instead of that function.

This is the current MakeSyscalls output for OS 3.9.0 CAS:
Code: Tout sélectionner
Warning: Syscall 'TI_NN_SendKeyPress' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_GetConnMaxPktSize' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_StartService' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_StopService' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_UnregisterNotifyCallback' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_RegisterNotifyCallback' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_InstallOS' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_GetNodeInfo' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_GetNodeScreen' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_CopyFile' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_Rename' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_RmDir' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_MkDir' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_DeleteFile' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_GetFileAttributes' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_PutFile' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_DirEnumDone' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_DirEnumNext' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_DirEnumInit' not found in 'OS_cas-3.9.0.idc'!
Warning: Syscall 'TI_NN_GetFile' not found in 'OS_cas-3.9.0.idc'!
Vous n’avez pas les permissions nécessaires pour voir les fichiers joints à ce message.
Avatar de l’utilisateur
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Prochain niv.: 1.6%
 
Messages: 217
Inscription: 29 Mar 2014, 15:55
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Are Calc-To-Calc Connections Possible Using Ndless?

Message non lude catastropher » 29 Déc 2017, 18:19

Thank you! That fixed the crash from those system calls and I was able to transfer data from the calc to the computer. However, I'm unable to transfer anything back to the calc. I suspect this is because I don't have a service running on the calc to accept the packets. As is my luck, the system calls to start and stop a service cause a crash as well xD When you get the chance, could you also add TI_NN_StartService() and TI_NN_StopService()? I'd need them for a CX regular running 4.5.0.1180 and a classic CAS running 3.9.0. I'm really sorry, I wish I would have known I needed them when you added the others. Thank you so much, I really appreciate all of your help!!!
Avatar de l’utilisateur
catastropherProgrammeur
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Prochain niv.: 68%
 
Messages: 13
Inscription: 30 Sep 2015, 18:05
Genre: Homme
Calculatrice(s):
MyCalcs profile

Re: Are Calc-To-Calc Connections Possible Using Ndless?

Message non lude Vogtinator » 29 Déc 2017, 19:06

The attached ndless_resources.tns should contain TI_NN_{Stop,Start}Service for 3.9.0 CAS and all 4.x until 4.5.0.

Turns out the function was still there, just under a different name, so I just created an alias.
Vous n’avez pas les permissions nécessaires pour voir les fichiers joints à ce message.
Avatar de l’utilisateur
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Prochain niv.: 1.6%
 
Messages: 217
Inscription: 29 Mar 2014, 15:55
Genre: Homme
Calculatrice(s):
MyCalcs profile

Suivante

Retourner vers Native: Ndless, Linux, ...

Qui est en ligne

Utilisateurs parcourant ce forum: ClaudeBot [spider] et 1 invité

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"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.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
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.
2565 utilisateurs:
>2549 invités
>7 membres
>9 robots
Record simultané (sur 6 mois):
29271 utilisateurs (le 11/07/2025)
-
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)