We have built a system that reads EEG values. The system is finished (and runs well with web server communication). Last step was making the executable.....
The executable builds with no errors and, previously, failed because of some method nodes. Once removed, most of the system works correctly, except for SPI Open. Here, it fails with an unknown error.
A long time ago, we were having similar problems just communicating with SPI over beaglebone. To fix the issue at the time, we had to add a symbolic link:
sudo sh -c 'echo KERNEL==\"spidev1.1\", SYMLINK+=\"spidev0.0\" > /etc/udev/rules.d/99_linx_spi.rules'
which allowed us to communicate correctly with a connected amplifier.
Now, once in the executable, SPI fails to open and gives a unknown error (but LINX device opens, and digital read/write works). Does anyone have ANY suggestions on what to try here? Does the added symbolic link fail for some reason once the system is in an executable? Do we need to add the symbolic link directly to the LINX libraries? Are there specific compilation configuration settings I should try? I would very much appreciate help.
If I am understanding your scenario correctly, you have a program that runs on a PC which communicates to a beaglebone over SPI, right?
Your issue is when you build your program into an executable the SPI communication does not work.
Does this happen if you run the executable on the same system which you built the program on? If this happens on a different PC, not the development PC, you probably require some drivers/files which do not exist on the non-development PC. You may want to build an installer instead of just an executable or you may need to always include some files with your executable build.
I don't have any particular knowledge about working with the beaglebone.
We have a program that runs on the beaglebone with LINX. It communicates to the development PC and to our HTML interface. We use SPI to talk to an amplifier that is directly connected to the beaglebone. The executable is built to run on the beaglebone directly. The executable works, all except SPI communication with LINX. (it works entirely when it is connected to the development PC, but the program itself runs on the beaglebone)
Is the executable running before the symbolic link has been created at startup? You may be able to change the point at which symbolic link is created by renaming the file
Another option would be to create the symbolic link in your LabVIEW program.
Hmm. We made the symbolic link change on the beaglebone manually and, since we didn't have to do that again with every restart, I assumed we wouldn't have to do that again (?).
What do you mean renaming that linx rules file? That's where we put the symbolic link. Does a symbolic link get reinitialized every time the remote board restarts?
I do think that creating the symbolic link in LabVIEW could potentially work, but I d
As I was writing my response, my labmates messaged me from the lab (I couldn't stick around, this problem was driving me crazy) and they got SPI working on a different beaglebone. We think it is because of different debian images (2018 vs 2020) or a broken beaglebone generally. I will update with what conclusion we land on for the above issue but it looks like the past 9 months were Not a waste, so that's a huge relief. Thank you both for reaching out. Jeeze PHEW