Jump to content


Photo

UART Programming with BlueControl CL/1

UART Bluetooth Programming

  • Please log in to reply
5 replies to this topic

#1 Otto

Otto

    New Member

  • Members
  • Pip
  • 3 posts
  • Country: flag of Andorra Andorra

Posted 28 March 2012 - 09:47 AM

Hello all,
i need some help from u.
My new project is on Bluetooth programming.for that i have "Bluecontrol Evalution board with Bluecontrol". See it from this link.
http://www.blueseria...l_Datasheet.pdf
I had connect this Eval-board with RS232 to my PC (COM3-SPP Slave, COM5-BS config). So for Teraterm connection i m using COM3.
Another i have "Bluetooth USB Dongle".This i had also connected with my Pc bcoz to give Bluetooth to my PC. See it from this link.
http://www.conrad.de...usb-dongle.html
The task is i send one file from Bluecontrol to my PC (via Bluetooth). how can i do this? If anyone know then pls tell me the possible ways to perfome this task.
I m working with Win-7.
I had experience for microcontroller programming, but first time i m doing Bluetooth programming, so may be i m going in wrong way.pls suggest me for this. I had read much in Internet, but still not getting the perfect way to go furture.

The proble is after all connection & configuration i don't get response of AT command from controller, why?

For bluetooth programming i must have to deal with AT commands or i can write C programm?

Another question is I have BT Module HC-05. I m searching for Evaluation Board for this.
In future i have to program this cotroller in C language, how can i do this?

If anyone know then pls reply me

pls share ur ideas and suggestions for fulfil this task.
thanks in advance.
otto

Edited by Otto, 28 March 2012 - 09:48 AM.


#2 D-Lite

D-Lite

    Core Team

  • Members
  • PipPipPip
  • 1648 posts
  • Country: flag of Germany Germany


Posted 28 March 2012 - 10:57 AM

The task is i send one file from Bluecontrol to my PC (via Bluetooth). how can i do this?


Those modules usualy only provide the SPP profile and that means it's a plain serial connection and nothing more. To transfer files, you would have to rely on old fashinoned protocols like ZModem or others that have been used in the stone age
The native way to transfer files via bluetooth is the OBEX or FTP profile which is normally not supported by modules like this as they are mainly targeted as wireless COM port replacement.

The proble is after all connection & configuration i don't get response of AT command from controller, why?


Some modules don't give feedback at all, for others you have to enable echo before you see it.

For bluetooth programming i must have to deal with AT commands or i can write C programm?


You can write a C program that sends AT commands :-). Normaly, those modules are configured once through a terminal program and then just used as you would use a COM port. This all has not much to do with REAL bluetooth programming by the way. To really talk to bluetooth, you have use another class of modules that are more flexible (and way more complicate to use). On the PC side, you'd use a simple USB dongle and talk to your OS' Bluetooth API to access it and on the remote side (microcontroller), you would use a module that uses e.g. the H4 protocol. But be aware that you may end up implementing (or porting) a whole BT stack on the uC side to make this work. Google 'BTStack' for an example how this is done.

Btw.: how is this related to OpenPilot ? :-)

#3 Otto

Otto

    New Member

  • Members
  • Pip
  • 3 posts
  • Country: flag of Andorra Andorra

Posted 28 March 2012 - 11:37 AM

Hello core team, thanks for reply.
Sorry but i wrote wrong. Accually i want to send message e.g. "Hello" from controller to PC (via Bluetooth), not file. Do u have any idea how can i perform this task?

Some modules don't give feedback at all, for others you have to enable echo before you see it.

I had enable Echo.

Btw.: how is this related to OpenPilot ? :-)

i know that this is not related with openpilot but i had read some topics like UART, RS232, serial communication etc so i thought that may be i can get also any help from this site, so i post my problem here.

#4 D-Lite

D-Lite

    Core Team

  • Members
  • PipPipPip
  • 1648 posts
  • Country: flag of Germany Germany


Posted 29 March 2012 - 08:38 AM

Sorry but i wrote wrong. Accually i want to send message e.g. "Hello" from controller to PC (via Bluetooth), not file. Do u have any idea how can i perform this task?


These modules normaly switch to transparent mode as soon as they get a connection from the BT side. You should have connected the serial port of the module to the serial port of the uC. Then from the Bluettoth configuration on the PC, you search for the module and connet to it. You should then get an new COM port on the PC (but as I understand your first post, you already have thi spart running). If you now send data to the uC's serial port, it appears on the PC's COM port and vise versa.

About configuring the module - do you try this via the BT (SPP) connection? This will not work (at least not on any module I'm aware of). You have to configure it via it's physical serial port. Maybe that's the problem?

#5 Otto

Otto

    New Member

  • Members
  • Pip
  • 3 posts
  • Country: flag of Andorra Andorra

Posted 30 March 2012 - 01:59 PM

hello coreteam, thanks for reply.
when i try to send one file from computer to Controller then it shows Error "some files could not be tranfered".
When i transfer file between computer and mobile then it's working perfect.

when i install the controll i get automatically new COM port.
ya, i tried via SPP connection, bcoz i read it in Datasheet of controller.

How can i configure physical serial port?

Edited by Otto, 30 March 2012 - 02:00 PM.


#6 dankers

dankers

    Head Lemon Coordinator

  • Members
  • PipPipPip
  • 11082 posts
  • Country: flag of Australia Australia


Posted 30 March 2012 - 02:50 PM

Are you on Android? If so I think you need a free app to do it but I forget the name of it.