I am working on a robot that has to receive commands from a computer. I know this has been discussed multiple times, but despite all I've read I'm not getting it to work. I program in vb.net for some years now, and have less experience with c but no problems here. I am able to program a robot in c with no difficulties, my problem has always been with making devices communicate to each other.

I get the PC talking to the NXT with no problems, but if i send a message to a NXT mailbox, I am only able to read it with the command "message" and not with "cCmdMessageRead". if I say "cCmdMessageGetSize" it returns 0, but if I say "message" it returns the message normally! I want to use "cCmdMessageRead" because I saw it can read up to 58 8-bit Bytes at once whereas "message" can only read one 16-bit byte (2 8-bit bytes), and because i want to be able to read each Byte separately. I know the "cCmdMessageRead" syntax perfectly, and know the output is in ubytes, so that is not a problem, the thing is that it acts like there is not even a message to read. I even tried sending only the message Bytes without those 6 Bytes before it that tell the NXT what to do, just to try, but obviously that went even worse, and I was not even able to read it with the "message" command, maybe i could use that with the "nxtReadRawBluetooth" command!? Why would I be able to read it with one command while the other tells me there is no message to read? Is there a bug, or am I doing something wrong? And what about "nxtReadRawBluetooth", how does that work, and would it be useful for me?

And about the USB thing:Ideally I wanted the PC to Talk to the NXT through USB, to avoid delays, but i gave up on that, considering it is much harder than Bluetooth. But if anyone has any advice on USB message sending from the PC to the NXT, that would be appreciated.

Ps.: I am using RobotC 3.54

Thanks in advance,

Luca

Sat Jan 18, 2014 8:06 pm

LucaRood

Rookie

Joined: Sat Jan 18, 2014 6:58 pmPosts: 2

Re: Bluetooth/USB communication between computer and nxt

I already solved my problem, using raw bluetooth mode.Could some admin please close this thread?!Thanks.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum