COM port and Bluetooth

Post Reply
pilamaster
Posts: 7
Joined: Fri Dec 25, 2009 3:05 am

COM port and Bluetooth

Post by pilamaster » Mon Jan 18, 2010 4:00 am

Hello to everybody. I'm working with mini2440 and WinCE 6.0 (image compiled from bsp from this site). I want to connect PC and mini2440 via Bluetooth using Serial Port Profile for Bluetooth. BT-dongle works fine, i can transfer data between PC and mini, but creating virtual com-port isn't successful. I wrote a simple program for WinCE, which lists all com ports in system, can open and close selected port and send in it string "hello" (for testing). This program shows that in system there are 4 com-ports: COM1 COM2 COM3 and COM5, COM1,2,3 - three UART ports of the mini2440 board, but what is COM5? I tried to work with it, it opens successfully(BT dongle is connected to USB-host), but when i tried to send test string to it my test program hangs. I followed advises from this blog http://crazy-embedder.blogspot.com/2009 ... h-gps.html but when i run program form above post it shows error.
May be someone can help me in working with Bluetooth and Serial Port Profile.

Best regards, Sergej.

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: COM port and Bluetooth

Post by nicolas » Mon Jan 18, 2010 2:58 pm

For SPP you normally need to set it up beforehand.
Does it show your PC as providing an SPP port and also does it let you assign a COM port number to it

pilamaster
Posts: 7
Joined: Fri Dec 25, 2009 3:05 am

Re: COM port and Bluetooth

Post by pilamaster » Tue Jan 19, 2010 2:37 am

For SPP you normally need to set it up beforehand.
Thanks for answer. I need to set up SPP in BSP or somewhere else?
My PC provides SPP because i successfully used it with Nokia N800(maemo linux) and Mitac Mio A701(WM6.1), SPP isn't shown in services, but when i pair devices i can transfer messages through COM port using terminal programs between Nokia-PC and Mitac-PC. On mini i have COM5 and i don't know for what it assigned, program from crazy-embedder's blog tries to assign virtual port to COM5 too and shows error.

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: COM port and Bluetooth

Post by nicolas » Tue Jan 19, 2010 9:07 am

Normally there is a bluetooth settings panel/software.
It will show the device and the features it provides.
From there you select the device, then it should show it offers SPP, then you select it and it should ask you to select which COM port to assign to it.

Something like this: http://www.db75.com/blog/images/blogs/c ... igure5.gif (from http://www.db75.com/new_blog/?p=235)

pilamaster
Posts: 7
Joined: Fri Dec 25, 2009 3:05 am

Re: COM port and Bluetooth

Post by pilamaster » Tue Jan 19, 2010 12:32 pm

That's right for Windows Mobile, but in Windows CE this panel provides only function of searching another BT devices. But i solvrd my problem. After searching in google for the whole day i found info that it is no way to work with SPP in WinCE directly. SPP is only accessible through COM-port emulation utilities (http://vinoth-vinothblog.blogspot.com/2 ... ofile.html). So i downloaded program Windows Embedded CE Bluetooth Manager,then in this program i paired mini2440 and PC, assigned COM7 for BT COM-port on mini and now i am successfully using my own software which works with COM7. Thanks nicolas for your answers.

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: COM port and Bluetooth

Post by nicolas » Tue Jan 19, 2010 5:58 pm

Thats because it is missing a bluetooth manager. CE only has the minimum required stack components.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests