<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.linkinstruments.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JyehLink</id>
	<title>Link wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.linkinstruments.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JyehLink"/>
	<link rel="alternate" type="text/html" href="https://www.linkinstruments.com/wiki/index.php/Special:Contributions/JyehLink"/>
	<updated>2026-04-26T21:32:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://www.linkinstruments.com/wiki/index.php?title=PiMSO19&amp;diff=13</id>
		<title>PiMSO19</title>
		<link rel="alternate" type="text/html" href="https://www.linkinstruments.com/wiki/index.php?title=PiMSO19&amp;diff=13"/>
		<updated>2021-04-12T13:30:03Z</updated>

		<summary type="html">&lt;p&gt;JyehLink: /* Setting up the FCGI server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==PiMSO19==&lt;br /&gt;
The PiMSO-19 lets you run the MSO-19 USB based Oscilloscope/Logic Analyzer from a Raspberry PI.  The Oscilloscope is controlled via the browser on your smartphone, tablet, PC or MAC.  The connection to the host is via WIFI or Ethernet.  &lt;br /&gt;
&lt;br /&gt;
PiMSO-19 consists of eight parts: Web Server, Wifi Access Point, Name Server, DHCP server, FCGI server, LCD driver, MSO server side driver and MSO client side Javascripts.  Not all parts are necessary for the PiMSO to function, a bare bone setup without Wifi is an Ethernet based setup consists of Web server, FCGI server, MSO server side driver and MSO client side Javascripts.  We will begin with this scenario.&lt;br /&gt;
&lt;br /&gt;
== Getting started == &lt;br /&gt;
== The easy way ==&lt;br /&gt;
The easiest way is to clone the (needs new img file) and copy the raw image into an 8GB SD card.&lt;br /&gt;
Raw image installation instruction is provided on this site [http://elinux.org/RPi_Easy_SD_Card_Setup].&lt;br /&gt;
&lt;br /&gt;
== Roll your own ==&lt;br /&gt;
If you like to install this on your own distro, here is the instruction on how to do it.&lt;br /&gt;
&lt;br /&gt;
== Setting up the Raspberry Pi==&lt;br /&gt;
1. Grab the latest version of Raspian from [http://www.raspberrypi.org/downloads]. Follow the raw images installation instruction provided on this site [http://elinux.org/RPi_Easy_SD_Card_Setup].&lt;br /&gt;
&lt;br /&gt;
2. Boot up the Raspbian and set the it to boot into command line.&lt;br /&gt;
&lt;br /&gt;
== Package Installation ==&lt;br /&gt;
1. Gain root privilege.&lt;br /&gt;
 sudo -i       &lt;br /&gt;
2. Update the package list.&lt;br /&gt;
 apt-get update&lt;br /&gt;
3. Install the necessary packages. &lt;br /&gt;
 apt-get install git-core build-essential nginx hostapd iw minicom usbmount dnsmasq  libfcgi-dev&lt;br /&gt;
4. Go to the home directory. &lt;br /&gt;
 cd / home/pi&lt;br /&gt;
5. wiringPi is not necessary if you don't have PiLCD, but it is nice to have for future I/O control. &lt;br /&gt;
 git clone git://git.drogon.net/wiringPi   &lt;br /&gt;
 cd wiringPi&lt;br /&gt;
 ./build&lt;br /&gt;
6. Grab and install the WebMSO-config.git so the Pi will recognize MSO-28 and MSO-19&lt;br /&gt;
 cd ..&lt;br /&gt;
 git clone git://github.com/tkrmnz/WebMSO-config.git&lt;br /&gt;
 cd WebMSO-config&lt;br /&gt;
 cp /home/pi/WebMSO-config/74-linkmso.rules /etc/udev/rules.d/.&lt;br /&gt;
7. At this point plug the MSO-19 into the Raspberry Pi, you should see it listed under /dev as MSO-19-0.&lt;br /&gt;
&lt;br /&gt;
== Setting up the web server ==&lt;br /&gt;
8. Edit the nginx default file.&lt;br /&gt;
 nano /etc/nginx/sites-available/default&lt;br /&gt;
Change the nginx default root directory to /var/www&lt;br /&gt;
 root /var/www;&lt;br /&gt;
9. Also add the following block for fcgi port forwarding.&lt;br /&gt;
 location /fcgi-bin/mso19ctl.fcgi{&lt;br /&gt;
   include fastcgi_params;&lt;br /&gt;
   fastcgi_pass 127.0.0.1:9000;&lt;br /&gt;
 }&lt;br /&gt;
10. Copy the proxy.conf to /etc/nginx &lt;br /&gt;
 cp proxy.conf /etc/nginx/.&lt;br /&gt;
The content of the proxy.conf is shown below.&lt;br /&gt;
 proxy_redirect          off;&lt;br /&gt;
 proxy_set_header        Host            $host;&lt;br /&gt;
 proxy_set_header        X-Real-IP       $remote_addr;&lt;br /&gt;
 proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;&lt;br /&gt;
 client_max_body_size    10m;&lt;br /&gt;
 client_body_buffer_size 128k;&lt;br /&gt;
 proxy_connect_timeout   90;&lt;br /&gt;
 proxy_send_timeout      90;&lt;br /&gt;
 proxy_read_timeout      90;&lt;br /&gt;
11. Check to see if the gzip is enabled in the /etc/nginx/nginx.conf &lt;br /&gt;
 nano /etc/nginx/nginx.conf&lt;br /&gt;
un-comment gzip on; &lt;br /&gt;
 gzip on;&lt;br /&gt;
 gzip_disable &amp;quot;msie6&amp;quot;;&lt;br /&gt;
12. Create the webpage folder&lt;br /&gt;
 mkdir /var/www&lt;br /&gt;
13. Grab and install the WebMSO19fcgi javascripts content&lt;br /&gt;
 cd /home/pi&lt;br /&gt;
 git clone git://github.com/tkrmnz/WebMSO19fcgi.git&lt;br /&gt;
 cd WebMSO19fcgi&lt;br /&gt;
 cp -rf * /var/www/.  &lt;br /&gt;
14. Start the nginx web server.&lt;br /&gt;
 /etc/init.d/nginx start&lt;br /&gt;
At this point nginx should start serving the web page.  ifconfig to get your ipv4 address and access it via a browser from a different computer on the same network.&lt;br /&gt;
&lt;br /&gt;
== Setting up the FCGI server ==&lt;br /&gt;
15. Add execution privilege of the MSO19 fcgi driver in the /var/www/fcgi-bin directory.&lt;br /&gt;
 chmod +x /var/www/fcgi-bin/mso19ctl.fcgi&lt;br /&gt;
16. Create a temporary ram drive for the mso19 fcgi driver to store the captured data. &lt;br /&gt;
 mkdir /mnt/tmp&lt;br /&gt;
 mount -t tmpfs -o size=20m tmpfs /mnt/tmp&lt;br /&gt;
 ln -s /mnt/tmp	/var/www/fcgi-bin/tmp&lt;br /&gt;
17. Grab and install the spawn-fcgi and mso19ctl.fcgi &lt;br /&gt;
 cd /home/pi&lt;br /&gt;
 git clone git://github.com/tkrmnz/mso19fcgi.git&lt;br /&gt;
copy spawn-fcgi-1.6.3.tar.bz2 to /home/pi and unzip the spawn-fcgi&lt;br /&gt;
 cp mso19fcgi/spawn-fcgi-1.6.3.tar.bz2 .&lt;br /&gt;
 tar -xvjf spawn-fcgi-1.6.3.tar.bz2&lt;br /&gt;
Install the spawn-fcgi&lt;br /&gt;
 cd spawn-fcgi-1.6.3&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
 cp src/spawn-fcgi /usr/bin/.&lt;br /&gt;
Copy the init script from /home/pi/mso19fcgi to /etc/init.d&lt;br /&gt;
 cp /home/pi/mso19fcgi/spawn-fcgi19 /etc/init.d/.&lt;br /&gt;
 chmod +x /etc/init.d/spawn-fcgi19&lt;br /&gt;
18. Compile and copy the mso19ctl to /www/var/fcgi-bin&lt;br /&gt;
 cd mso19fcgi&lt;br /&gt;
 touch main.c&lt;br /&gt;
 sh makemso2.sh&lt;br /&gt;
 sh msocpy8.sh&lt;br /&gt;
19. You can test the installing by starting the spawn-fcgi using&lt;br /&gt;
 /etc/init.d/spawn-fcgi19 start&lt;br /&gt;
You should be able to see the blinking indicator next to the '''Stby''' above the timing window of the WebMSO19 client page.&lt;br /&gt;
If you see No MSO, then your spwan-fcgi is not running.&lt;br /&gt;
&lt;br /&gt;
To stop the spawn-fcgi '''ctrl-z''' and kill the process&lt;br /&gt;
 fuser -k 9000/tcp&lt;br /&gt;
20. To auto start spawn-fcgi on boot. &lt;br /&gt;
 update-rc.d spawn-fcgi19 defaults&lt;br /&gt;
To remove spawn-fcgi from auto boot.&lt;br /&gt;
 update-rc.d -f spawn-fcgi19 remove&lt;br /&gt;
&lt;br /&gt;
At this point server works with ethernet cable.  Go to [[wifi AP setup]] for Wifi installation and [[PiLCD setup]] for the PiLCD module.&lt;br /&gt;
&lt;br /&gt;
==PiMSO on Raspberry Pi==&lt;br /&gt;
Now the PiMSO is installed, you can access the MSO-19 from Midori by running X-Window.&lt;br /&gt;
 startx&lt;br /&gt;
Simultaneously other computers on your network can also access the MSO-19.&lt;br /&gt;
&lt;br /&gt;
==PiMSO Wifi AP Setup==&lt;br /&gt;
[[wifi AP setup]]&lt;br /&gt;
&lt;br /&gt;
==PiMCO PiLCD setup==&lt;br /&gt;
[[PiLCD Setup]]&lt;br /&gt;
&lt;br /&gt;
==WebMSO19 fcgi API==&lt;br /&gt;
[[WebMSO19fcgi]]&lt;br /&gt;
&lt;br /&gt;
==MSO19 Registers==&lt;br /&gt;
[[MSO19 Registers]]&lt;/div&gt;</summary>
		<author><name>JyehLink</name></author>
	</entry>
</feed>