Comm ports

Hello

I need a bit of help.

I am trying to use the emulator to send data onto a port which I am monitoring on my pc. I can open the port in the emulator but it freezes when I send data.

I am a bit confused over mapping the pocket pc 2003 emulator ports. Do I have to do this

I have added a port that connects to COM1 in the device appication. I am then simply executing the code:

if (serialPort1.IsOpen == true)
{
serialPort1.WriteLine("blah");
}

I am wanting to see the text blah in a port monitoring program on my pc.

thanks


Answer this question

Comm ports

  • Arska

    Yes. You should be able to bind Serial Port 0, 1, 2 on COM ports on desktop. The serial port 0 on emulator is COM1 on device, SP1 is COM2 on device and so on.

    However "Access denied" error on launching from save-state or from command-line with SP enabled will be visible with all port mappings with V2 CTP. With V2 RTM these are fixed.


  • dgolds

    The serial port 0 of emulated device is mapped to COM1 on CE and so on. Did you bind the SP0 of the emulator to the desktop COM port (From the File->Config->Peripherals)

    -Thanks,

    Mohit


  • Nick Winters

    Hi

    Thanks, I did bind serial port 0 to COM1 in the settings.

    When I create the port object what do I set the port as When I set it to connect to serial0 it says it does not exists. I set it to COM1 and it crashes.

    thanks.

  • Xavier Arnau

    Can you please let us know how you solved the problem So that we can get to root of the problem if there is any.

    -Thanks,

    Mohit


  • MPeter

    I have managed to connect a c# app to a device app on a PDA emulator over a virtual serial port.

    If anyone needs help let me know. To be fair the replies that I got in this and others threads were neither here nor there and did not solve the problem that others seem to be having.

  • Latso

    It looks that it could be a bug in Device Emulator. Can you please let me know whether the monitoring program you are using is free If yes, can you please let me know the download site of that

    Also, if you don't use monitoring program and work directly with physical COM ports do you still observe this issue What is the version of Device Emulator

    -Thanks,

    Mohit


  • term_paint

    Does this fix also cover the ActiveSync problem

    Also, any comment on access to the COM2 port

  • MNDANG

    By trawling through past posts I am slowly answering my own questions!

    I now know that only COM1 is connected to a 'real' COM port. COM2 is debug data and COM3 is IrDA.

    I found that there is a known bug in the Emulator that causes the start from SaveState to fail if a COM port is set when the State is saved.
    However, there seems to be a wrinkle to this not mentioned before: Even if the COM ports are unset before saving, if a COM port has been opened and closed, ActiveSync will not work when the Emulator is reopened. I always get the message that ActiveSync cannot recognise the apparatus.

    So I suppose now me real questions are:
    When will the bug(s) with Saving COM port settings be fixed
    I saw mention of v3 - but no planned release date.

    Will v3 have the ability to use COM2 as a real COM port like COM1
    Personally I really need this as my application is specifically designed to access 2 external devices simultaniously. Without access to 2 COM ports the emulator is useless to me.

    David.

  • Alex-MyRpg

    DWilbourn wrote:
    Further to the previous message:

    I have now tried using physical cables (albiet 2 USB to RS232 with a gender changer in the middle) instead of the virtual COM ports and the results are the same.

    I have also found that the error occuring on start from SaveState only occurs after opening the COM ports from within my application. The COM ports are provided by the Franson SerailTools ActiveX control. This control - and the entire application - works fine from within a real PDA.

    The state of the application running on the Emulator has no effect on the SaveState error. Exiting the Emulator while it is running or closing the application before Save & Exit
    both cause the error on restart.

    David.

    The "Access denied" error is fixed as part of V2 RTM and should be soon available although i am not in a position to provide any dates as of now.


  • thorlax402

    I think I have a similar problem. I am using the Device Emulator to connect to 2 Virtual COM ports (created with VSPD from Eltima - www.eltima.com/products/vspdxp/). After a cold boot I can connect to the COM port linked to SP0 and that works fine. However I have been unable to connect to the COM port linked to SP1 (or SP2). I did get some data out of SP1 - but it was not my data, it appeared to be a stream of debug-type data from the Device Emulator.

    The second major problem I have is that I can only connect to the COM port after a cold boot. If I save the config, exit and then start the Emulator from SaveState, I always get a "Unable to open serial port 'COM1'. LastError =Access is denied." error and the Device Emulator terminates. This happens with all combinations of rebooting the PC, restarting or reinitialising the virtual ports.

    This means that every time I want to start the Emulator I have to do it from a coldboot - which then means I also have to reinstall all my programs, data, fonts, etc AGAIN. As I am trying to use the Emulator to speed up deveopment on an application that accesses 2 COM ports, this is not very helpful!

    Device Emulator is version 8.0.60317.00

    David.


  • Ljhopkins

    Further to the previous message:

    I have now tried using physical cables (albiet 2 USB to RS232 with a gender changer in the middle) instead of the virtual COM ports and the results are the same.

    I have also found that the error occuring on start from SaveState only occurs after opening the COM ports from within my application. The COM ports are provided by the Franson SerailTools ActiveX control. This control - and the entire application - works fine from within a real PDA.

    The state of the application running on the Emulator has no effect on the SaveState error. Exiting the Emulator while it is running or closing the application before Save & Exit
    both cause the error on restart.

    David.

  • FernTheBrute

    Hi Mohit,

    I'm sorry, but I don't quite understand your reply.

    Do you mean that COM2 is *now* available as a COM port Because that is not the case for me. The only data I have ever got on COM2 is debug data from the core. I don't know about COM3 as that is IrDA which I don't use in my app.

    What is V2 CTP and V2 RTM Different versions of the emulator I just downloaded the emulator files from the website, I have no idea what version I have or how I can get the RTM.

    Does the SaveState fix also fix the problem with ActiveSync not being able to connect I have found that the autoconnect does not work on starting from SaveState, only from ColdBoot. However I can manually connect (using the button on the ActiveSync Config dialog)

    I have emulator version 8.0.60317 for WM5.0

    David.

  • Comm ports