-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPI Demo ./runBoth.sh #50
Comments
I found that this could be fixed because the if then statement was using the wrong syntax for the type of shell script I was running. After I changed the syntax of the if then statement, I am getting the error that the setenv command cannot be found. I found that this could be caused by using sh instead of csh, which I do not have installed and had not assumed I was meant to use. Should I change to running csh instead of sh and is this the case throughout the use of fprime? It seems that this might be the cause of many of the syntax issues I've been having. |
You should update to the devel branch of nasa's github repository. The "runBoth.sh" script for the RPI is now removed. |
See: #38 |
On the devel branch, you should manually run "RPI/scripts/run_rpi_cross.sh" and manually run the RPI image. |
Should I be running run_rpi_cross.sh on a linux machine to run the GUI and manually running RPI on the RPI in order to launch the app itself? I tried running both of these on the RPI. The RPI image fails because of two assert errors in file Drv/LinuxGpioDriver/LinuxGpioDriverComponentImpl.cpp (line 263) I assume I'm not meant to run run_rpi_cross.sh directly on the raspberry pi, but I tried anyways to see if it might work. It results in the error that there is no module named Pmw. Is it supposed to work if I run it directly on the RPI or do I need to cross compile from my machine and just run the binary on the RPI? Also, in order to run from a linux machine and cross compile it is it required to set up port forwarding on the raspberry pi, the linux machine, both, or just make sure that both are using the same port? |
I have been able to run the GUI on the Pi, but it isn't reliable so I've switched to running it on a Linux machine and connecting from the Pi. You should run it as |
BTW, you will have to modify the addresses in the script to match your network. |
DIRNAME=" This is the run_rpi_cross.sh script, but I'm not sure where to modify the address in this script. Which files should I be modifying the addresses in? |
Just pass in the arguments:
Where |
So typically your network looks something like this (IPs are invented): Laptop with ground station: Running Ground Station on Laptop
Note: this defaults the address and port for you. Running on PI
Note: here we supply the IP of the laptop, and the default port The RPI can do both jobs, but I would recommend you run it using 2 terminals as above. That way when you split to hardware and ground station, you are following the same process. |
Thank you, the GUI wouldn't run on the RPI but I got it to run on VirtualBox and connected to the raspberry pi. Once I exited both programs I tried to reconnect and it sometimes gives me different errors. First, every time I run the GUI (including successfully) it gives me the error: Also, sometimes when the GUI is booting it gives me the error that it failed to start the TCP server. It logs that it's waiting 5 seconds for it to start, so is it just failing every time that this times out? Lastly, on the RPi, it sometimes gives me the error that it is being denied permission to open one of the GPIO files, but after a few more tries it rebooted again and started working. Do you think this is just an issue with the way that the program exits when it gets shut down and nothing to worry about? |
The gui supports a "tk" mode and a "wx" mode. It will Warn when it cannot import those modules. In your case, you are running with "tk" and it cannot find "wx" so you are ok. As for the TCPServer, if running on linux, the TCP socket used will enter WAIT2 state for 60 seconds after you shut down the application. This is Linux's way to prevent late messages from arriving into a restarted session. You'll need to wait 60 seconds between closing the TCP server and running a new instance. I'd have to dig deeper into the RPI issue. @timcanham any thoughts as to why the RPI is holding on to the GPIO files? |
I know the best way to run RPI is as root as there can be issues opening the files that correspond to the drivers. I don't know what the delay issue might be, but I would see if it still happens when you run the RPI binary as |
The delay issue seems to be a deeper problem, I kept having this problem, so I waited a full 3 minutes before trying to run again and it doesn't seem to matter. I keep getting the same issue that the TCP server fails to start. I tried restarting my VM and it still gives me the same error on the first try. Is there anything else I can try? |
Yes. In your RPI dirctory, there are logs for this server:
This will contain the error for the server. Post the error here, and I can give you more advice. Here, some data is the date time of the last run. |
Also, #53 will automatically print the log if an error occurs, exposing better errors to the user. |
Thanks Michael, the log file is giving me error(99, 'Cannot assign requested address') I assume this means that there is a problem making the connection to the raspberry pi? |
@aaronbuchwald this error typically means an issue grabbing the IP address that you have requested this run on. The ground system acts as a server, meaning it must listen on an address and port combination. If the address you request is not available to the computer you are running on, the above error is the result. The default address is Therefore, I'll need to know the exact CLI you are running to start this. If it is exactly the below command, then do you have user permissions to listen to an internet port? Is this what you are running?
|
@brh68 Did you configure the RPI with the various I/O lines? Also, you should run as |
You should enable that last serial checkbox too. |
I originally had Serial enabled, but when I disabled UART it disables serial, if I re-enable serial it undoes the deletion I made to disable UART. |
|
That doesn't really make sense because we are running fresh downloads of the RPI release, and these errors only happen on some of the raspberry pies. I think it is related to out lack of a |
Ah - are you running with |
I removed the RPIDemo component from our application because we use a different method of accessing gpio pins that works with our current settings, but I am getting a failure of this assert: |
That probably means you forgot to connect the command registration port to the CmdDispatcher. |
I forgot to define an instance of the component. |
I am closing this issue, as I see no updates. Please feel free to continue discussion on our mailing list: https://groups.google.com/forum/#!forum/fprime-community Or open a new issue if you detect a new bug. |
I am having an issue running the runBoth.sh file after compiling the RPI demo.
I have made the RPI demo successfully, and am now trying to run the script runBoth.sh in the RPI directory. However, this is giving me the following error:
./scripts/run_pi.sh: 31: ./scripts/run_pi.sh: Syntax error: end of file unexpected (expected "fi")
And then the program just hangs and does not terminate. I looked at the run_pi.sh file and could not find the problem. Any ideas what I should do to fix the script or if I may have installed something incorrectly setting up?
The text was updated successfully, but these errors were encountered: