Available Ports in Linux

Discussion in 'Acer Aspire One' started by mylittleacer, Jun 2, 2012.

  1. mylittleacer

    mylittleacer

    Joined:
    Jan 22, 2011
    Messages:
    11
    Likes Received:
    0
    I would really appreciate it if somebody could give me some pointers/ hints towards solving this problem.

    I use AAO ZG5 running linux mint. I want to use the netbook to identify and follow ship movements at the coast. This involves using two USB dongles, one for GPS and the other for AIS. I have got the system up and running perfectly on a number of occasions. The programme is opencpn.

    The GPS USB device is recognised on port ttyUSB0 or TTYUSB1. Its only a simple matter of selecting the correct port (either by checking first or just trial and error) to get the device to work (so no problem) .

    The AIS USB device is recognised on port ttyACM0 or ttyACM1. However, this is much more unpredictable. Sometimes it connects and sometimes it won't (even when i specify the corrrect port as indicated in dmesg). Sometimes dmesg and lsof give conflicting info on which port is used. Trial and error doesnt seem to help as it looks like the port is blocked. If I get it to work, it will stay working indefinitely, but when i close the programme or the netbook, it wont find the port again.

    It doesn't seem like a problem of finding the correct port but rather that the port is blocked, confused or otherwise out of action.

    Grateful for any suggestions.
     
    Last edited: Jun 2, 2012
    mylittleacer, Jun 2, 2012
    #1
  2. mylittleacer

    seacur

    Joined:
    May 4, 2012
    Messages:
    12
    Likes Received:
    0
    When this happens. Try setting the ports to "None", shutting down OpenCPN, disconnecting the device(s), restarting OpenCPN, connecting device(s) then selecting ports. Sometimes I have to shut down and restart the PC as well.

    I have found that OpenCPN is easily confused about ports. Even when using a single device always on the same port. After having a device connected and shutting OpenCPN down upon restart I will frequently get an error msg telling me the port is already in use.

    The most reliable work around I have found to date is to always set OpenCPN's ports on "None" before shutting down.

    Also, depending upon the GPS and AIS hardware you are using you have two additional options

    1 - Take your GPS data directly from the AIS. Class "A" AIS have built in GPS
    2 - Feed your AIS data to the GPS and then connect the GPS to your port

    OpenCPN does much better when connected to a single port.

    This OpenCPN behavior seems to be consistent across hardware and OS. I run OpenCPN on a variety of hardware and OS setups. A newish AO722 running Win 7 to an antique P4 running Win XP. I have also run OpenCPN under Ubuntu 12.04, 11.10, 10.10 until it went out of support in Apriil and 10.04
     
    Last edited: Jun 3, 2012
    seacur, Jun 3, 2012
    #2
  3. mylittleacer

    mylittleacer

    Joined:
    Jan 22, 2011
    Messages:
    11
    Likes Received:
    0
    Thank you very much! Thats really helpful. I had thought that the issue was related to Linux or Acer but your experience puts a different gloss on it entirely.

    I have also been experimenting with the stty and ttylog commands and think they will be useful in helping to monitor the port. Unfortunately I have no AIS signal here now to test it. Do you know if there is anyway to test that the AIS is working in the absence of a signal (because no transmitting ships in range)?
     
    mylittleacer, Jun 3, 2012
    #3
  4. mylittleacer

    seacur

    Joined:
    May 4, 2012
    Messages:
    12
    Likes Received:
    0
    No, I don't know how to test AIS functionality in the absence of AIS data.

    I don't know how to get OpenCPN to show AIS connections data other than displaying target data on the screen.

    I can guess that your AIS hardware will output something even with no ships in range. All of the marine electronics that I have experience with output data at timed intervals. If there are no data to send they output their identifier and null data.

    I don't have enough knowledge of Linux to help you figure it out at the lower levels.
     
    seacur, Jun 3, 2012
    #4
  5. mylittleacer

    mylittleacer

    Joined:
    Jan 22, 2011
    Messages:
    11
    Likes Received:
    0
    Thanks.

    Just for your info, I have been experimenting with ttylog -d /dev/ttyACMx (x= 0,1 etc) which I understand will log output from the port.

    If x is the port not in use it says "no device is set "

    If I use ttylog on the port that is connected, it gives me nothing at all, just the flashing cursor in the terminal.
    If i then disconnect the AIS USB, I get a stream of characters like " ?j?qn " repeating very quickly. From this I would assume that it was indeed connected to the port; however like you I would have expected to see some data, even rubbish, while it was connected.
     
    Last edited: Jun 3, 2012
    mylittleacer, Jun 3, 2012
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.