|
| Windev Mobile 23 sOpen WM6.5 |
| Iniciado por guest, 17,jul. 2018 19:10 - 5 respuestas |
| |
| | | |
|
| |
| Publicado el 17,julio 2018 - 19:10 |
Hi Everyone,
I am hoping someone can assist me with a little challenge I am faced with on a Windows Mobile 6.5 device and the sOpen command.
The device I am using is the Honeywell Dolphin 60s and I am connecting this to a bluetooth serial converter. I am able to pair the device with no problem and this creates two com ports, one for outbound communications (COM4) and one for inbound communications (COM0).
I can successfully connect to COM4 and can easily send data to the bluetooth device from the Dolphin 60s using the sWrite command.
However i cannot open COM0 and typically the project requires the ability to receive data from the serial port, not send it.
I have tried the following sOpen commands with no success:-
sOpen(0,1024,1024,100,TRUE)
sOpen("COM0",1024,1024,100,TRUE)
Neither of these commands will open COM0 on this device through Windev Mobile. If I change the commands to 4 or COM4 then both of these work for COM4.
For sanity sake I have installed a third party application for opening com ports and this was able to open both COM0 and COM4 with no issues.
Can anyone offer any guidance as to what I could be doing wrong or have any ideas for a workaround?
Thank you for any assistance : )
Kindest Regards,
Lee Shroder |
| |
| |
| | | |
|
| | |
| |
| Publicado el 17,julio 2018 - 19:27 |
Hi Lee,
my fist reaction when I read your messgae was ?COM0?
I have never heard of a serial port numbered zero before and the sOpen help states that the port number for serial starts at 1.
So I suggest changing the settings for that port.
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 18,julio 2018 - 11:27 |
Hi Fabrice,
Thank you for your prompt response and I agree COM0 does't make any sense. However this is the only option the Honeywell hardware offers when creating a serial port for communication with a bluetooth serial device.
Please see the following technical document exert which I have copied and pasted from Honeywell which clearly details com0 as one of the serial ports the device enumerates with bluetooth devices:-
RESOLUTION The COM Port Assignments on the Dolphin 60s are: COM0 - Bluetooth Serial Port Service. COM1 - USB Host - Dock - Switched. COM2 - Bluetooth. COM3 - Unused. COM4 - Bluetooth Serial Port Service. COM5 - Unused. COM6 - Unused. COM7 - GPS:COM Port for the GPS receiver. COM8 - USB Serial: Virtual USB Serial port for ActiveSync. COM9 - Bluetooth BTHATCI.
I know the device in question creates 2 ports as this is the case under windows 10, one outbound (PC to Device) and one inbound (Device to PC) and I also know that COM4 acts as an outbound device as I am able to communicate to from the 60s to hpyerterminal on a PC. However COM4 is one way, outbound only, I need to communicate with COM0 for inbound as I need to capture data from the device, not send data to it.
I have asked Honeywell for the ability to use another COM port number but they have said that's not possible as its built in the firmware.
Any other ideas?
Kindest Regards,
Lee Shroder |
| |
| |
| | | |
|
| | |
| |
| Publicado el 18,julio 2018 - 13:45 |
Hi Lee,
you already tried with the "COM0"' syntax, so the only other thing I can think of is to try 256 as the port value.
My reasoning is: - Serial ports are a VERY old technology - the help indicates that valid port numbers are 1..256 - IF the port number is an int on 1, as the two statements above would make me think, then 256 EQUAL 0.
So try and let us know...
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 18,julio 2018 - 19:09 |
Hi Fabrice,
Thank you for the concept but unfortunately still no success. Everything works find for COM4 either as integer 4 or string "COM4" but string "COM0" or int 0 or int 256 fails to open the port.
To prove the hardware another way I downloaded a program called Terminal CE. This was able to open COM0 and I was able to receive data through this connection. This has clarified that I must use COM0 to achieve the communication needed but it seems Windev Mobile will not allow me to open this port by its port name unlike this application.
Any other ideas?
Kindest Regards,
Lee Shroder |
| |
| |
| | | |
|
| | |
| |
| Publicado el 19,julio 2018 - 13:41 |
It probably wont make a diference, but make sure that you are using a variable declared as an int on 1 to pass the zero value
And if that doesn't work either, the last thing to do is to contact the support and ask why it's working with other tools and not sopen (examples mandatory)
Best regards |
| |
| |
| | | |
|
| | | | |
| | |
|