Are you adding the header for BASIC transmitions?
I've written about it in here: http://dcs.cemetech.net/index.php/Direct_USB_to_gcnclient_connection
EDIT: basically making the message look like
\x04<two-byte little endian message size>message
Thank you Sorunome! They are now communicating!
EDIT:
However nothing appears in Str9 after receiving the message 'HELLO' .
*BUMP! Any ideas?
ElectronicsGeek wrote:
*BUMP! Any ideas?
Can you be more specific? What exactly is the problem, and what have you eliminated as possibilities so far?
Essentially, my computer is now sending data to my calculator. I sent the string 'HELLO' using outtoclient(...), receiving it with the code suggested by Sorunome on the DCS Wiki. That's all fine. Now on the calculator I get what appears to be an empty string. Sorunome told me that he thought that capital letters did not need tokenization, hence why I did this without first tokenizing the string from the computer.
ElectronicsGeek wrote:
Essentially, my computer is now sending data to my calculator. I sent the string 'HELLO' using outtoclient(...), receiving it with the code suggested by Sorunome on the DCS Wiki. That's all fine. Now on the calculator I get what appears to be an empty string. Sorunome told me that he thought that capital letters did not need tokenization, hence why I did this without first tokenizing the string from the computer.
Does the code succeed in getting as far as the end, where it should have stored the incoming message into the string variable? Does the gcnclient in verbose mode show a message successfully received?
Yeah, both the client and the server acknowledge this.
*bump* did you make any progress on tracking down the issue on this? Anything we can to do help short of running the program ourselves?
Not since Tuesday. I'll endeavour to have a look tomorrow.
EDIT: I will have a look at the contents of Str9 in a hex editor...
EDIT 2: Hmm. Str9 appears to be empty when I compared it 2 Str1 which contained HELLO, a string manually entered on the calculator. Since the client and server PC code recognised the transmission of the bytes, the problem may well be in how the calculator handles receiving data.
If you would post the code for me to look at I can tell you if you are doing things right. Cn2 basic can be finicky I've noticed (though when used properly is fine)
The code is based on the link provided by Sorunome, here.


Code:
0->theta
0->K
"->Str9
sum(19,1
sum(17,"PING
Repeat K=45
getKey->K
sum(20,1
Disp Ans
If Ans
sum(18
End
Disp Str9
sum(19,0


Thanks a lot, geekboy Smile
The code above works fine in PindurTi....

Also Sum(1Cool will return whether or not a frame has been received. So that code can be shortened a little(Sum(20) was added for games that need to know if there is a new data set pending but are still not ready for it. )
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement