mtu-most / linear-actuator

Code and model files for open source linear actuator
26 stars 20 forks source link

Question about the note #9

Open neilwang0913 opened 7 years ago

neilwang0913 commented 7 years ago

Hello:

I am quite new for the server and could you explain how to make the server work.

In your latest note mentioned that

"make sure you copy (or link) rpc.js from the python-websocketd repository to the html directory." Where is the python-websocketd repository? I did not see the rpc.js file?

Looking forward your reply.

Kind regards.

Fengzhou

wijnen commented 7 years ago

Hi,

The server is a Python program which is a web server and controls the electronics. It works, but I recommend against using it. Instead, using an Arduino-based setup like the ones used for 3-D printers and 3-D printer software such as Franklin (https://github.com/mtu-most/franklin ) is much nicer, but it also costs more (it needs the Arduino and a computer, which can be a Raspberry Pi).

But I'll answer you question about the server anyway: You need python-websocketd to run the server. It is in my personal github account: https://github.com/wijnen/python-websocketd/. You need websocketd.py and rpc.js from there. The python module in the directory of the server, rpc.js in the html subdirectory.

Thanks, Bas

On Sun, Feb 26, 2017 at 08:02:01PM -0800, Fengzhou Wang wrote:

Hello:

I am quite new for the server and could you explain how to make the server work.

In your latest note mentioned that

"make sure you copy (or link) rpc.js from the python-websocketd repository to the html directory." Where is the python-websocketd repository? I did not see the rpc.js file?

Looking forward your reply.

Kind regards.

Fengzhou

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/mtu-most/linear-actuator/issues/9

neilwang0913 commented 7 years ago

Hi Bas:

Thank you for your examplation and I am currently starting to learn the resberry pi to control with that.So I might contine to work with your server version and then move to your recommend methond.

As a begineer, I feel difficult to catch up with the meaning of each file at the moment but I will try to figure it out. Is there any possbile to provide a full description about how to run the COMMEND with these files to build the servicer sequentially as the paper mentioned?

Looking forward your reply. Thank you in advance

Kind regards.

Fengzhou

On Mon, Feb 27, 2017 at 5:07 PM, Bas Wijnen notifications@github.com wrote:

Hi,

The server is a Python program which is a web server and controls the electronics. It works, but I recommend against using it. Instead, using an Arduino-based setup like the ones used for 3-D printers and 3-D printer software such as Franklin (https://github.com/mtu-most/franklin ) is much nicer, but it also costs more (it needs the Arduino and a computer, which can be a Raspberry Pi).

But I'll answer you question about the server anyway: You need python-websocketd to run the server. It is in my personal github account: https://github.com/wijnen/python-websocketd/. You need websocketd.py and rpc.js from there. The python module in the directory of the server, rpc.js in the html subdirectory.

Thanks, Bas

On Sun, Feb 26, 2017 at 08:02:01PM -0800, Fengzhou Wang wrote:

Hello:

I am quite new for the server and could you explain how to make the server work.

In your latest note mentioned that

"make sure you copy (or link) rpc.js from the python-websocketd repository to the html directory." Where is the python-websocketd repository? I did not see the rpc.js file?

Looking forward your reply.

Kind regards.

Fengzhou

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/mtu-most/linear-actuator/issues/9

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mtu-most/linear-actuator/issues/9#issuecomment-282783388, or mute the thread https://github.com/notifications/unsubscribe-auth/AKOHUBkZRcD12HMzQcVzcoi5CdVoxZPNks5rgwLXgaJpZM4MMq8h .

wijnen commented 7 years ago

Hi Fengzhou,

I'm not entirely sure what you mean. You want steps to make the server work? Looking at it again, this is actually harder than making Franklin work. This is because for Franklin I made a Makefile to build all the dependencies.

But for completeness, here are the commands that should make it work. First, install Debian on the Raspberry Pi. Then do:

apt-get install git python3 python3-rpi.gpio python3-all dh-python doxygen doxypy libjs-jquery graphviz git clone https://github.com/mtu-most/linear-actuator git clone https://github.com/wijnen/python-fhs git clone https://github.com/wijnen/python-network git clone https://github.com/wijnen/python-websocketd cd linear-actuator ln -s ../python-fhs/fhs.py . ln -s ../python-network/network.py . ln -s ../python-websocketd/websocketd.py . cd html ln -s ../../python-websocketd/rpc.js . cd ..

Then to run it, do: ./pump-server

I hope that makes it work for you. Please let me know if you have any more problems.

Thanks, Bas

On Mon, Feb 27, 2017 at 03:27:53PM -0800, Fengzhou Wang wrote:

Hi Bas:

Thank you for your examplation and I am currently starting to learn the resberry pi to control with that.So I might contine to work with your server version and then move to your recommend methond.

As a begineer, I feel difficult to catch up with the meaning of each file at the moment but I will try to figure it out. Is there any possbile to provide a full description about how to run the COMMEND with these files to build the servicer sequentially as the paper mentioned?

Looking forward your reply. Thank you in advance

Kind regards.

Fengzhou

On Mon, Feb 27, 2017 at 5:07 PM, Bas Wijnen notifications@github.com wrote:

Hi,

The server is a Python program which is a web server and controls the electronics. It works, but I recommend against using it. Instead, using an Arduino-based setup like the ones used for 3-D printers and 3-D printer software such as Franklin (https://github.com/mtu-most/franklin ) is much nicer, but it also costs more (it needs the Arduino and a computer, which can be a Raspberry Pi).

But I'll answer you question about the server anyway: You need python-websocketd to run the server. It is in my personal github account: https://github.com/wijnen/python-websocketd/. You need websocketd.py and rpc.js from there. The python module in the directory of the server, rpc.js in the html subdirectory.

Thanks, Bas

On Sun, Feb 26, 2017 at 08:02:01PM -0800, Fengzhou Wang wrote:

Hello:

I am quite new for the server and could you explain how to make the server work.

In your latest note mentioned that

"make sure you copy (or link) rpc.js from the python-websocketd repository to the html directory." Where is the python-websocketd repository? I did not see the rpc.js file?

Looking forward your reply.

Kind regards.

Fengzhou

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/mtu-most/linear-actuator/issues/9

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mtu-most/linear-actuator/issues/9#issuecomment-282783388, or mute the thread https://github.com/notifications/unsubscribe-auth/AKOHUBkZRcD12HMzQcVzcoi5CdVoxZPNks5rgwLXgaJpZM4MMq8h .

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/mtu-most/linear-actuator/issues/9#issuecomment-282891379

neilwang0913 commented 7 years ago

Hi Bas:

Thank you for your explanations in details.

Now the server is working but I go to the server with Rasberry pi default browser though the local IP. There is message said: The connection to the server was lost. Is that matter?(see the attachment)

And then I try the global IP address and one windows PC could connect to the server. And there is error message pump up.

I wonder to know is there any web browser limitation for the server connection?

Looking for your reply..

Kind regards.

Fengzhou 2017-03-01-025521_1232x992_scrot

wijnen commented 7 years ago

0.0.0.0 is a special address used for listening to everything (using IPv4). I'm not sure what is supposed to happen when using it as a destination, but I'm not surprised that it doesn't work.

The local address is 127.0.0.1. If you use that in a local browser, it should work the same as from the Windows machine (using the global IP). You can also use the global IP in the local browser.

Thanks, Bas

On Tue, Feb 28, 2017 at 07:26:37PM -0800, Fengzhou Wang wrote:

Hi Bas:

Thank you for your explanations in details.

Now the server is working but I go to the server with Rasberry pi default browser though the local IP. There is message said: The connection to the server was lost. Is that matter?(see the attachment)

And then I try the global IP address and one windows PC could connect to the server. And there is error message pump up.

I wonder to know is there any web browser limitation for the server connection?

Looking for your reply..

Kind regards.

Fengzhou 2017-03-01-025521_1232x992_scrot

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/mtu-most/linear-actuator/issues/9#issuecomment-283234415