COM Ports I/O Exception

  • I have a Problem with the COM Ports, perhaps it is my mistake, but in every case (COM1,2,3) i got an I/O Exception Error, when i want to open the COM Port. The code is working fine on my x64 System and I think everything is right.
    I am working on armstonea5 with wec2013 and i read that i had to remove ndcucfg on Startup and deactivated Serial Debugging (ndcucfg --> Serial debug off, ),which i have done, but i have the same Problem on every com port.


    Thank you very much !


    //Action

    Code
    1. Dim comport As New COMPortA
    2. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    3. comport.SerialPort1_DataWrite()
    4. End Sub


    //Class COMPortA


    Edit by F&S: Fix indendation by using "code" tags.

  • When I try it with dll Import, I have the same Problem:



    i just got back a False when i try to open the COM Port

  • Hello,


    i think we have more then one problem. At frist the "COM" seems to work else "ndcucfg" would not work!


    First problem may be that your communication settings are not supported at the time (refer http://www.forum.fs-net.de/viewtopic.php?f=65&t=3542). The new drivers is not released yet, so try "8,N,1" for your tests. We will relase new driver in KW12 (also for 7,N,2).


    Second problem may be that serial debug output and/or ndcucfg is still active:
    - disable ndcucfg -> delete in HKLM\Init the "Launch" for ndcucfg
    - disable serial debug Output -> step into the boot loader, enter "O" enter "Y".


    I can't imagine that the problem refers to CF3.9!

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • First Probleme:
    For the first time 8,N,1 is enough for us, cause it should be just a test with a RS485 Sensor to test a RS485 converter. So it is not so Important first time, but i have the same error with 8,N,1 and .net.


    Second Probleme:
    It is not possible to enter the bootloader with s or shift S (I press or hold S or s on Startup) but nothing happend (USB Keyboard on armstone). i read the documentation first step armstone a5 and armstone a8 but it is not working. When i open DCUTerm (com config: 8,N,1) for Serial Debugging i just see something like that:


    [i]7><-4>8<-114><-32><0><-128><-32><-16><-4><-114><-32><0><-128><-32><0><-16><-32><0><-2><-32>~<-8><-32><0><-128><-32>~<-8><0><-114><-32><0><-128><-32><0><-16><-32><0><-2><0><-32>p<-64><0>p8<-4><-32><-16><-4><-114><0><-32><-32><-114><-32><0><-128><-32><0><-16><-32><0><-2><0>~8<0><-4><-32><0><-16><-32><0><-16><-32><0><-16><-32><0><-16><-32><0><-16><-32><0><-16><-32><-114><0><-32><-64><-4>p<-57><-32><-2><-4>8<-4><-114><-32><-32><-8><-4><-114><0><-1>p<-8><-4><-16><0><-32>~<-57><-32><-114><-32><0><-128><-32><-114><-32><0><-32>~<7><0><0><-57><0><-32>~<7><-4><-32><0><-128><-32><0><-16><-32><0><-2><0>~8<0><-4><-32><0><-16><-32><-2><-4>p<0><-i]


    Note:
    - when i disable ndcucfg --> Serial debug off i have no dcu term Output, so it seems to work
    - ndcucfg is removed from startup

  • Hello,


    Quote

    For the first time 8,N,1 is enough for us, ...

    For sure we reworked the driver. Since V1.8 also "7,N,2" is working. We will include this driver in later kernel releases.


    Quote

    When i open DCUTerm (com config: 8,N,1) for Serial Debugging i just see something like that: ><-4>8<-...


    Goto "DCUTerm->View->Options" and set "Binary Output" to "off".
    What do you see now? NDCUCfg?

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • with binary off i see (as it was before):


    32><0><-4><0><-114><-32><0><0><0>p8<-4><0>p8<-32><-114><-4>p<0><-64><-32>~<-8>p<-1><0><-1>p<-1>~<7>~<7><0>8<0><-114><-16><-4><-114><0>p<-1>~<-8><-4><7><-4>~<7><-4><-32><0><-128><-32><-64><-1><-4>~<-57><-32><-114><0><-4><-4><-1><-4><-114>~<-57><0><-32><-114><0><-32><-64><-32><-32>8<-32><0><-4><0><-114><-32><0><0><0>p8<-32><0><-1>~<7><-4><0>8<0><-32><-114><-4>p<-57><0><-32>p<-1><-32><0><-128><-32><-64>p<-1><0>p8<-32><-32><0><-2><-32><-128><-4>p<0><-8><-32><0><-16><-32><0><-128><-32>p<0><-57><-128>p<-8><-4><0><-57><0><-4><0><-114><-32><-16>~<-57><0>p<-1>~<7><0><-32>~<7><-4><-4><-114>~<7><-32><-114><-32><7><0>?<-4><0><-32>~<7><-4><-4><-114>~<7>~<7><0><-114><-4><7><-32><0><-128><-32><-114><0><-57><-57><-32><7><0><-32>~<0><-57><-4><-32><-114><-4>p<-57><0><-32>p<-1><-32><-114><0><-32><-64><-4>p<-57><-4><-4>?<-4>p<-1><-57>p<-57><0><0>p8<-32><-32><-32>~<-57><-32><0><-8><-16><-4><-114>~<7>~<-57><-4><0><-57><0>


    with binary on i see:


    ,0x1C,0x7E,0xC7,0x00,0x1C,0x70,0xFF,0x1C,0x1C,0x7E,0x07,0x00,0x1C,0xE0,0x7E,0x07,0xFC,0xFC,0x8E,0x1C,0x7E,0x07,0xE0,0x1C,0x8E,0xE0,0x0E,0x07,0x00,0x1C,0x0E,0x3F,0xFC,0x1C,0x00,0x1C,0xE0,0x7E,0x07,0xFC,0xFC,0x8E,0x1C,0x7E,0x07,0x1C,0x7E,0x07,0x00,0x1C,0x8E,0xFC,0x0E,0x07,0xE0,0x00,0x80,0xE0,0x8E,0x00,0x1C,0x0E,0xC7,0x1C,0x0E,0xC7,0x1C,0xE0,0x0E,0x07,0x1C,0x00,0xE0,0x7E,0x00,0xC7,0xFC,0xE0,0x8E,0xFC,0x70,0xC7,0x00,0xE0,0x70,0xFF,0xE0,0x8E,0x00,0xE0,0x0E,0xC0,0xFC,0x70,0xC7,0xFC,0xFC,0x0E,0x3F,0xFC,0x1C,0x70,0xFF,0x1C,0x0E,0xC7,0x1C,0x70,0xC7,0x1C,0x00,0x1C,0x00,0x70,0x38,0xE0,0xE0,0x1C,0xE0,0x7E,0xC7,0xE0,0x1C,0x00,0x1C,0x0E,0xF8,0x1C,0xF0,0xFC,0x8E,0x1C,0x7E,0x07,0x1C,0x7E,0xC7,0xFC,0x00,0x0E,0xC7,0x00,


    But no Text?

  • Hello,


    DCUTerm baudrate is 38400? We have NBoot which switch to 115kBaud, but in general this NBoot should not delivered:(. Try 115kBaud and/or update your bootloaders.
    By the way, do you use latest firmware?

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Try DCUTerm baudrate 38400 and setting 8,N,1, i suggest this works and you will see "NDCUCfg"!
    Then disable "NDCUCfg" and try to access the port again.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • OK with 38400 and 8,N1 DCUTerm is working fine and it is possible to disable Serial Debugging!!!
    Bootloader Version is:


    Microsoft Windows CE Bootloader Common Library Version 1.1 Built Nov 26 2013 15:18:27
    Microsoft Windows CE Bootloader for armStoneA5 Built Nov 29 2013
    Portions copyright (c) 2012 F&S Elektronik Systeme GmbH
    Boot Loader, Version 0.6
    NBoot, Version VN05
    HW rev. 1.10


    - I disabled Serial Debugging succesfull (with O and Y)
    - I removed ndcucfg from autostart (when i reboot the System, dcuterm shows nothing, so it seems to work)

    But it is not possible to open the comports via .net.


    Note: I have the same Problem on each comport!!!! (I wrote it in first post), but i need comport 1 cause i need a rs485 converter (rts and cts)!

  • Sorry i found a small mistake in code !!!!!


    Everything is working fine !!!


    Thank you very much for good Support, but i found in docomentation that the Settings for dcuterm are 115200 and not 38400 !!!