Cannot get basic python example to work

Applications, development tools, FPGA, C, WEB
Post Reply
Mark Corrigan
Posts: 9
Joined: Mon Jul 06, 2015 12:10 pm

Cannot get basic python example to work

Post by Mark Corrigan » Mon Jul 13, 2015 4:01 pm

I'm trying to run one of python examples provided on the github - https://github.com/RedPitaya/RedPitaya/ ... _graphs.py

I see there is no python interpreter on the rp and the python sockets library is being used so I assume the idea is the scripts are interpreted remotely and control the rp over a network? I'm running the scripts on a Linux box which is connected to the rp through wired Ethernet cable. I can ssh into and have successfully cross compiled and ran c programs on it - so the connection is fine.

I change the IP address in the linked example to 192.168.1.100 then run the script and get the error;

Code: Select all

Traceback (most recent call last):
  File "test.py", line 61, in <module>
    rp_s.rp_write(rp_s.choose_state(str(i), 1))
  File "test.py", line 40, in rp_write
    return self._socket.send(message)
socket.error: [Errno 32] Broken pipe

I've been trying to read into sockets as I've never done any network programming before, but should it not just work?

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Cannot get basic python example to work

Post by Nils Roos » Wed Jul 15, 2015 10:10 am

Did you start the scpi-server on the Red Pitaya before running the example on your linux box ?
Just ssh into the RP and issue

Code: Select all

redpitaya> scpi-server &

Mark Corrigan
Posts: 9
Joined: Mon Jul 06, 2015 12:10 pm

Re: Cannot get basic python example to work

Post by Mark Corrigan » Wed Jul 15, 2015 10:48 am

Hi Nils, I started the server and the same error persists

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Cannot get basic python example to work

Post by Nils Roos » Wed Jul 15, 2015 11:45 am

My knowledge of python and the scpi-server is insufficient to provide any further advice, sorry.

Maybe one of the authors of the example and the scpi-server has more to say ?

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 84 guests