This is follow up tutorial to the "Getting the Most Out of your NI Linux Real Time Target" NIWeek presentation.
Outline of the presentation:
1. Securing you target with IPtables
2. Using Syslog for Event Logging
3. Using LAMP (Apache, PHP, MySQL) on NI Linux RT
4. File Encryption with GnuPG
5. Accessing NFS file system using Samba
6. Code Reuse (C++ w/ FPGA C API, python and node.js examples)
See attached tutorial document and demo files for installation instruction and basic configuration settings.
After installing the python using OPKG, I am trying to execute the Python example code but I get this error message :"ImportError: No module named socket"
In 'usr/lib/python2.7' I am unable to find any socket module. Any idea on how to solve this ?
Python is a fairly modular language when it comes to installation, what version of the software stack are you using? If you're not sure, can you report what "uname -a" returns? This matters as it changes where the packages are being installed from
I also ran into this issue with the version of python in the current repositories that opkg polls by default.If you look at page 13 of the "Getting the Most out of your NI Linux Real Time - Tutorial.pdf " you'll find steps for installing python from source. That version of python should have the socket module in it.
You shouldn't need to build from source. There are a lot of modules in the feed including socket, they're just not in the base package. For example in 2015 you can do "opkg install python-netclient" and then "import socket" works. It may be different in other versions.
Thanks, I should have looked at this file first, sorry! Any idea why the version in the current repositories is not the one you mention in your file ? safety reason maybe? Couldn't we suggest an update ?
The link in the tutorial was based on the current version at the time of the creation of the tutorial. The same installation steps will work for other versions, however, as Scot mentioned you could use the most up to date version from the opkg repositories and install it with the "import socket" option after installing the base package.
As Brad mentioned, Python is intentionally modular. Installing all the modules by default would consume a lot of disk space for features most users do not use. Again, the current (that is, 2015) repositories do include socket and many other modules in the feed. If you want all the modules, you can "opkg install python-modules".
Great, if there is another option to get this socket included lets do it like this.
I have set up Samba to run on my cRIO-9035 running RIO 17. My goal it to mapped to a shared drive on a corporate network so that I can always pull in the latest firmware file to update my DUT. The IT folks have shared the folder and I can mount the folder successfully using the mount-a command when logged in as the administrator. However, I lose this mapping every time the system is restarted and mount-a can only be run as a root user. What is the best way to automate the mounting of this drive each time the system starts. I have tried a variety to solutions using the fstab file and none of those appear to be working.
When will we get open specs for the backplane and cards, so we can write proper drivers ?