TCP/IP Library

Hello.
I am searching for a commercial c++ TCP/IP library to be used on Solaris (both Intel and SPARC). Is anyone aware of any such libraries?
Thanks in advance,
Jim

Hello Robert,
thanks for your answer.
To give a some more details:
I can´t say if it is happening with trying to use any TCP from CVI. Because if the application is running on an WinXP PC (my notebook, even installed from the distribution kit) everything is fine. On a Windows 7 PC my application already fails on the ConnectToTCPServer call with the above mentioned error. With PuTTY I can establish TCP connections, a python script (though I am not sure if my python supports Win 7) shows the same problem.
Some more details about the task: I have to establish two TCP connections as client, one to my data acquisition hardware, second one to a TCP Server provided by automationX (some soft-sps solution). If I run my application on my notebook with WinXP everything works fine (even the automationX stuff I connect to is running on a Windows 7 PC). Now I install the application on a Windows 7 PC and both ConnectToTCPServer calls fail with the above mentioned error. So I have no chance to test other TCP calls from the library.
Actually this behavior makes me think that is a problem with the Winsock of Windows 7. Why otherwise it would run on my XP notebook and would fail on the ConnectToTCPServer on the Windows 7 PC?
Unfortunately, being in Asia atm, I only have the CVI 6 version with me. I will travel back to Germany next week. I have the upgrades up to CVI 9 there, but I never installed them. (Never change a running system ) On the other hand, probably it is time to do so. Never had to work with Win 7 before.
I just wanted to know if anyone else experienced some similar problems and if there is a workaround (maybe even in Win 7 to make the socket behavior / handling like it was on WinXP).
But I guess I have to finally install the upgrades.
Is CVI 9 compatible / tested with Windows 7?
Best regards,
Dirk

Similar Messages

  • Error Loading the TCP MIB Library" error when you add a standard TCP/IP printer port in windows 7 32 bit

    When I am trying to add TCP/IP port in Add printer wizard  it gives the message 
    Error Loading the TCP MIB Library" error

    Hi,
    This behavior may occur if a third-party version of the Wsnmp32.dll, Ntprint.dll, Tcpmib.dll, Mgmtapi.dll, or Snmpapi.dll file has been copied to the %SystemRoot% folder.
    To resolve this behavior, rename or delete these file in the %SystemRoot% folder. These files are taking precedence over the Microsoft-supplied file in the
    %SystemRoot%\System32 folder.
    Karen Hu
    TechNet Community Support

  • TCP/IP Library and Windows 7

    Hi together,
    I have the following problem: I am trying to build up TCP/IP connections as client. On my notebook (WindowsXP) everything works like a charm. But when I install the application on a Windows 7 PC, no connection is possible.
    ConnectToTCPServer fails with "WSAE_UNKNOWN".
    Probably this has to do with the socket handling from Win 7. Currently I still have the Measurement Studio Ver. 6.0 on my notebook, because my applications always worked fine on WinXP PCs.
    So my question is: Is this a known behavior? If so, is there a workaround or is the only solution a newer CVI Version?
    Thanks for any help,
    Dirk

    Hello Robert,
    thanks for your answer.
    To give a some more details:
    I can´t say if it is happening with trying to use any TCP from CVI. Because if the application is running on an WinXP PC (my notebook, even installed from the distribution kit) everything is fine. On a Windows 7 PC my application already fails on the ConnectToTCPServer call with the above mentioned error. With PuTTY I can establish TCP connections, a python script (though I am not sure if my python supports Win 7) shows the same problem.
    Some more details about the task: I have to establish two TCP connections as client, one to my data acquisition hardware, second one to a TCP Server provided by automationX (some soft-sps solution). If I run my application on my notebook with WinXP everything works fine (even the automationX stuff I connect to is running on a Windows 7 PC). Now I install the application on a Windows 7 PC and both ConnectToTCPServer calls fail with the above mentioned error. So I have no chance to test other TCP calls from the library.
    Actually this behavior makes me think that is a problem with the Winsock of Windows 7. Why otherwise it would run on my XP notebook and would fail on the ConnectToTCPServer on the Windows 7 PC?
    Unfortunately, being in Asia atm, I only have the CVI 6 version with me. I will travel back to Germany next week. I have the upgrades up to CVI 9 there, but I never installed them. (Never change a running system ) On the other hand, probably it is time to do so. Never had to work with Win 7 before.
    I just wanted to know if anyone else experienced some similar problems and if there is a workaround (maybe even in Win 7 to make the socket behavior / handling like it was on WinXP).
    But I guess I have to finally install the upgrades.
    Is CVI 9 compatible / tested with Windows 7?
    Best regards,
    Dirk

  • TCP Client data loss

    Hello,
    I have written a program that connects to a TCP Server using the TCP support Library of the CVI to exchange data between my program and that server. The problem is that it seems that this library seem to loose many received frames, as I see the PC has indeed received them (using the Wireshark to analyze the traffic I see the response from the server) but I do not get the "TCP_DATAREADY" event in the callback function.
    Sometimes I have seen that I do not get the TCP_DATAREADY envent until I send more data through the socket, but in the Wireshark I can see that the data was received seconds befor.
    This does not happen always but is quite frequent.
    Thank you

    Hi,
       maybe I'm out, but are you sure that you read all data  from callback?
       I think that TCP_DATAREADY is not necessarily received by every IP frame.When there is lot of data communication or application performs some computation in time of incomming IP frame, it is chance that one TCP_DATAREADY contains data from multiple frames.I am also not sure if is guaranteed that in callback alwais can be read whole IP frame(specialy if it is fragmeted on the way)

  • Library error language selection

    Hi all,
    how can I select the language of error messages resulting from library calls like TCP support library or UDP support library or ... ?
    Thanking you in anticipation.
    Solved!
    Go to Solution.

    Hi Yeti0815,
    the messages of the prompt errors are in english, because the help and error explanations are in this language.
    If you want other messages you can implement your own failure handling.
    If you have more questions, please let me know
    best regards
    Alexander Glasner
    AE NIE

  • How often is TCP_DATAREADY generated?

    What I'm doing:
    I'm working on adding a Wi-Fi module to a product that uses a small embedded micro-controller.
    The micro operates as a TCP server communicating via Wi-Fi.
    I've developed a LabWindows/CVI application to display the data that the micro collects.
    In one mode of operation the micro delivers a continuous stream of 20 byte frames.
    The frames are sent at 3200 Hz.
    The LabWindows/CVI code connects to the micro as a client and then sends a command to start the 3200 Hz stream of frames.
    In the TCP callback function (the one that is registered with the call to ConnectToTCPServer(...) )the TCP data is read and handed off to the rest of the application.
    The problem:
    The TCP callback where it handles the TCP_DATAREADY case is not called often enough to keep up with
    the stream of data.  ( I am calling ProcessSystemEvents() in the loop that waits for data)
    My questions:
    How often can I expect to get a TCP_DATAREADY in the TCP callback?
    How much buffering of the incoming TCP data is there?
    In other words how long can my code be "away" from the callback before things get too backed up?
    One other thought:
    Everything has been working well using a directly connected serial interface running at 2 mega-baud
    to connect to the micro.  With the serial connection there is large buffer on the COM port so I have
    a fairly long time before the code has to get back to process more incoming frames.  I'm trying to
    emulate this same behavior with the TCP client-server setup.
    Any ideas will be appreciated, thanks,
    Kirk

    Hi kirkm,
    I was able to do a little digging and did find an available knowledgebase article on this particular flag. You can find it here
    http://digital.ni.com/public.nsf/allkb/C5CC85D98C771FC78625768500565FAF
    It appears the TCP_DATAREADY event of a callback still requires a call to ClientTCPRead. In that function you can specify your data buffer size. That could be one approach to making sure you get the data needed, by specifying your given buffer size.
    Reading up on TCP Communication found at http://www.ni.com/white-paper/3067/en There is a section on how to react to the streaming nature of TCP. I will quote that section for reference:
    "In TCP, because data is sent in a byte stream, it is not possible to know how many bytes are present in the data stream. Therefore, you cannot query the LabWindows/CVI TCP Support Library to get the amount of data available. When you call ServerTCPRead or ClientTCPRead, the library returns the number of bytes read into the data buffer. If the number of bytes read is the same as the data buffer size, then more data still might be present in the data stream. You can read the remaining data immediately by calling the read functions again or wait until the TCP callback is called again with the TCP_DATAREADY event. The LabWindows/CVI TCP Support Library calls the TCP callback with the TCP_DATAREADY event whenever events are processed and there is data in the TCP stream. Refer to the LabWindows/CVI samples\tcp\message.cws sample program for code that shows how to read all the data in the TCP stream whenever the TCP callback receives a TCP_DATAREADY event. The ServerTCPWrite and ClientTCPWrite functions return the number of bytes written to the TCP stream, which might be less than the number of bytes in your data buffer. You must check for this condition and make sure all the bytes in your data buffer are written out successfully. The following code, based on code in the samples\tcp\messagewriter.c sample file, demonstrates how to check for this condition."
    Hopefully that will get things started.
    Regards,
    James W.
    Applications Engineer
    National Instruments

  • ConnectToTCPServer Failure in Windows7

    I am using "Measurement Studio Version 6.0, Labwindows/CVI" for my TcpIP Server and Client Program.
    It works very well in the Windows XP circumstance using below functions. 
    But the function ConnectToTCPServer fails with error message like below, whereas RegisterTCPServer works successfully at Windows XP and Windows 7 OS.
    I tried ConnectToTCPServer function at three computer, which results in same error message.
    I am looking for anyone like an angel who can help me. Thanks.
    <server side>
    RegisterTCPServer(6000, Server1Callback, 0);
    <client side>
    unsigned int handle;
    ConnectToTCPServer (&handle, 6000, "172.29.24.182", ClientCallback,NULL, 5000);
    <error message at client side>
    Non-fatal run-time error
    Library function error (return value == -2 [0xfffffffe]).
    Unable to establish conneciton

    Hi seong-yeon
    Did you confirmed if that port is available? Also try the computer name as the server host name in ConnectToTCPServer.
    Do you have all firewalls disabled? You can confirm with your IT department if there is any network security installed.
    This article discuss how to build applications with the TCP Support library and offers a couple of examples you can try to test the connection between the client and the server.
    Regards 
    Chris S.

  • About the GetHostTCPSocketHandle() function

    Hello,
    I'd like to know if the 2nd parameter of the function is corresponding to the "SOCKET" type in the Windows SDK? Can you tell me the usage of this function? Thanks.
    David 

    Phototype:
    int GetHostTCPSocketHandle(unsigned int Connection_Handle,int *Socket_Handle);
    Connection_Handle: TCP Support Library conversation handle that you obtain from ConnectToTCPServer or ConnectToTCPServerEx or receive in a server callback as the handle parameter of a TCP_CONNECT message.
    *Socket_Handle: System socket handle for the connection that connectionHandle identifies. (passed by reference);
    Status: Return value indicating whether the function was successful. Unless otherwise stated, zero represents successful execution and a negative number represents the error code.
    You can call the GetTCPSystemErrorString function to obtain a system message that describes the error. The system messages can be more descriptive than the TCP Support Library error codes. To obtain the correct system error message, you must call GetTCPSystemErrorString immediately after calling the TCP Support Library function that failed.
    For functions that read or write data (ClientTCPRead, ClientTCPWrite, ServerTCPRead, ServerTCPWrite), if the function was successful, the return value is the number of bytes transferred.
    You can have a maximum of 255 concurrent conversations and up to 1,024 connections. If you exceed this limit, -kTCP_TooManyConnections will be returned. You may not be able to open the maximum number of connections allowed by LabWindows/CVI because of limitations imposed by the operating system.

  • Datasocket 64 bit

    I would like to build and run my CVI application as a 64 bit exe. However it uses datasockets, so I cannot. Are there any plans to support datasockets for a 64 bit application ??  If so, when ?? And if not, what are the alternatives ?? (I'm thinking replacing the datasocket connection with TCP).

    Hello hjb,
    Currently, the DataSockets library is only compatible with 32 applications. However, you could use LabWindows/CVI TCP support library to develop your application. This library is compatible with both versions.
    Carmen C.

  • Modbus TCP to Modicon PLC using Modus library

    Hello. First, FWIW, I have zero experience using a network or Modbus. I need to communicate to a Modicon Quantum PLC using the modbus library.  Looking at the provided examples of TCP in the library it seems straight forward but I am evidently missing something.  It seems regardless of the address I send to the PLC I receive no response. I am using the "MB Ethernet example Master.vi".  Since the PLC is currently in operation I deleted the "coils to write" and "registers to write" events from the example since I didn't want to accidently cause any operational problems.  That leaves me with the simple 'time out' event executing every 100 ms reading coils and registers. I have the network address of the PLC and using a cross over cable directly from the computer, I can see the tcp receive and send lights flashing on the plc's communiction module as I attempt to read coils or registers.  But, I get no visible response written to the slave discrete inputs or the slave input registers arrays on the example front panel.  I added a loop to write addresses starting at 0 and let it run up to 12000 with no response.  The only documentation that has been provided to me about the PLC is a list of the PLC variable memory addresses.  All the addresses are either a 6 digit number starting with 4 (400063) or a 3 digit number such as 299.  If I try to send a 6 digit address the example returns an error and sending any other number ,at least up to 12000, gets no visible indication of response in the example.  I would appreciate someone cluing me in to what I'm not doing or what I'm doing wrong. Hope the question makes sense.  Thanks.

    I'm a bit confused as to what you are trying to do. From your post it appears as if you are using the MB Ethernet Example Master VI, but are you also using the MB Ethernet Example Slave VI as well? If you are running the Slave VI and update the Discrete Inputs or Input Registers, the Master VI should pick up on that if they are set up correctly. Also, you modified the Master VI, did you also modify the Slave VI?
    Stephanie O.
    DIAdem Product Manager
    National Instruments

  • Is there a cure against apple tv3 being unable to open videos or music from itunes library?

    HI!
    I recently bought an apple tv and was trying to playback video and audio files on it.
    activation of homesharing has been rather smooth (although i did have to open and close itunes several time). apple tv3 is able to download the library and lets me surf it.
    my problems start when i attempt to open more than one video/song (one after another of course). It shows this circle which indicates download but does nothing. i'm able to exit from this screen but any attempt to open any file afterwards brings me the same result - running circle/star with no playback.
    i read support info on the apple page and have followed more or less all recommendations, starting with allowing tcp/udp ports, making sure taht itunes is not on firewall, disabling power management on my  wireless adapter, etc.
    the most exciting thing is that i have the same problem if i run remote app on my iphone and/or ipad - it stops seeing itunes after a while. at the same time if i pair my ipad/iphone with itunes manually (using 4 digit password) it works smoothly.
    tech specs: latest itunes running on win 7, latest software running ipad/iphone/appletv. connection over wifi.
    i assume there must be a bug in the way itunes communicates with devices in the apple ID related homesharing. otherwise i can't explain why remote app works smoothly with itunes library in password pairing mode.
    Has anyone faced anything similar and found a cure against the problem?
    I hear different opinions re firewall, antivirus software (i use kaspersky). i'm not  technical guy but assume if those pieces of the system allow to play one or two songs and then freeze, i don't think that the problem is in those pc.
    WOudl be grateful for constructive feedback, hopefully with an easy solution:)
    P.S> airplay from ipad, itunes, iphone works perfectly and without glitches.

    Is this happening when playing from iCloud or locally from iTunes on your computer?  If it is from your computer is the computer going to sleep?  There is some bug in ATV that causes it to have problems being able to wake a computer that has gone into sleep mode.  Some times it works fine and then sometimes for like a week ATV will not be able to WAKE the iMac.  This can also be a problem if you are using an external hard drive and the hard drive is going into sleep mode. Also is iTunes running.  If iTunes is not on then ATV can not connect to get content.

  • XModem via TCP for Java

    I am sure that many of you experienced developers have read requests in the past concerning implmentation of Ward Christenen's XModem protocol over a TCP socket. If not, well... you are about to...
    This is a major hack... but it is starting to come together... thanks to Fred Potter for his source code to start this project...
    Objective:
    Basically, I want to create a console application which accepts an incoming connection and starts the receive mode for a XModem file transfer. I am using CGTerm (for Commodore retrocomputing) but can test with HyperTerminal as well...
    The user who connects to the server selects SEND and the FILE to send for a XModem file transfer... and the transfer begins...
    The incoming blocks of 128 bytes are written to a file
    After the transfer is over the server disconnects the client terminal.
    Here is what I have so far:
    import java.net.*;
    import java.lang.*;
    import java.io.*;
    // X-Modem Server implementation via TCP/IP socket
    public class XServer {
    public static FileWriter fw;
    public static void main(String[] args) throws IOException {
    // define the file
    try {   
    fw = new FileWriter("filename.txt");
    } catch (Exception e) {
    System.out.println(e);
    System.exit(0);
    int port = Integer.parseInt(args[0]);
    ServerSocket server = new ServerSocket(port);
    System.out.println("X-Server v1.0 - waiting for connection");
    Socket client = server.accept();
    // Handle a connection and exit.
    try {
    InputStream inputStream = client.getInputStream();
    OutputStream outputStream = client.getOutputStream();
    new PrintStream(outputStream).println("Go to send file mode!"); // sent to client
    System.out.println("Ready to receive file via X-Modem...");
    * BEGIN TRANSFER HERE!
    // set the debug flag
    XModem.debug = true;
    * Here we are instantiating a new InputStream that represents the remote
    * file that we are receiving. In this single line we are attempting to
    * start the flow.
    * Behind The Scenes: We're sending a NAK across the serial line repeatedly
    * until we finaly start seeing the data flow. If we don't see the data
    * flow, then we throw an exception.
    System.out.println("Sending NAK to start receive mode...");
    InputStream incomingFile;
    try {
    incomingFile = new XModemRXStream(inputStream, outputStream);
    } catch (IOException e) {
    System.out.println("ERROR! Unable to start file transfer!");
    e.printStackTrace();
    return;
    System.out.println("Starting file transfer...");
    * Here we are reading from the incoming file, byte by byte, and printing out.
    * Behind The Scenes: Internally, the read() method is handling the task of
    * asking for the next data block from the remote computer, processing it (i.e.
    * parsing, running checksums), and then putting it in an internal buffer. Not
    * all calls to read() will request a new data block as each block contains at
    * least 128 bytes of data. Sometimes you will only hit the buffer.
    try {
    for (;;) {
    int c = incomingFile.read();
    if (c==-1)
    break; // End of File
    // print character / byte
    System.out.print(c+",");
    // write to file
    try {       
    //System.out.print(".");
    fw.write(c);
    } catch (Exception e) {
    System.out.println(e);
    System.exit(0);
    } catch (IOException e) {
    System.out.println("error while reading the incoming file.");
    e.printStackTrace();
    return;
    // done
    System.out.println("File sent.");
    new PrintStream(outputStream).println("");
    new PrintStream(outputStream).println("transfer successful!");
    } finally {
    //client.close();
    // save the file
    try {   
    fw.close();
    System.out.println("file saved.");
    } catch (Exception e) {
    System.out.println(e);
    System.exit(0);
    * XModem keeps track of settings that the Receive and Transmit Stream classes will
    * reference.
    * <p>Copyright: Copyright (c) 2004</p>
    * @author Fred Potter
    * @version 0.1
    class XModem {
    public static boolean debug = false;
    * XModemRXStream is an easy to use class for receiving files via the XModem protocol.
    * @author Fred Potter
    * @version 0.1
    class XModemRXStream
    extends InputStream {
    // CONSTANTS
    private static final int SOH = 0x01;
    private static final int EOT = 0x04;
    private static final int ACK = 0x06;
    private static final int NAK = 0x15;
    private static final int CAN = 0x18;
    private static final int CR = 0x0d;
    private static final int LF = 0x0a;
    private static final int EOF = 0x1a;
    // block size - DON'T CHANGE - I toyed with the idea of adding 1K support but the code is NOT there yet.
    private static final int bs = 128;
    // PRIVATE STUFF
    private int ebn; // expected incoming block #
    private byte[] data; // our data buffer
    private int dataPos; // our position with the data buffer
    private InputStream in;
    private OutputStream out;
    * Creates a new InputStream allowing you to read the incoming file. All of the XModem
    * protocol functions are handled transparently.
    * As soon as this class is instantiated, it will attempt to iniatate the transfer
    * with the remote computer - if unsuccessful, an IOException will be thrown. If it
    * is successful, reading may commense.
    * NOTE: It is important not to wait too long in between calls to read() - the remote
    * computer will resend a data block if too much time has passed or even just give up
    * on the transfer altogether.
    * @param in InputStream from Serial Line
    * @param out OutputStream from Serial Line
    public XModemRXStream(InputStream in, OutputStream out) throws
    IOException {
    this.in = in;
    this.out = out;
    // Initiate the receive sequence - basically, we send a NAK until the data
    // starts flowing.
    init:for (int t = 0; t < 10; t++) {
    if (XModem.debug) {
    System.out.println("Waiting for response [ try #" + t + " ]");
    long mark = System.currentTimeMillis();
    out.write(NAK);
    // Frequently check to see if the data is flowing, give up after a couple seconds.
    for (; ; ) {
    if (in.available() > 0) {
    break init;
    try {
    Thread.sleep(10);
    catch (Exception e) {}
    if (System.currentTimeMillis() - mark > 2000) {
    break;
    // We have either successfully negotiated the transfer, OR, it was
    // a failure and timed out. Check in.available() to see if we have incoming
    // bytes and that will be our sign.
    if (in.available() == 0) {
    throw new IOException();
    // Initialize some stuff
    ebn = 1; // the first block we see should be #1
    data = new byte[bs];
    dataPos = bs;
    * Reads the next block of data from the remote computer. Most of the real XModem protocol
    * is encapsulated within this method.
    * @throws IOException
    private synchronized void getNextBlock() throws IOException {
    if (XModem.debug) {
    //System.out.println("Getting block #" + ebn);
    // Read block into buffer. There is a 1 sec timeout for each character,
    // otherwise we NAK and start over.
    byte[] buffer;
    recv:for (; ; ) {
    buffer = new byte[bs + 4];
    for (int t = 0; t < 10; t++) {
    System.out.println("\nReceiving block [ #" + ebn + " ]");
    // Read in block
    buffer = new byte[buffer.length];
    for (int i = 0; i < buffer.length; i++) {
    int b = readTimed(1);
    // if EOT - don't worry about the rest of the block.
    if ( (i == 0) && (b == EOT)) {
    buffer[0] = (byte) (b & 0xff);
    break;
    // if CAN - the other side has cancelled the transfer
    if (b == CAN) {
    throw new IOException("cancelled");
    if (b < 0) {
    if (XModem.debug) {
    System.out.println("Time out... NAK'ing");
    out.write(NAK);
    continue recv;
    else {
    buffer[i] = (byte) (b & 0xFF);
    break;
    int type = buffer[0] & 0xff; // either SOH or EOT
    if (type == EOT) {
    if (XModem.debug) {
    System.out.println("EOT!");
    out.write(ACK);
    break;
    int bn = buffer[1] & 0xff; // block number
    int bnc = buffer[2] & 0xff; // one's complement to block #
    if (
    (bn != ebn) && (bn != (ebn - 1)) ||
    (bn + bnc != 255)) {
    if (XModem.debug) {
    System.out.println("NAK'ing type = " + type + " bn = " + bn +
    " ebn = " +
    ebn + " bnc = " + bnc);
    out.write(NAK);
    continue recv;
    byte chksum = buffer[ (buffer.length - 1)];
    byte echksum = 0;
    for (int i = 3; i < (buffer.length - 1); i++) {
    echksum = (byte) ( ( (echksum & 0xff) + (buffer[i] & 0xff)) & 0xff);
    if (chksum != echksum) {
    out.write(NAK);
    continue recv;
    out.write(ACK);
    if (ebn == 255) {
    ebn = 0;
    else {
    ebn++;
    break;
    // We got our block, now save it in our data buffer.
    data = new byte[bs];
    for (int i = 3; i < (buffer.length - 1); i++) {
    data[(i - 3)] = buffer;
    dataPos = 0;
    public synchronized int read() throws IOException {
    // If at the end of our buffer, refill it.
    if (dataPos == bs) {
    try {
    getNextBlock();
    catch (IOException e) {
    throw new IOException();
    // If we're still at end of buffer, say so.
    if ( dataPos == bs) {
    return -1;
    int d = data[dataPos];
    if (d == EOF)
    return -1;
    dataPos++;
    return d;
    * A wrapper around the native read() call that provides the ability
    * to timeout if no data is available within the specified timeout value.
    * @param timeout timeout value in seconds
    * @throws IOException
    * @return int an integer representing the byte value read.
    private int readTimed(int timeout) throws IOException {
    long start = System.currentTimeMillis();
    for (; ; ) {
    if (in.available() > 0) {
    return (in.read());
    try {
    Thread.sleep(10);
    catch (InterruptedException ex) {
    //if (System.currentTimeMillis() - start > timeout * 1000) {
    if (System.currentTimeMillis() - start > timeout * 5000) {
    return -1;
    Here was the output...
    Original file:
    (Commodore CBM SEQ file exported to PC using DirMaster)
    ��
    � �
    � ��� �� �� ��� ��
    � �� �� ���� �� ��� ��
    � ��� ����������������������������������������������
    �� ����� ������� ����� �� ����� ������ ����� ���
    � �� ������ ������ ��� ��� �� ��� ���� �� ������
    � � ���
    ����
    � � ��OWERED BY �OLOR 64 ��� V8
    �UNNING �ETWORK64 V1.26A

    �UPPORTING 38400 �AUD �ATES
    �����/����/�������

    �ESTING �CHO-�ET V1 BETA

    �EATURING �ESSAGES, �ILES,
    �ET�AIL, AND �NLINE �AMES!
    �YS�P: � � � � � � � � �

    �RESS ANY KEY TO LOGIN\C�
    The result when the file was uploaded and received by my XServer:
    ? ? ??OWERED BY ?OLOR 64 ??? V8
    ?UNNING ?ETWORK64 V1.26A
    ?UPPORTING 38400 ?AUD ?ATES
    ?ESTING ?CHO-?ET V1 BETA
    ?EATURING ?ESSAGES, ?ILES,
    ?ET?AIL, AND ?NLINE ?AMES!
    ?YS?P: ? ? ? ? ? ? ? ? ?
    ?RESS ANY KEY TO LOGIN\C?
    The result is different!
    Can someone help me along here... I have been trying to figure out how to do this for approx. a year or so... it has been a very slow process.
    I could use a guru to help me out so I can write the upload and download routines for my Commodore BBS PETSCII Emulation Server.
    Visit http://www.retrogradebbs.com for details.
    Thanks.
    Please help out a dedicated developer who is in over his head...
    -Dave

    Ok. Fair enough. What about general information about Xmodem. This is a hard project because of how obscure the legacy technology is that I am having to implement using Java and MySQL.
    I have two major issues which I have to figure out how to troubleshoot and debug, if possible.
    1. The 23+ blocks exception when a file is being received
    2. The exception which is thrown immediately if I try to receive a binary file instead of an ASCII file.
    I read that telnet is a 7-bit technology and that is why Xmodem, which is an 8-bit technology is not that popular as a viable protocol via telnet, whereas Kermit is, since it was developed for 7-bit systems, i.e. mainframes and minicomputers.
    Is this correct?
    If that is the case, why does www.serio.com have a viable X-Y-ZModem library available (for several hundred $$$ of course) which can be used with both RS-232 serial ports and TCP socket ports? Obviously, it can be done. They are the ONLY company with this library for sale for Java to do this. I cannot justify that $$$ amount for a mere hobby (writing the BBS emulation server for supporting Commodore PETSCII (CG) callers via CGTerm or a native C-64 terminal program using Jim Brain's TCPSER middleware, which emulates a Hayes modem via telnet for telBBSing/retrocomputing.
    I really want to learn how to implement a file transfer protocol, since back in the 80s, I used Xmodem, Punter, Y/Z Modem, etc., a lot to upload and download files via modem at baud rates of 2400, 14.4, 19.2, and 38.4, respectively.
    It's fun to learn how the old skool gurus of telecommunications technology did it. It is one thing to run a BBS which supports these technologies and features, and it is an entirely other thing to learn how to design and develop them yourself for implementation into a project such as I taken on.
    It CAN be done. It WILL be done. However, I have just started my exhaustive research on how it needs to be done. I have read up as much as I could on XModem by Ward C., the father of the protocol.
    But, I have no information to help me figure out why the communications are acting as they do so far.
    Can someone please download the xserver.zip file on my website at:
    www.retrogradebbs.com/projects/xserver.zip
    Compile it. Run it. Connect using HyperTerminal, Netrunner, or another telnet terminal emulation program which supports Xmodem file transfers using WinSock.
    See what happens. With finals due in the next two days, this project will have to be put on hold until after I submit my two final projects.
    If anyone knows what needs to be done to support both ASCII and BINARY file transfers via Xmodem via a socket instead of a modem with RTS/CTS hardware flow control, please respond.
    I know for a fact that this can be done.
    - Dave

  • Remote Can't find library on a Win base iTunes library

    Hello,
    I am unable to remote my iTunes library from my iPad. My laptop is a windows base system. It has Win7 and my iTune's library is sharing.
    On my iPad, once the Remote app is launched, it does show and icon for my library on my lap top but when I click on it, I always receive the message that can't connect to library. I have turned off my firewall (at my computer), I opened the ports for TCP & UDP on my router as specified on the help/support page but no dice.
    Does any one have an idea of what is the deal?
    Message was edited by: Haizi
    Message was edited by: Haizi

    Hello,
    This is the same for me. Impossible to find a solution after.
    Can you help us.
    Thank

  • Remote does not find my Itunes Library

    I have 4 different mac and use Remote on my Ipod Touch to work with Itunes. Remote cannot connect to one of them (does not find the library). Settings (firewall, airport, account, permission, network...) on all my mac are similar but Remote does not work only with the MacBook Pro. Should I blame his airport card ? Or what ?

    I've also version 4.0 on my Ipod and I've checked the port TCP 3689 and UDP 5353 (as asked by Apple support website), they are well opened. I spent too much time on this...I give up Remote.
    Anyway thank you very much for trying to help me.

  • One solution for Apple TV losing connection to its iTunes Library

    In 2012 I bought an Apple TV3 to let me use the AirPlay features of my New iPad with my HD TV. All worked fine and still does. Later in 2012 I subscribed to Netflix and enjoyed streaming movies to my HD TV via the Apple TV. Having had such a good experience with it so far I bought another for our bedroom TV and another for a relative, hoping they would have the same great experience with it.
    Both of my Apple TV units at my house have worked flawlessly since installing them. We can start watching a Netflix movie downstairs then go upstairs and carry on where the movie left off.
    At my relative's house the experience was not so flawless and has resulted in about 2 months of frustration but happily their AppleTV3 is now also working as expected. It has been quite a journey to get to this point and had a surprising solution.
    I am the 'go-to' person in my family for these things so I installed the Apple TV for my relative.
    My relative has a Windows XP (SP3) PC running the latest iTunes (11.0.2), a BTHomeHub 2 router, connected by WiFi to the Apple TV. The PC was connected by ethernet cable to the router. I installed the Apple TV, set up the hdmi connection to the HD TV, connected it to the WiFi network, upgraded to the latest iTunes on the PC, added the Apple ID for Home Sharing to iTunes and the Apple TV and could connect to the iTunes library on the PC, all good so far. I could play video or music or podcast or view photos from the iTunes library on the PC but after a short time (a few minutes or so), if I tried to play a different video or music track the I would get the familiar spinning icon and the Apple TV would not play the media file. Often the Apple TV would still show the contents of the iTunes library but would not play anything from it. When it was in this state it was still possible to play iTunes Trailers or Purchased content or a Youtube video or display photos from my library. This proved it was still connected to the internet and to some extent my library on the PC because it could display photos.
    Initially I thought it was a WiFi problem as that was how the Apple TV was connected to the router. So as I already had a Powerline ethernet link running from the router to the TV for the Humax Freeview box for the BBC iPlayer, I ordered a small network switch to share the Powerline ethernet cable with the Apple TV. However the same drooping connection problems were apparent. I tried changing the QoS settings on the Powerline link, tried to prioritise TCP or UDP or both , but no improvement. I decided to abandon the Powerline link in case it was 'too slow', perhaps that was the issue.
    I tried one of the Apple TV units from my house, where they were working fine and I got the same problem, at my relative's house it behaved like their unit, it would connect play a movie (all the way through if we let it) but after a few minutes if trying to play something else it would not play anything further. I tried their Apple TV at my house and it worked there, so the unit was not at fault.
    At various times while troubleshooting these problems I have unistalled iTunes, reinstalled it, uninstalled Bonjour, reinstalled it (it comes with iTunes), searched the registry and cleaned it (Warning: do this at your own risk as you risk destabilising Windows), I have tried disabling my firewall on the PC and/or on the router, uninstalled the Antivirus / Firewall software (Norton) on the PC, I have added the Ports required for the Apple TV to my router and firewall software, I have read many, many forum posts about what has worked for other people and I tried them all in various combinations.
    I decided having tried the above that the problem must be the Windows PC, so I swapped it for a few days with a laptop, connected wirelessly to the router. I had an iTunes library on the laptop so I shared it with the Apple TV and stopped iTunes running on my relative's PC.  For a few days it actually worked, the Apple TV would play one movie/music track and I could select another and play it after a few minutes, a partial solution had been found except the laptop was needed elsewhere and I wanted the Windows PC to be the source for the iTunes library. I briefly considered suggesting they should buy a modern PC or Mac as their Windows PC was around 9 years old, may be that was the problem? This would have cost around £400+ and was out of the question. Fortunately I had a spare PC and I decided to swap it with the Windows PC, it was only a couple of years old and as such it must be 'better' I thought. Swapping one PC with another and transferring e-mails and documents etc. took quite a few hours but it was done. I uninstalled iTunes, reinstalled it and set up the home sharing again. This second Windows PC was running XP (SP3) and Norton 360 Firewall/Anitvirus software. I checked that after installing iTunes the Program rules in Norton were allowing the TCP and UDP communications expected by the Apple TV, I noted these were not specific ports but all TCP and all UDP communications were allowed. All of this met the recommendations that other posts had suggested. I tried it with the Apple TV but no, exactly the same problem, the iTunes library could not be found after a few minutes.
    I found that if I restarted the Apple TV it would connect and play a file (movie/music etc) but if I played an iTunes trailer or just waited a minute or so then it would lose the connection. Another symptom would be when I landed on the 'Compters' icon it would tell me to 'enable home sharing on the PC with this Apple ID' , which I had already done.
    If I tried playing via the Apple TV while selecting tracks from within iTunes on the PC, then sometimes the AirPlay icon was present or not present, sometimes worked and would then always not work until I restarted at least iTunes and the Apple TV, if not also the router or PC, whatever I tried it would not result in a connection between the Apple TV and the PC that would survive more than a few moniutes at a time.
    Having swapped the Windows PC hosting the iTunes library with another I swapped the Apple TV again with one from my house, again same behaviour. So this suggested the problem was the BTHomeHub router as that was the only bit of hardware not exchanged. I compared its settings with the same unit at my house, I tried forwarding ports, I tried chaging the security from the default 'WPA & WPA2' to WPA or WPA2, still no solution. I tried reducing the default WiFi connection protocol from 802b/g/n to 802/b/g. I tried variations of all the other possible settings that could be changed but in the end set them to match the ones at my house. Still no solution. I considered buying an Airport Extreme or similar to link that via an ethernet cable to the router and enable it to be the WiFi access point for the Apple TV. This would have cost around £80 similar to the cost of the Apple TV itself, so was also dismissed as an idea.
    I decided to restore the router to factory settings, this was done and I set up the WiFi connection again to the Apple TV, still no solution, same behaviour on the Apple TV. I decided it must be  a problem with the WiFi so I tried a direct ethernet cable trailed through the house from the router to the Apple TV to eliminate the WiFi involvement, that would have to be the answer, wouldn't it? No, same problem.
    I discovered some useful diagnostics along the way that are somewhat techie but worth persevering with as they could be useful for diagnosing what the problem could be. Find out on your router what the IP Address is for your computer that is hosting your iTunes library and the IP Address for your Apple TV. The IP address is essential for either device to connect with each other or the internet. The Apple TV IP address can be seen via Settings/General/Network, it has the form like '192.168.1.69'  and for the PC it was '192.168.1.80', the values don't have a particular significance but the last digits after the 3rd dot will be different for each device.
    On the PC (or Mac), open a Command (PC) or Terminal(Mac) prompt and try to 'ping' the Apple TV to see if you get a response
    e.g.
    c:\ping 192.168.1.69
    or
    c:\ping apple-tv
    You should get a response indicating the number of milliseconds it takes for the 'ping' to be returned to the PC from the Apple TV , this will show that the PC can connect to the Apple TV, if it does not get a response then you should check that the PC and Apple TV are connected to the same network (either wired or wifi). You must be able to get a successful ping for the connection between the PC and the Apple TV to work at all.
    Another diagnostic is to check the network status on the PC (or Mac)
    e.g.
    c:\netstat -an
    This will show all the current TCP/UDP connections and also the local and remote IP addresses and ports. Look for the IP address of the Apple TV in the third column, there will be many rows returned so just concentrate on the rows with the IP addressses of the PC and the Apple TV
    e.g.  look for rows like the following:
    TCP 192.169.1.80:3689  192.168.1.69:49123 ESTABLISHED
    UDP 192.168.1.80:5353  *.*
    UDP *.123                     *.*
    TCP Port 3689 is used by the Apple TV to communicate with iTunes for playing content. This connection is essential, there may be more than one 'established' connection to the remote Apple TV from the local PC.
    UDP Port 5353 is used by the Apple Bonjour service to send multicast communications between iTunes and any iOS devices on the same network, such as the Apple TV, again it is essential.
    Port 123 is used by Apple products to obtain the date and time, the UDP row above shows that any local IP Address can communicate with any remote IP address on the router's network and provide it with date and time information. 
    If your firewall software on the PC is blocking any of these ports then the 'netstat' command is useful to see if you need to unblock any. In my experience, this port unblocking was not necessary as when I installed iTunes, the Norton software automatically set up appropriate rules for the iTunes program, and opened the required TCP and UDP communications as iTunes needed.
    Likewise, on the router itself, I have the UPnP setting enabled and this allows software like iTunes and Bonjour to traverse the router's firewall without it being necesssary to explicitly set the ports to be forwarded.
    If I started the Apple TV, and ran the 'netstat -an' command over the next few minutes I could see the number of rows for the Apple TV diminish, and this was a symptom of the dropping connection problem.
    Ultimately having replaced the Apple TV with another 'working' one , swapped the PC, restored the router to factory defaults, disabled the Windows or Norton firewall, tried ethernet and WiFi connection between the router and Apple TV it struck me that the only component I had not  considered was the insignificant ethernet cable linking the PC to the router. This has been present since the router was installed for the original PC around 4 years ago. But surely this was how the original PC and the swapped in PC were getting to the internet quite normally and successfully? Also this was how the Apple TV was accessing the PC via WiFi then via the router through this ethernet cable, there was no way it could be the cable, cables don't allow a connection for a short time and then cause a timeout can they?. Thus, confused, and with all other avenues explored, I removed the cable between the PC and the router and enabled a WiFi connection from the PC to the router. After restarting the PC, Router and Apple TV, just to be sure, I tried the Apple TV again.
    I could play some music on the Apple TV from the iTunes library, I could play it for a minute or so and then go to movies and play a movie from the iTunes library. I tried to play an iTunes trailer, some YouTube videos, these worked as usual. I then went back to the library and yes, I could play another music track or another movie. I forced the Apple TV to 'sleep' via Settings/General/Sleep Now and tried again, I woke it up and could play any music or movie from the library. Elated, I went out for meal with the family, nervously hoping throughout the meal that the solution had been found. After a couple of hours we returned, woke up the Apple TV and yes, oh yes!, it would connect with the library and play a succession of music or videos without seeing any dropped connections. Several hours later I could wake up the Apple TV again and select any content from the iTunes library on the PC and play it, finally the unit is behaving as I would expect.
    This solution may not apply for all, but it worth following all of the components in the path between the Apple TV, router, computer (either PC or Mac) and the iTunes library and checking that each is able to commmunicate successfully and over a period of time reliably so that the Apple TV can perform as flawlessly as it is capable of. 
    Don't, as I did expect the solution to involve a complicated series of special settings of ports or communications protocol changes. Do perform a clean install of iTunes and keep it updated, do keep Firewall settings simple and let the settings be default settings, do rely on UPnP (Universal Plug and Play) on the router. Let the router select which channel it wants to use, it will select the channel with least interference...and check out that insignificant ethernet cable if you have one. It might work fine for general communications from the computer to router to the internet but it can be a source of connections dropping on the Apple TV!
    My relative is now a happy Apple TV user too.

    Useful to watch what is happening to the TCP/UDP connections when the Apple TV is connected to iTunes and when it is actually playing some media from iTunes and when it stops playing.
    To see this, use the Network Statistics command 'netstat' from a Command prompt (Windows PC) / Terminal Window (Mac):
    e.g. for Windows:
    c:\netstat -an 5
    This repeats the netstat command every 5 seconds, use Ctrl-C to quit the command. (Use 'netstat -h' for help with this command)
    While iTunes is running there will be a number of TCP records displayed for the computer's IP address using port 3689, showing at least 3 ports in use for the Apple TV's IP address.
    i.e.
    TCP host_ip:3689 apple_tv_ip:49187 ESTABLISHED
    TCP host_ip:3689 apple_tv_ip:49196 ESTABLISHED
    TCP host_ip:3689 apple_tv_ip:49255 ESTABLISHED
    When it is playing content there are more connections established, some of these rows will gradually disappear when the media file stops playing. These addional TCP records show iTunes using different ports from 3689, but only while media files are being played.
    When a video file is played, (on this Windows PC at least) the iTunes host is using ports 4463 and 4464, with the Apple TV using port 7000. When playing a music track or podcast, the iTunes host is using port 4472 or 4489 and the Apple TV is using port 5000.  
    When the media is playing, the fourth column returned by the 'netstat -an 5' command : 'State' shows as 'ESTABLISHED' and shortly after the media file is stopped playing it shows as 'TIME_WAIT' until the record disappears after a minute or so.

Maybe you are looking for

  • Error while deploying a webservice

    i created a webservice and i see the following exception BUILD FAILED /home/suresh/bea/user_projects/workspaces/myproject/build.xml:24: Problem: failed to create task or type wldeploy Cause: The name is undefined. Action: Check the spelling. Action:

  • Did the requested upgrade and now iTunes won't open for anything

    I upgraded to the newest version and now iTunes wont open, no error message, nothing. It looks as if it's going to launch when I click on it but nothing happens. This Happened last time I upgraded but it worked itself out after a few mins but this ha

  • Statistic report with figures that will not change when rerun months later

    Hi, Is there any good practices that we can follow to create statistic reports with figures that will not change even when rerun after few months later? My scenario is my statistic report is generated based on data that is "alive" which means the rec

  • How To Split File In to Multiple Files With out using B.P.M

    Hi Guys, How To Split File In to Multiple Files With out using B.P.M. Thanks in advance Regards's KIran.B

  • Cable length?

    From all the pictures it looks as though the MB/MBP needs to be fairly close for connection. There is no spec that I saw as far as length of cable (pwr,usb,displayport). Also I know of no mini display port or magsafe extension as of this time.