The Navigatrix has been updated. The new website can be found at navigatrix.net.




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Using Picoscope 2208 with navigatrix

Joined: 08 Jan 2011, 19:07
Posts: 27
Hi Moe,

I have a PC based Picoscope 2208 oscilloscope that I use for ham radio building and repair. I would like to use it with Navigatrix but I'm afraid I'm in a bit over my head. The company that makes the scope has Linux drivers but says that the programs that came with the drivers have to be compiled with a C++ compiler. I have done some very limited work with C++ and have code composer for windows but I'm not sure where to start with Linux. Here is a link to the Linux drivers. http://www.picotech.com/linux.html . I followed the install instructions and have the libraries installed. I looked at the code in the files and can certainly copy and past them to a compiler but I'm not sure if that is all that there is to it. If you could point me in the right direction I would be grateful.

Thanks,

Tim


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 04 Nov 2010, 20:51
Posts: 1062
I'll take a look after breakast...


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 04 Nov 2010, 20:51
Posts: 1062
I'll assume you've downloaded the source code...if not do so.

Use the Archiver to open the file.

Create a new directory (like pico) in your /Downloads directory and extract the contents there.

(The archive you've downloaded has minimal internal structure. If you don't extract it into a 'new' directory the contents of this achive will be scatter in your Downloads directory and you will have to hunt for the pieces....and clean up is a bugger if you have more than few files in that directory.)

In the 'pico' directory is yet another archive (libusb_pico.tar.gz)...simply extract it to the same directory. A new directory, libusb, will be created. This is where the goodies are.

Open a terminal. For ease, put your terminal in the working directory
Code:
cd Downloads/pico/lsusb

If you haven't updated your list of repositories in a while...
Code:
sudo apt-get update
...if you have updated them recently, well than it's a waste of time. But you still need to get some more tools for this job
Code:
sudo apt-get install autoconf libtool
It will install 5 packages. (You could also add doxygen to the list. It adds another 11 packages with an additional 49MB download, which may --or may not-- add additional documentation to the compilation that may --or may not-- be helpful. It's not necessary. It's your choice.)

When done; open configure.ac
Code:
gedit configure.ac
Find the 4th line. It reads AC_CONFIG_MACRO_DIR([m4]). Delete it. Otherwise it will only cause you pain. Save yourself the headache. Delete it. Save the file.

Open another file...
Code:
gedit Makefile.am
Find the 2nd line where it reads ACLOCAL_AMFLAGS = -I m4. It too is a problem child. Delete it. Save the file and exit gedit.
Reconfigure your build environment
Code:
autoreconf -i

Configure
Code:
./configure
Make the driver.
Code:
make
Install the made driver
Code:
sudo make install

The rest of the instructions about adding a usergroup; adding a user to that group and whatnot are in the INSTALL file that is in the libusb directory of the source code from your buddies at Picoscope.

Give it a go and let us know.

If it all works (fingers crossed) sudo rm -rf ~/Downloads/pico will sweep the floor and turn out the light when you're done.


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 08 Jan 2011, 19:07
Posts: 27
Thanks Moe!!! I'll give it a shot and let you know how it goes.

Tim


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 08 Jan 2011, 19:07
Posts: 27
Hi Moe,

I gave it a shot. Everything was going smooth and then...

I have the following errors:

nx@nx:/cdrom/DOWNLOADS/Pico/libusb$ ./configure
bash: ./configure: Permission denied
nx@nx:/cdrom/DOWNLOADS/Pico/libusb$

Any suggestions?

Thanks Again,

Tim


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 04 Nov 2010, 20:51
Posts: 1062
Yeah, it looks like the files and possibly the directory are most likely own by 'root'.

Rather than preface everything with sudo or acting as root with sudo -s to give yourself permission to write to the directory/files. It might be better to transfer the ownership of the entire directory (and files) to you.
Code:
sudo chown -R <your_user_name> ~/Downloads/pico
This means acting as root recursively change the ownershito to <user_name> of everything in your /home/<user_name>/Downloads/pico directory. This will include the files. E.g., sudo chown -R baboo ~/Downloads/pico ...if your user name is baboo.

Then you can proceed with the rest of the stuff...

oh, sorry. I just noticed the user name is nx and I used a lower case "p" in pico....but you can figure it out.

Good luck.


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 08 Jan 2011, 19:07
Posts: 27
Hi Moe,

Einstein would consider me certifiable. I have tried this over and over every way I could think of with the same result.

This is my latest attempt:

nx@nx:/cdrom/DOWNLOADS/Pico/libusb$ sudo apt-get install autoconf libtool
Reading package lists... Done
Building dependency tree
Reading state information... Done
autoconf is already the newest version.
libtool is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 186 not upgraded.
nx@nx:/cdrom/DOWNLOADS/Pico/libusb$ autoreconf -i
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:2: installing `./missing'
examples/Makefile.am: installing `./depcomp'
Makefile.am: installing `./COPYING' using GNU General Public License v3 file
Makefile.am: Consider adding the COPYING file to the version control system
Makefile.am: for your code, to avoid questions about which license your project uses.
nx@nx:/cdrom/DOWNLOADS/Pico/libusb$ ./configure
bash: ./configure: Permission denied
nx@nx:/cdrom/DOWNLOADS/Pico/libusb$ sudo chown -R nx ~/Downloads/Pico
nx@nx:/cdrom/DOWNLOADS/Pico/libusb$ autoreconf -i
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
nx@nx:/cdrom/DOWNLOADS/Pico/libusb$ ./configure
bash: ./configure: Permission denied
nx@nx:/cdrom/DOWNLOADS/Pico/libusb$

I am assuming that when I run " sudo chown -R nx ~/Downloads/Pico " that it gives me ownership of all of the subdirectories also.

I have noticed that I have two different paths for the same file.

/home/nx/Downloads/Pico/libusb

/cdrom/DOWNLOADS/Pico/libusb

Which do I use? I believe that I have tried both but I've done this so many time it all starts to run together.

It doesn't seem to matter what I do, I come up with the same error.

nx@nx:/cdrom/DOWNLOADS/Pico/libusb$ ./configure
bash: ./configure: Permission denied
nx@nx:/cdrom/DOWNLOADS/Pico/libusb$

That noise you were hearing last night was me beating my head against the hull.

Any other ideas?

Thanks again for all of your help.

Tim


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 08 Jan 2011, 19:07
Posts: 27
Hi Moe,

I also tried through the package manager and it say I have PS2000alinux broken.

and through sudo dpkg -i ps2000alinux1_1.0-1_i386.deb

Info for debian package '/tmp/xa-6xJ3pk/ps2000alinux_1.0-1_i386.deb':
new debian package, version 2.0.
size 755646 bytes: control archive= 1055 bytes.
500 bytes, 14 lines control
823 bytes, 12 lines md5sums
135 bytes, 7 lines * postinst #!/bin/sh
132 bytes, 7 lines * postrm #!/bin/sh
57 bytes, 2 lines shlibs
Package: ps2000alinux
Version: 1.0-1
Architecture: i386
Maintainer: support <[email protected]>
Installed-Size: 2164
Depends: libc6 (>= 2.8), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6)
Section: libs
Priority: extra
Homepage: http://labs.picotech.com
Description: PicoScope 2000a Linux driver
PicoScope 2000a Linux driver provides the API and functionality
to use PicoScope 2000a series scope from Pico Technology
and is licensed under the GPL version 3,
see "/usr/share/common-licenses/GPL-3".

Do you wish to:
- I)nstall the package now,
- S)ave it to a file, or
- Q)uit now
Your choice (I/S/Q)? I
Installation of Debian packages needs to be done as root.
Enter command used to become root (default=sudo):

It says it has to be installed as root. How do I make it root?

Thanks again,

Tim


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 04 Nov 2010, 20:51
Posts: 1062
Are we having fun yet? Yesterday I did some "experimenting" and rendered my machine unbootable for about 4 hours...education is expensive and the day to day lesson are seldom cheap.

I pinched this from http://www.linuxadvocates.com/2013/03/the-linux-filesystem-need-not-be.html They pinched it from codepuppet.com
Attachment:
File comment: Stylized Linux Directory Structure
linux_directory_structure.png
linux_directory_structure.png [ 11.39 KiB | Viewed 35789 times ]
As a 'normal' user, generally you 'own' files/directories downstream from /home/$USER, but not necessarily. Most of the files/directories in the system are not 'yours'. You might be able to 'see' them, but they are not 'yours' to modify, move, or delete. Frequently, executable files are even 'not yours' to run. They belong to another process...another 'owner'....yeah, Sybil lives in your machine. For funzies see who's there; run
Code:
 awk -F":" '{ print "username: " $1 }' /etc/passwd
...whatever it is that the do; they keep things humming in the background. They have their own set of permissions and limitatiions. This 'compartmentalizing' is a good security feature. The one who rules them all is root (/). Not content with having the whole machine root also has its own private space (/root).

If you know the root password you can act like root and do 'superuser' stuff. For most of Navigatrix work on the USB stick this password has been hardcoded in so you don't need to type it in....but you still need to tell the machine you want to act as root. There fore, as superuser do <whatever>.

That is, to become "root" you can either preface a command with sudo, for example to make a directory in root's space
Code:
nx@nx:~$ mkdir /root/test
mkdir: cannot create directory ‘/root/test’: Permission denied
nx@nx:~$ sudo mkdir /root/test  <-------------------------------command is executed
nx@nxi:~$ ls /root
ls: cannot open directory /root: Permission denied
nx@nx:~$ sudo ls /root
Desktop  test                              <------------------------------listed directory
nx@nx:~$ rm -r /root/test
rm: cannot remove ‘/root/test’: Permission denied
nx@nx:~$ sudo !!
sudo rm -r /root/test                   <-------------------------------command is executed
nx@nx:~$ ls /root
ls: cannot open directory /root: Permission denied
nx@nx:~$ sudo !!                      <-------------------------------repeat last command as superuser (root)
sudo ls /root                              <-------------------------------shows what command is
Desktop
nx@nx:~$
or you tell the machine sudo !! which means "Repeat the last command, but this time do it as root."

Additionally, you could just take over the terminal as root with sudo -s and act as root until the cows come home...or until you exit to 'logoff' as root.

Ok...that's a long-winded explaination how to become root. Unfortunately it doesn't solve your problem.

If you try to install the .deb file that came with the archive; it will fail. That module is created for a different kernel than the one you have.

Your solution lies back at your earlier attempt.
Quote:
nx@nx:/cdrom/DOWNLOADS/Pico/libusb$ ./configure
bash: ./configure: Permission denied
For whatever reason, as I shrug my shoulders in ignorance, sometimes we need to tell the machine to run a shell to execute a command. Therefore
Code:
sh ./configure
...is your solution. If you didn't 'own' the directory than; sudo sh ./configure.

I don't know if it was because my installation was on a hardrive and yours in on the USB...or what. Sometime I have to sh ./<whatever> to execute a script...sometimes not. I still haven't found rhyme nor reason, but it's there...I just haven't figure it out. I do know that running sudo <anything> can lead to unintended consequences so it's good to know what you are doing or are willing to learn.


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 08 Jan 2011, 19:07
Posts: 27
Ah yes we are having fun... Learning is good and I always like a challenge! So let the fun continue.

I cleaned out everything and started over. I jumped for joy when I typed in sh ./configure, hit enter, and things started to happen. Then ...

configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.


nx@nx:/cdrom/DOWNLOADS/Pico/libusb$ sh ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/cdrom/DOWNLOADS/Pico/libusb':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
nx@nx:/cdrom/DOWNLOADS/Pico/libusb$

They say ignorance is bliss but I vehemently disagree. If you can keep nudging me along eventually I'll get this stuff figured out.

Thanks again for the help Moe!


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 04 Nov 2010, 20:51
Posts: 1062
Bugger... I'll take a look.


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 04 Nov 2010, 20:51
Posts: 1062
Presently I am utterly perplexed. Doing a fresh start I went through the instructions above and it compiled. Hmm...maybe it has something to do with it being a hard drive install....

So I boot up a virgin stick and I it compiles on the stick.

I'll dig some more to see if I can replicate your problem.


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 04 Nov 2010, 20:51
Posts: 1062
Oh, oh, oh...I'm sorry for the glaring oversight, Tim.
Quote:
nx@nx:/cdrom/DOWNLOADS/Pico/libusb$ sh ./configure

You need to be in your 'home'. If you chase down your directory structure you're in the cdrom branch.

Running Navigatrix on the stick is a "LiveCD". It works by smoke and mirrors with an overlay of the persistant files.

Change directory to your home branch.
Code:
cd ~/Downloads/Pico/libusb
...or whatever case [UPPER/lower] you have it created in.

(I recently found out that on the keyboards they used in the stone age had the tilde '~' on the same key that had the word 'home' and so the tilde became synonymous with 'home'.)

If you want to do it the long(er) way it's cd /home/nx/Downloads/pico/libusb

Give that a whirl.


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 08 Jan 2011, 19:07
Posts: 27
Hi Moe,

I still keep getting the error:

"configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details."

I thought that there might a problem with the thumb drive so on the last few attempts I reinstalled Navigatrix on a 16 Gig thumb drive. I modified the syslinux.cfg as follows:

label fix
menu label reset persistent data
kernel /casper/vmlinuz
append boot=casper initrd=/casper/initrd.gz autopersistent root_size=1000 home_size=2500 max_loop=32 ip=frommedia quiet splash fix

I deleted home-rw and casper-rw and then rebooted using fix.

This is the only modification I have made since putting Navigatrix on the stick.

I downloaded the file from Picotech and extracted the two .gz files in ~Downloads/Pico. I then ran the following lines.

whoami (to ensure I am nx)

sudo chown -R nx /home/nx/Downloads/Pico

sudo chown -R nx /home/nx/Downloads/Pico/libusb (just to be on the safe side)

cd /home/nx/Downloads/Pico/libusb

sudo apt-get update

sudo apt-get install autoconf libtool doxygen

gedit configure.ac (And removed line 4: AC_CONFIG_MACRO_DIR([m4]))

gedit Makefile.am (And removed line 2: ACLOCAL_AMFLAGS = -I m4)

autoreconf -i

sh ./configure

Got the error again.

So I tried again using sudo sh ./configure

Here is the latest attempt:

nx@nx:~$ cd /home/nx/Downloads/Pico/libusb
nx@nx:~/Downloads/Pico/libusb$ autoreconf -i
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
nx@nx:~/Downloads/Pico/libusb$ sudo sh ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/cdrom/DOWNLOADS/Pico/libusb':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
nx@nx:~/Downloads/Pico/libusb$

Is it possible that it's a hardware problem? I'm using an Acer Aspire Timeline X. i5 processor 4 gb ram.

Thanks again for all the help Moe!

Tim


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 04 Nov 2010, 20:51
Posts: 1062
I'll be back with other suggestions (helpful or not).

It appears that since you have a 64bit processor, your machine, for some reason, doesn't know which to make.

I'm looking for the method to tell it which to do.


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 04 Nov 2010, 20:51
Posts: 1062
Try
Code:
 ./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"

In place of the regular ./configure

This sets everything to 32bits to fit with the rest of the system.


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 08 Jan 2011, 19:07
Posts: 27
Thaks Moe! I'm at the boat yard working on Ketos (boat #2). I'll give the code a try when I get back to Zephyr's Aura.

I appreciate all the help. Thanks again.

Tim


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 08 Jan 2011, 19:07
Posts: 27
Hi Moe,

I gave it a try. I'm still having the same error.

Here is the code:

nx@nx:~$ cd ~/Downloads/Pico/libusb
nx@nx:~/Downloads/Pico/libusb$ autoreconf -i
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
nx@nx:~/Downloads/Pico/libusb$ sh ./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/home/nx/Downloads/Pico/libusb':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

I'm going to dig out an old laptop and try in on a different computer just to see what happens.

Thanks again,

Tim


Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 04 Nov 2010, 20:51
Posts: 1062
I've not heard peep...so give this a shot.

Attached is an archive of the compiled and made files.

Extract them into the /home/nx/Downloads/Pico directory you already have.

Be sure to overwrite.

Move into the directory
Code:
cd Downloads/Pico/libusb
Install them in their proper location with
Code:
sudo make install


...and see how that flies.


Attachments:
pico4Zepher.zip [1.63 MiB]
Downloaded 534 times
Top
   
 
 Post subject: Re: Using Picoscope 2208 with navigatrix

Joined: 08 Jan 2011, 19:07
Posts: 27
Thanks Moe!!! Success!!!

I haven't had much time to try things. I've been having to do that four letter word that ends with K............................ Work.

I did a complete reformat and install of Navigatrix on an old laptop. I took out the thumb drive and restarted the computer. It booted right up. I put the computer away for the night with the intension of trying to compile the files on it the next morning, but when I went to start the computer it asked me for a user name and password. I never set one. I tried booting from the thumb drive thinking that I would just reinstall, but it would not boot. It keeps trying to boot from the hard drive. I've checked the bios. The USB is listed first when booting. I haven't had time to mess with it since.

Thanks again,

Tim


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next


Search for:
cron

Credits © 2010 - 2024