Hi,
I use MS eMbedded Visual C++ for create my applications.
I create aplications for iPaq and XDA.
I can't open communication port COM in XDA.
I use follow function:
lpszPortName = TEXT("COM1:"); // COM port = COM1
// open COM port
if (hPort == INVALID_HANDLE_VALUE)
{
hPort = CreateFile (lpszPortName, GENERIC_READ | GENERIC_WRITE,
0, NULL, OPEN_EXISTING,
0,
NULL);
}
Handle hPort has got enduringly value INVALID_HANDLE_VALUE.
If I use this function in iPaq so it execute all OK.
I've got close all aplications, witch work with COM port.
I use synchronization cable for transfer data from external equipment in XDA.
Where is my mistake? Please, help mi.
[email protected]
not sure if yu just cut/pasted your code incorrectly, but you should test if the handle is valid -after- you open it, not before.
specify
Next example is only cut my source code. I make test so after open COM port.
I use function GetLastError for get more information.
GetLastError return this result:
code 55:
text: The specified network resource or device is no longer available.
Where is problem?
If I use this cable for synchronization between XDA and my PC, all is OK.
What COM port is use during this connection?
[email protected]
I have also had this error code 55 problem. It means that the comm port is already open by something else. This should happen if the XDA was already sat in a serial cradle with ActiveSync running, BUT I have had it repeatadly happen for no reason.
Do Settings -> Connections -> Beam and UnTick 'Receive incoming beams'. I don't know why this causes the problem but it seems to clear it. Please tell me reason why this works.
Another 'cure' I have found is that if you use ActiveSync and serially sync the XDA, then remove it from the cradle. Then your code will work, but possibly only once.
When it does work - transmit a stream of characters (say a file about 500 bytes) out of the comm1 port, then it will work correctly and can be open/closed as expected.
Let me know how you get on, I would like to know a reason why this problem happens.
Cheers
Paul
Hello,
Has anyone been able to find an updated driver for this IR printer?
or atleast a fix! the program keep saying now, unable to open COM:1
i noticed tho, that IR port is COM:3
maybe someone can find a way to fix it?
help!
PS: Sipix no longer make these printers, and dont offer support.
i wonder if that means we can disassemble that code, in order to
keep using there obsolete product.
Have you tried unchecking beams in settings/connections/beams.
yes i did.
if i set the xda to autoreceive, it detects the printer!
but the software itself is messed up.
i strongly beleive its either the COM1/3 thingie,
or a protocol setup.
for example, this printer ONLY prints on XP if
its set to 11500 speed AND hardware handshake!
im thinkink of building a serial cable... it may not be IR printer no more, but i can still print (i hope)
no luck, anyone?
Hey,
i want to start programming an app for my HD2 which should connect one of my bluetooth devices by starting it. I only know a bit about programming under desktop-windows. Where do I find a reference for the programmers api on WM6.5 / where can i look for the commands i need?
//Edit: The functions i found in the MSDN are for connecting - communicating - closing in this way, but i only want to connect a profile (serialport for tmc) and end.
Hope you can help. Thanks.
125
Found the 32Feet.net SDK but still i can't get the procedures i need.
Nobody with information on programming bluetooth apps?
Somebody must have down something similiar in the past or?
These?:
http://www.codeproject.com/KB/windows/BluetoothDevicesDiscovery.aspx
http://www.mobile-soft-dev.blogspot.com/2010/03/c-wrapper-for-nearby-bluetooth-devices.html
Thanks for the links. Ok that is how to enumerate the devices and i could do a connection over winsock, but still i can't find information on not really do a connection but only pair the bt device so other applications can use it afterwards. Damn
(More Information: App should be used on WIDCOMM stack to connect tmc and start navigation after that to get rid of the annoying selector window which disappears to quick)
Hi!
I am triing to make a Windows Mobile gps application that is able to determine the current position and writes it on a form. Iam using the OGL open source GPS library.
My device is a trimble geo xh 2005. When i deploy my project on it, and try to connect to the receiver it keeps throwing an error: "An error has occured connecting to the receiver(error code5)" .
I've attached my project.
Maybe my gps setting are incorrect, i dont know. Just in case: GPS software port: 3; GPS hardware port:8 Baud rate: 9600 and Manage GPS automatically checkbox is set.
The above error appears giving port 3 in the application. If i choose port 8 it tells me that the port is already in use.
I cant figure out what am i doing wrong:-(
The GPS settings or something in the code?
Any help would be appreciated!
Never mind!
I have solved it, I was using the wrong port as i suspected
Hi all,
I've spent some time to investigate about Bluetooth status on Windows Phone 7 using DllImport approach for some applications I'm developing.
This is a simple chat app between a WP7 device and a counterpart (i.e a PC, another WP7 device, ...) using bluetooth serial communication.
I tried this app by connect my WP7 device to a PC and to another WP7 device.
It permits to exchange text messages between each side, like a classic chat program.
Tested WP7 devices (LG Optimus 7, Nokia Lumia 800 and HTC Mondrian) are all dev-unloked.
Application main page have the following possible actions:
- Connect to a remote device (if selected it will open a new page where to choose previously paired device or to find new one)
- Act as server (if selected it creates a new serial connection using device port 10 and it will listen for new incoming connection from remote device)
- Disconnect (to stop a connection towards remote device, or to stop server mode)
- Send (it will be enable only when connected as client or server. If selected will send your message to counterpart).
- Settings (if selected it will open a new page where to set application option)
Note: at the moment there is no automatic notification about connection down event.
Thanks to Heathcliff74 and fiinix for their works on WP7
Note: This is a simple project to verify if all core procedures (connection open and close, send and receive messages, ...) are working in the right way.
Ciao
P.S 1: if you eant to test the app between WP7 device and a PC use this procedure:
- Start Bluetooth on WP7 device
- From PC search for WP7 device and pair it
- Start BlueChat on WP7 device in server mode
- From PC search for Device exported services: you'd see a SPP (AUX3) option, if yes select it and then PC will create a new local COM Port
- Open a Putty using this COM Port and start to write to WP7 device!
P.S. 2: if you eant to communicate between 2 WP7 devices:
- On device 1 go to bluetooth settings page and activate it (this is important because only when we are in this page the device is discoverable from outside)
- On device 2 open BlueChat and choose "Connect" button. In the "Connect To" page choose "Search" option and in some seconds you'd see device 1
- Select device 1 form the list. Before select "Done" button, on device 2 open BlueChat and starts it in Server mode
- Then on device 1 select "Done" button and the devices will be connected
- Now you can exchange data between the two devices
nice work!
Very cool! Would you mind sharing the source code? I assume it's done using the standard WinCE Bluetooth APIs, but I'd like to see how you made it work exactly as that may enable writing a BT File Transfer app that doesn't rely on full-unlock the way the current one does.
GoodDayToDie said:
Very cool! Would you mind sharing the source code? I assume it's done using the standard WinCE Bluetooth APIs, but I'd like to see how you made it work exactly as that may enable writing a BT File Transfer app that doesn't rely on full-unlock the way the current one does.
Click to expand...
Click to collapse
Project source code will be shared when it will be completed and fully functional (Actually it is finished at 60-70%)
I'm using a mix between Windows Mobile/Windows CE/Windows Embedded APIs.
This is only a test project to verify base bluetooth routines on multiple WP7 devices.
Main goal is transmit and receive file using OPP (Obex Object Push Profile) without the constraints of a Fully unlock device.
In this development phase, WP7 device can receive file through OPP but there are some problems on file trasmission.
In addition WP7 devices don't pair another phone device (for example pair a WP7 with an Android), and this requires efforts on pairing phase also.
I would like to suggest you something to send files...i'm bit a developer, i don't know even if it's possible...just tell me where i am failing with my theory
If, within your app, you decode a file in hexadecimal code to text, like this,
00 00 00 00 00 00 00
To
00000000000000 and injecting a string that sets nme and extension like
*namefile**.rar*00000000000000
And then you send this to an other WP with your app as a text that will decode the text to a file...
Is this possible? It only have the bug that doesn't work with other devices right but is possible?
Sent from my LG-E900 using Board Express
davide136 said:
I would like to suggest you something to send files...i'm bit a developer, i don't know even if it's possible...just tell me where i am failing with my theory
If, within your app, you decode a file in hexadecimal code to text, like this,
00 00 00 00 00 00 00
To
00000000000000 and injecting a string that sets nme and extension like
*namefile**.rar*00000000000000
And then you send this to an other WP with your app as a text that will decode the text to a file...
Is this possible? It only have the bug that doesn't work with other devices right but is possible?
Sent from my LG-E900 using Board Express
Click to expand...
Click to collapse
Ciao Davide,
the problem is in connection establishment between WP7 devices.
When they are connected, files will be exchanged using OPP rules so no problem on it.
As said in previous post, I can send to my WP7 device an image and save it into Media Hub (or where I want)
Unfortunately connection management on WP7 is not so comfortable and require some time to be deeply understood...
Yes i had misunderstood thanks to have cleared it
Sent from my LG-E900 using Board Express
navisluni said:
Hi all,
I've spent some time to investigate about Bluetooth status on Windows Phone 7 using DllImport approach for some applications I'm developing.
This is a simple chat app between a WP7 device and a counterpart (i.e a PC, another WP7 device, ...) using bluetooth serial communication.
I tried this app by connect my WP7 device to a PC and to another WP7 device.
It permits to exchange text messages between each side, like a classic chat program.
Tested WP7 devices (LG Optimus 7, Nokia Lumia 800 and HTC Mondrian) are all dev-unloked.
Application main page have the following possible actions:
- Connect to a remote device (if selected it will open a new page where to choose previously paired device or to find new one)
- Act as server (if selected it creates a new serial connection using device port 10 and it will listen for new incoming connection from remote device)
- Disconnect (to stop a connection towards remote device, or to stop server mode)
- Send (it will be enable only when connected as client or server. If selected will send your message to counterpart).
- Settings (if selected it will open a new page where to set application option)
Note: at the moment there is no automatic notification about connection down event.
Thanks to Heathcliff74 and fiinix for their works on WP7
Note: This is a simple project to verify if all core procedures (connection open and close, send and receive messages, ...) are working in the right way.
Ciao
P.S 1: if you eant to test the app between WP7 device and a PC use this procedure:
- Start Bluetooth on WP7 device
- From PC search for WP7 device and pair it
- Start BlueChat on WP7 device in server mode
- From PC search for Device exported services: you'd see a SPP (AUX3) option, if yes select it and then PC will create a new local COM Port
- Open a Putty using this COM Port and start to write to WP7 device!
P.S. 2: if you eant to communicate between 2 WP7 devices:
- On device 1 go to bluetooth settings page and activate it (this is important because only when we are in this page the device is discoverable from outside)
- On device 2 open BlueChat and choose "Connect" button. In the "Connect To" page choose "Search" option and in some seconds you'd see device 1
- Select device 1 form the list. Before select "Done" button, on device 2 open BlueChat and starts it in Server mode
- Then on device 1 select "Done" button and the devices will be connected
- Now you can exchange data between the two devices
Click to expand...
Click to collapse
THX,but it can not support chinese chat ~
281463288 said:
THX,but it can not support chinese chat ~
Click to expand...
Click to collapse
Can you explain which problem have you got?
Some issues with chinese chars?
navisluni said:
Can you explain which problem have you got?
Some issues with chinese chars?
Click to expand...
Click to collapse
Sorry for late~
Like this
It seems to be sending an extra character "C" sometimes when you start the chat from the server. It works on Samsung Focus and tested with Lumia 800 also.
We have a review up on wpxbox.com
Source code
Hi,
Would it be possible to post your source code so that we can try some implementations and see if we can push things along further.
I know you said you'd try to tidy it up before you post the code but maybe you've got too busy to do this. Any code or even your entire VS solution/project would be appreciated.
Also, has anyone had this working on an HTC Titan (1)?
Thank you.
BBBB102 said:
Hi,
Would it be possible to post your source code so that we can try some implementations and see if we can push things along further.
I know you said you'd try to tidy it up before you post the code but maybe you've got too busy to do this. Any code or even your entire VS solution/project would be appreciated.
Also, has anyone had this working on an HTC Titan (1)?
Thank you.
Click to expand...
Click to collapse
Ciao BBBB102,
improvements on bluetooth communication have been ported to BluePhoto project (the bluetooth logic is the same).
Check the thread on XDA.
BR