Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-08-2013, 10:14   #16
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,250
Re: Installing Debugger and VDR Plugins

If you don't intend to use gpsd, and just want to use /dev/ttyUSB0, save yourself some headache and just un-install gpsd.

Thomas
__________________

__________________
cagney is offline   Reply With Quote
Old 07-08-2013, 10:19   #17
Registered User

Join Date: May 2013
Posts: 38
Re: Installing Debugger and VDR Plugins

well, why not using gpsd.. but for the moment, gpsd is the only way I managed to display a GPS point in openCPN.

even if I kill all gpsd instance, I don't manage to use /dev/ttyUSB0 under openCPN..

Do you think that un-install gpsd would solve the problem when using /dev/ttyUSB0?

Anyway, the best would be to have the choice^^
__________________

__________________
zodd is offline   Reply With Quote
Old 07-08-2013, 10:26   #18
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: Installing Debugger and VDR Plugins

zodd....

OK, I looked at OpenCPN code again, and guess what? We have a nice never-before-seen bug

OpenCPN (linux build) does not support baud rates other than 4800, 9600, and 38400. A simple oversight, and you had the good luck to be the test case for unexpected baud rates.

Code:
int OCP_DataStreamInput_Thread::OpenComPortPhysical(const wxString &com_name, int baud_rate)
{

    // Declare the termios data structures
    termios ttyset_old;
    termios ttyset;

    // Open the serial port.
    int com_fd;
    if ((com_fd = open(com_name.mb_str(), O_RDWR|O_NONBLOCK|O_NOCTTY)) < 0)
        return com_fd;

    speed_t baud_parm;
    switch(baud_rate)
    {
        case 4800:
              baud_parm = B4800;
              break;
        case 9600:
              baud_parm = B9600;
              break;
        case 38400:
              baud_parm = B38400;
              break;
        default:
              baud_parm = B4800;
              break;
    }
Ooops.

Easy fix, will be available on next Beta.

Sorry for the runaround.

Meanwhile, gpsd is your (temporary) friend.

Dave
__________________
bdbcat is offline   Reply With Quote
Old 07-08-2013, 10:38   #19
Registered User

Join Date: May 2013
Posts: 38
Re: Installing Debugger and VDR Plugins



Thanks you are great !!! I should have have a look on the source code too.. But I didn't imagine it could be that because it was working on Windows and as I'm a beginner in Linux world, I thought that it was me who missed something...

But with this issue, I learned a lot of things since yesterday , and that's a good thing !

And you're right, gpsd is now my friend it is really interesting to discover it

Well I'll describe you what I'm really attempt to do:
In fact I'm working on an program which receive a lot of informations with some NMEA datas encapsuled in the frames... So, what I really have to do is to uncaps the NMEA datas from the frames and send them to openCPN (which is on the same computer obviously). I'm looking for use socat to do a pipe between my program and openCPN..
maybe there is a better way to do this..? I still have a lot of things to learn

Thank you really much for your help !
__________________
zodd is offline   Reply With Quote
Old 07-08-2013, 10:38   #20
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: Installing Debugger and VDR Plugins

zodd/cagney....

Correct linux baud rate selection update committed to github(master).

Dave
__________________
bdbcat is offline   Reply With Quote
Old 07-08-2013, 10:54   #21
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,250
Re: Installing Debugger and VDR Plugins

Dave/Zodd

Good catch! Updating now!

Because gpsd autostarts, on plugin in the USB cable on *buntus, you will find yourself fighting against it all the time, if you really just want to connect to /dev/ttyUSB0. Just have gpsd installed if you are using it!

If you still insits use
Quote:
$sudo lsof /dev/ttyUSB0
to make sure nothing is blocking the access.

Thomas
__________________
cagney is offline   Reply With Quote
Old 07-08-2013, 12:04   #22
Registered User

Join Date: May 2013
Posts: 38
Re: Installing Debugger and VDR Plugins

Thanks Dave !!

That's reactivity ^^

I'll try it tomorrow (I'm not on my computer now...)

Thanks Thomas for the tip but what do you mean by "if I insist"?

$sudo lsof /dev/ttyUSB0 is to be sure that ttyUSB0 is not used by gpsd, isn'it?

To have a gpsd autostart, I was thinking doing a script launched at boot. Do you think it wouldn't work?
__________________
zodd is offline   Reply With Quote
Old 08-08-2013, 01:32   #23
Registered User

Join Date: May 2013
Posts: 38
Re: Installing Debugger and VDR Plugins

Hello,

I never used GIT before.

What should I do to update the installed openCPN I have on my computer?


Should I un-install it like this:

sudo apt-get remove opencpn



and download the source code like this:

git clone git://github.com/OpenCPN/OpenCPN.git


and thus compile it ?
__________________
zodd is offline   Reply With Quote
Old 08-08-2013, 06:48   #24
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: Installing Debugger and VDR Plugins

zodd...
First of all you have to read Compiling - Linux | Official OpenCPN Homepage
All the steps you have to do are there, if something is not clear enough, let us know and we will make it clearer...

Pavel
__________________
nohal is offline   Reply With Quote
Old 08-08-2013, 07:08   #25
Registered User

Join Date: May 2013
Posts: 38
Re: Installing Debugger and VDR Plugins

Hello Pavel,

I've allready compiled the source code of openCPN. Your explanations are really good^^

What I want to know is if I have a version of openCPN allready installed on my computer, do I need to un-install it to update to the new version.
__________________
zodd is offline   Reply With Quote
Old 08-08-2013, 08:25   #26
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: Installing Debugger and VDR Plugins

zodd...
Depends on if you want to or not. If you do a local build, the default install location is /usr/local. The official packages install to /usr. You can have both coexist quite fine.
If you want to replace the packaged version, you have to use
Code:
cmake -DPREFIX=/usr ..
Then I would probably first uninstall the official package

or you can generate your own DEB package using
Code:
make package
and then install it using dpkg or other system tool instead of doing
Code:
sudo make install
Like that it will still be manageable using the system tools

Pavel
__________________
nohal is offline   Reply With Quote
Old 08-08-2013, 08:40   #27
Registered User

Join Date: May 2013
Posts: 38
Re: Installing Debugger and VDR Plugins

Thanks Pavel,

I'll do an un-install with sudo apt-get remove opencpn
and after I'll generate my own DEB like you advise me^^

Regards,
__________________

__________________
zodd is offline   Reply With Quote
Reply

Tags
plug

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 02:30.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.