Linux can not detect Altera FPGA - linux

Well, i have an Altera FPGA and USB blaster. I downloaded quartus, but it doesn't detect FPGA, i tried with urjtag and it works fine. I tried running it with sudo, but again the same. Help please

It would probably be good if this question could be moved.
Here is a link to a site with instructions on this problem: http://www.fpga-dev.com/altera-usb-blaster-with-ubuntu/
In short, since Quartus will typically attempt to use the USB device as a user, nu must give the user permissions to use the device. This can be accomplished by udev rules. You can at first confirm that this is a permission problem by running the following sequence of commands. If devices are found now, this indicates a permission problem since we have now been running everything as root:
$ sudo killall -9 jtagd # Kill jtagd, ...
$ sudo killall -9 jtagd # ...and verify jtagd is indeed not running.
jtagd: no process found # Good, verified.
$ jtagconfig
1) CV SoCKit [2-1]
02D020DD 5CSEBA6(.|ES)/5CSEMA6/..
4BA00477 SOCVHPS

I agree with Tim here, the question should be asked on another location, your problem is probably because of a the driver of USB blaster is not installed properly. Try to do a search on internet and see if you can find any similar problems, or go to Altera forum and ask the question there, there are many experienced users there who are familiar with this kinds of problems.

Related

How to avoid using sudo for certain programs under xrdp in Raspbian?

Background: I look after the Raspberry Pi version of Scratch for the Foundation. Mostly this is a matter of Smalltalk programming, VM developing and some very frustrating moments with shell scripts.
Right now I'm baffled and annoyed by what seems likely to be a unix permissions or related issue when using xrdp to connect to a Pi from any other machine. I know that it's not a problem directly with theSqueak VM since google has revealed quite a few other applications having similar looking issues. Part of my problem is that I don't know enough about this area to really know what to search for to narrow things down.
So, problem description -
The current Scratch system runs on the Squeak Cog VM (see https://github.com/OpenSmalltalk/opensmalltalk-vm), which amongst other things uses pthreads and needs to set the thread priority. That used to be something that required modifying some config but more recent (Raspbian) kernels have no problem with it.
Except when using xrdp, which is a pain because I mostly work with my Pi via xrdp to my iMac. To handle this I have to prepend a 'sudo -E' which is tolerable for a developer but not really good for general users.
I have a similar problem with a trivial file copying command used in the VM make process as well, and that doesn't use any thread stuff nor priority work, but does require me to sudo make in a terminal window.
As an experiment I tried using tightvnc, to see if anything might work better. After reading the full install instructions (https://www.raspberrypi.org/documentation/remote-access/vnc/) and adding the auto-startup init.d script etc, it seemed like maybe we were in luck because the sudo isn't needed! Hooray! Of course, I was a bit disappointed by the seemingly slower display handling, but never mind.
Sadly this isn't even close to the end of the story. I've recently been working on completing the support for the X composition input window system that allows Japanese and other non-Latin1 type language users to enter characters more easily. It's pretty clever, once you've installed iBus, Anthy, many fonts and done some setup. But, while it works perfectly well on a Pi with a direct display, and fine on an xrdp display (with the sudo to allow Scratch to run in the first place, of course) it simply won't work via vnc with or without a sudo.
Googling shows a large number of other applications having problems in odd ways with the relevant XCreateIC() call (see https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/unix/vm-display-X11/sqUnixX11.c line:1659 for our usage) but nothing I can make much connection to vnc for. To add to the annoyance the combo window appears ok for Terminals!
To summarise-
direct display - no problems for either the pthread priority or the compo window
xrdp - needs sudo for pthreads priority but the compo window works ok
vnc - doesn't need sudo for pthread priority but compo window doesn't work.
What I need: help with finding out what causes these problems and maybe even solutions. A way to configure xrdp to not require 'sudo' would be nice.
To my delight a colleague found what appears to be a very effective answer to this; it seems that the /etc/pam.d/common-session file needs a single line adding.
Edit the file and add
session required pam_limits.so
This allows all the applications I have that previously had permission related problems to run under xrdp. Another Scratch user who had a similar issue using PuTTY reports that it solved that issue as well.

Installing a headless VNC server on Bananian?

I started this project with a Raspberry Pi, but realized that the Banana's hardware set is a much better fit for what I'm doing. Unfortunately, it appears that, even though LeMaker (the group behind the BPi) offers just about every OS imaginable pre-optimized for the Banana, only Bananian supports all the hardware that I need, and it doesn't come with a GUI of any kind.
So, given a Debian-derivative on an ARM chip that will never see a physical display and has root SSH functional by default, how can I make it boot to an auto-logged-in VNC server?
Here's what I've done so far, as root over SSH:
# bananian-config
# bananian-update
# apt-get update
# apt-get upgrade
# adduser pi
# passwd root
# apt-get install task-lxde-desktop
(the first two are announced in the SSH welcome message and are used to initially setup the generic image for this variation of the board)
Then I uncommented these lines in /etc/lightdm/lightdm.conf:
autologin-user=pi
autologin-user-timeout=0
[VNCServer]
enabled=true
command=Xvnc
port=5900
width=1024
height=768
depth=8
At this point, I rebooted and tried to connect with VNC, but the client gave the same error as when the server doesn't exist. SSH still works as root and now the "pi" user also, except that the "pi" user doesn't know sudo.
At this point, I'm lost. I don't know if there's a desktop waiting for me on the HDMI plug or not, or whether I need an explicit VNC server like x11vnc or tightvnc, or if there's something else wrong.
This is all I've done so far. I can re-flash the image if needed; I want to make this part work before adding anything project-specific.
Okay, I noticed in LeMaker's own instructions to make Wifi work that they included Android and Lubuntu too, and that someone on their forum had made VNC work on Lubuntu. I didn't see before that some other OS's would support the WiFi chip.
So I switched to Lubuntu, which already has a working desktop, installed x11vnc per its instructions, and it basically just worked.
Then I backed up the SD card and spent all of Saturday trying different ways to make it a WiFi access point, which usually resulted in kicking myself out and restoring the backup to try again. And finally that works too. So I backed up the card again and now I can work on the real functionality.

LittleBits Arduino doesn't work on Linux

I recently received a LittleBits Arduino Coding Kit and thought the Arduino IDE would immediately recognize it.
I noticed that when I choose the "Arduino Leonardo" on the Tools -> Board as the instruction video said to do, the Tools -> Serial Port menu is grayed out.
I have already added myself to the "dialout" and "uucp" groups, ran the "arduino" program as root, ran a whole bunch of commands dealing with permissions, restarted the computer, plugged it into all the ports, reinstalled the drivers, and tried everything else I came across. For some reason, I can't figure out how to get this to work.
I use Xubuntu on an i686 architecture by the way, if that even matters.
I think you don't have permissions to read/write the serial port device. Even running Arduino application as root, it's running on a Java JVM, and calls other programs to compile sketches and burn the board... it's hard to figure out what's happening in the background. Also, is not a good idea to run programs as roout unless necessary.
Try this. First list your serial port devices.
ls -l /dev/tty*
There's should be one called /dev/ttyUSB0 or /dev/ttyACM0 or something like that (not /dev/ttySx). That one is your Arduino. Add read/write permissions for every user to that device file.
sudo chmod 666 /dev/ttyUSB0
Use the device you have. Now run the Arduino IDE, if the issue is with permissions, then it's done. Unfortunately, you'll have to do this every time you unplug the board or reboot the system.

Fingerprint reader - ID 147e:2020 Upek - Thinkpad T430

I'm having some problems with fingerprint reader on Thinkpad T430 ID 147e:2020 Upek
For few days i was trying every tip i could find but it didn't work for me.
Mainly i tried to Build and make it running through Fingerprint GUI and i was able to build it and install it properly (after few fixes) but it simply was not able to pick up my device.
At one point i thought that i have solution, since i realized that Fingerprint sensor on this laptop is quite new and is maybe not supported by default with proprietary libbsapi.so so i tried to follow tips from this blog: http://volker.de/2012/12/fingerprint-gui-und-das-thinkpad-t430s/
Guy has exactly same device and in same PC but as i expected it didn't work for me.
Platform is Debian-squeeze
If you have any idea what could be solution, pls help.
Used the same info as you did, but a quick look at the French Ubuntu doc did the fix for me: the problem appears to be that the fingerprint-gui doesn't have access to the USB device bus, thus, we have to give it to it.
Find your device's bus and device adress using the lsusb command, for me, it was:
Bus 001 Device 003: ID 147e:2020 Upek
Thus the bus is 001 and the device is 003. Let's call them x and y.
Then, we use chmod (apparently it doesn't pose any security threat as the system fixes it by itself):
sudo chmod 666 /dev/bus/usb/00x/00y
For me, for instance, it was:
sudo chmod 666 /dev/bus/usb/001/003
Then, follow the instructions given to you by the German guy (volker - the link you cited).
On my side, I was running Ubuntu 12.04 (debian bro'), so I could use the fingerprint PPA. I don't know if Ubuntu PPA's work on debian. I suggest you keep your own install of the fingerprint-gui program, as well as the fix provided by volker's blog post. Then, just launch fingerprint-gui and it should recognize you device.
The German blog got actually updated was a problem with the quotes:
For non german users:
Be aware to use the copy and paste funktion to insert the above lines in your 40-libbsapi.rules, because the quotes are different from that quotes that you get when hitting on your keyboard.
It was pain in the a….. to find it out.
You'll need to apply this patch to libfprint.

Problems installation of camera drivers - linux

I want to install the drivers of the video camera on my linux computer.
I write the command:
modprobe usbserial vendor=... product=...
what I expected to get was ttyUSB0 (or sth simmilar) in the /dev directory.
Instead what is getting installed is sg3 (whatever that is) and when I run a program that is supposed to send a command to start recording I get no results (but no errors either).
(I changed what I had previously: fd = open(/dev/ttyUSB0,...) to /dev/sg3 but I guess this is not a configuration that enables sending this kind of data.
What might be the problem? (Sorry if it's a basic question)
cameras and linux can be tricky.
Start by plugging in the camera and running
lsusb
google for the id to see if anyone has a step by step tutorial or at very least can tell you which modules are needed.
Most common drivers seem to have been migrated to the kernel, so rebulid your kernel make sure the modules are built.
Some more obscure usb modules have to be built by hand.

Resources