Problem with Linux libraries

Hi,

does anyone if is it possible (and how) to install new libraries at the Linux side of the Yun?

I've downloaded libnfc-1.7.1.tar.bz2 from the official website but when I try to install it by writing "sudo make install" (or. /configure, or others necessary sentences) the system reply me messages like "-ash: sudo: not found".

I'm using WinSPC as console (I've e tried Open-wrt too) and for copying files but I don't know if the Yun Linux side admit same commands that traditional Linux machines or it is only a reduced version.

The problem is that I need this library for NFC functions at my Python code (I've a nfc device connected to the usb type-A port).

Any idea?

Thanks for all !!

There are essentially TWO parts to the YUN.
First being the Linux side and the other being the MCU side.
One talks to the other via what it termed a bridge.

Sounds like you need to set up the MCU side first as that is where most libs get compiled to.
Then you can add the commands to the sketch to talk through the bridge to the linux side.

Thanks ballscrewbob,

I´m not sure how can I set up the MCU side - I´ve tried it by using "opkg install make" and it seems to be installed, but other error messages appears (apt-get not found).

Today I´ve copied the full library to a SD card (3 Mb in total) due to the system informed me that "no space left on device" when I tried to copy it, and messages like "no acceptable C compiler found in $PATH" or "Not a git repository" appears when I access to the SD card folder and I try to configure/install the library following the instructions.

I´m trying the manual installation from http://nfc-tools.org/index.php/Libnfc, downloading and copying directly the folder, due to all the options I´ve tried inform me about an error.

Is it really great the Yun? - I think it´s very confuse and I seeing to try it by using a Raspberry Pi.

Thanks !!

The YUN is an advanced board that took me a while to get to grips with.
It is IMHO a good board but not for beginners like me.

I wonder if this page might be of more use to you as it deals with talking to USB devices.

Let me also check if I have this correct.

  1. You have a USB NFC device conned to the YUN's USB HOST port.
  2. You want to talk to that device directly from the YUN
  3. You want the YUN to take that information from the NFC device and pass it to either
    (A) Python on the YUN
    or
    (B) Python on an external computer.

If I have that right then the link above may be of more use.

If I have it wrong then maybe some specifics about your NFC device would be useful.

Thanks ballscrewbob,

yes, you are right and I´m trying the option 3.(A) you comment.

I´ve tried the most simple instruction that appears at the link you say ("opkg install usbip-server"), after opkg updating again, and everything seemed to go well until it has appeared "No space left on device" some times - why the space seems to be a problem if I´ve not added files or filled anything? there are really very few space at the Yun?

Regards.

Yun space can be at a premium.

I dont know if you have installed much etc. so cannot really comment on your YUN.
If that is the case then you might want to do one of two things.

A. remove any unused apps / packages you may have installed that wont be used.

B. install an SD card and follow the instructions to initialise the device as extra storage space.

Instructions found on google for Linux clean up

Extending disk space on a YUN

Greg2018:
Is it really great the Yun? - I think it´s very confuse and I seeing to try it by using a Raspberry Pi.

The Yun is not the same as a Raspberry Pi. While they both run a variant of Linux, you cannot assume that they will both do the same thing. The Raspberry Pi is a relatively powerful general purpose computer. The Yun is essentially a network router that runs a rather limited subset of Linux. Compared to the Raspberry Pi, the Yun is slower than the RPi (400 MHz vs 1.4 GHz quad core), has much less RAM (64 MB vs 512 MB) and limited built-in disk storage space (16 MB vs none on the RPi.)

If you are looking at general purpose computing or development, the Raspberry Pi is probably a better fit. Where the Yun has the advantage is the addition of a microcontroller that runs Arduino sketches, it has the standard Arduino shield connectors which allows using a wide variety of plug in shields, and it has the Bridge library which is a versatile (although not necessarily fast) communications link between the Linux processor and the Arduino sketch.

Compared to a Raspberry Pi, the Yun is far less powerful and flexible. Compared to a standard Arduino board, the Yun is far more powerful and flexible. The Yun excels where you need the ability to run an Arduino sketch and make use of the shield connectors for I/O, but want more processing power than is available from a standard Arduino board, especially for those applications that need network connectivity. Personally, I think the best way to approach the Yun is to write a basic sketch that interfaces with your sensor hardware, and acts as a relatively dumb I/O processor. Input data is passed down to the Linux side where the majority of the processing is performed, output data is passed back up to the sketch, and the sketch writes the data to the hardware outputs. In this way, the sketch does what it does best (accessing/controlling external hardware) while the Linux side does what it does best (faster processing, data storage, and network communications and applications.)

The Yun is NOT a Raspberry Pi with a shield connector. If you are expecting to use the Linux side of the Yun in the same manner as the Raspberry Pi, you will probably be disappointed. But if you use the Yun with its strengths and weaknesses in mind, you can make very powerful projects.

I agree with ballscrewbob - the Yun is a different beast and is not necessarily appropriate for beginners.

Greg2018:
but when I try to install it by writing "sudo make install" (or. /configure, or others necessary sentences) the system reply me messages like "-ash: sudo: not found".

The Linux distribution on the Yun is very simplified. It is designed to run on a network router with very limited resources. You may think that the Raspberry Pi is limited when compared to a laptop or desktop system, but the Yun has much fewer resources than that. The Pi has eight times the RAM and typically has a thousand times the disk storage space. To get it to run on the limited resources of the Yun, many features have been stripped out. There is no sudo command on the Yun, you are always running with superuser privileges (remember, it is not intended to be a general purpose computer, you are typically only logged into it while administering the system.) It also doesn't have make - with the limited speed, RAM, and storage space, it's not really an ideal system for software development. It's generally a better experience to cross-compile software on a more powerful system, and then copy the executable to the Yun. I think most Yun users develop their system in interpreted Python rather than other compiled languages.

but I don't know if the Yun Linux side admit same commands that traditional Linux machines or it is only a reduced version.

It is a very reduced version.

Greg2018:
Today I´ve copied the full library to a SD card (3 Mb in total) due to the system informed me that "no space left on device" when I tried to copy it, and messages like "no acceptable C compiler found in $PATH" or "Not a git repository" appears when I access to the SD card folder and I try to configure/install the library following the instructions.

3 MB is nothing for a Raspberry Pi compared to the gigabytes of disk storage space. But for the Yun, that's almost 20% of the available built in storage space. There just isn't that much free space on the built in storage.

Because of the limited space, the Yun distribution does not include any compilers or software build facilities. It does include Python or Luci, but does not have C.

For most Yun users, I recommend that you start with the factory default setup, and the first thing to be done is to add an SD card and expand the root file system onto it using the links provided by ballscrewbob. That will give you much more space, and at that point you can start installing the different packages that you need. You may have enough space to then install compilers, make, and other development tools, but I think you will be disappointed in the performance.[/quote]

I don't have any specific advice on getting your NFC device working on the Yun, as I have no experience with that device. My general advice is to search for libraries or instructions specifically intended for the Yun or OpenWRT - if you are following directions for a Raspberry Pi or a general Linux distribution, you are certain to run into trouble. As an alternative, you could try building your code on a Raspberry Pi or other Linux computer, cross-compiling it to run on the Yun's Broadcomm processor.