View unanswered posts | View active topics It is currently Thu Nov 27, 2014 9:17 am






Reply to topic  [ 3 posts ] 
Bluetooth Message Sending? 
Author Message
Rookie

Joined: Sun Oct 12, 2008 7:36 am
Posts: 1
Post Bluetooth Message Sending?
Hi,
I want to send the message from the pc to the nxt to move motor for certain degrees,i cant get it workout...i also tried to connect using the rawdata mode ,and the setBluetoothRawDataMode()
method never seems to be done as i debug it step wise..the core is not going into the raw data mode.. please any code samples or advice..


Sun Oct 12, 2008 7:55 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Jan 31, 2007 3:39 am
Posts: 299
Location: San Diego, California. USA
Post Re: Bluetooth Message Sending?
Hi mohammad_talha,

Have you tried looking at the sample bluetooth files that come with RobotC, they may guide you in the right direction. If you are running Robotc v1.45, you can click Open Sample Program in the file menu, and select the Bluetooth folder for allot of sample code.

Hope this helps B-)
Scott

_________________
Mmmm Legos B-)

My Robot Projects:
http://www.freewebs.com/robotprojects/


Mon Oct 13, 2008 12:59 pm
Profile WWW
Rookie

Joined: Sat Dec 15, 2007 5:08 am
Posts: 7
Post Re: Bluetooth Message Sending?
Hi,

I have the same problem and I can't manage sending data from PC to NXT.
I have build an application on PC that uses COM port of bluetooth key to communicate with NXT brick in both direction.
I can now read data from NXT with PC. NXT uses cCmdMessageWriteToBluetooth() and I can see protocol byte before my data bytes. It is described in the Lego Bluetooth developpement Kit.
Byte 0 : 0x00
Byte 1 : 0x80
byte 2 : 0x00 (mailbox1)
Byte 3 : message size
byte 4-N : my data
final Byte : 0x00

So I used the same protocol and so the same bytes to send from PC to NXT, hoping the brick could read the message via cCmdMessageRead().
But here is the problem. NXT can't see anything, even with example robotC programs.
Does someone have written such a program, I mean sending data from PC via bluetooth COM port, and know what is the solution of my problem?
I would take any idea to solve it.

Thanx,


Mon Nov 03, 2008 7:17 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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 post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.