Python on the Red Pitaya board

Discussions about active development projects
pavel
Posts: 790
Joined: Sat May 23, 2015 5:22 pm

Re: Python on the Red Pitaya board

Post by pavel » Mon Aug 31, 2015 7:25 am

smwright wrote:I'm having similar difficulties. Watching the pitaya boot from the serial port with my original (working) SD image, and then typing ifconfig, the pitaya reports:
init addr: 192.168.1.100 Bcast: 192.168.1.255 Mask 255.255.255.0

When I watch Pavel's image boot, then type ifconfig after logging into root, the pitaya reports nothing. The corresponding line with the internet address is simply not there.

During boot it does say "Failed to start LSB: DHCP server. " New at this, no idea if that is important.
Hi Steve,

Looks like your Red Pitaya doesn't get any response from a DHCP server and uses the default IP address as it's described at the following link:
http://wiki.redpitaya.com/index.php?tit ... figuration

Could you connect your Red Pitaya to a DHCP server? There are several possible solutions depending on your network layout. I often use one of the following solutions:
  • connect Red Pitaya directly to my Windows laptop and use the "Internet Connection Sharing" functionality that enables a DHCP server on my laptop,
  • connect Red Pitaya to a small network router that has a DHCP server.
In case of the Debian based system, I did not configure any default IP address. That is why it behaves as you describe. I'll check how the network is configured on the original Red Pitaya SD card and I'll copy it to my Debian configuration.

Cheers,

Pavel

pavel
Posts: 790
Joined: Sat May 23, 2015 5:22 pm

Re: Python on the Red Pitaya board

Post by pavel » Mon Aug 31, 2015 3:58 pm

To configure a default IP address if there is no DHCP server, the following lines should be added to /etc/dhcp/dhclient.conf on the Debian based system:

Code: Select all

timeout 20;

lease {
  interface "eth0";
  fixed-address 192.168.1.100;
  option subnet-mask 255.255.255.0;
  renew 2 2030/1/1 00:00:01;
  rebind 2 2030/1/1 00:00:01;
  expire 2 2030/1/1 00:00:01;
}
I'll add them to the next version of the Debian based SD card image.

smwright
Posts: 4
Joined: Tue Jun 23, 2015 8:26 pm

Re: Python on the Red Pitaya board

Post by smwright » Tue Sep 01, 2015 4:05 am

Thanks Pavel! I added those lines, that did not seem to do it, but then added the lines described in your previous post:

"Looks like your Red Pitaya doesn't get any response from a DHCP server and uses the default IP address as it's described at the following link: http://wiki.redpitaya.com/index.php?tit ... figuration"

Working fine now, I can now log in over the Ethernet cable. Much easier for classroom demonstrations. Your quick response and help are much appreciated.

Steve

newkew
Posts: 5
Joined: Thu Apr 02, 2015 1:26 pm

Re: Python on the Red Pitaya board

Post by newkew » Wed Sep 02, 2015 8:57 am

Hi,
Some news concerning my Debian + pyhton installation on RP board

I connected directly to serial command http://wiki.redpitaya.com/index.php?tit ... connection. Super
I succed to install some python packages. Nice !

I tried to install PyRedpitaya with pip but I have a error with monitor librairie when I used it
OSError: libmonitor.so: cannot open shared object file: No such file or directory

Merci Pavel
Kewin

pavel
Posts: 790
Joined: Sat May 23, 2015 5:22 pm

Re: Python on the Red Pitaya board

Post by pavel » Wed Sep 02, 2015 12:29 pm

Here is a new version of the Debian based SD card image that contains the default DHCP lease configuration from my previous comment. If no reply from the DHCP server is obtained within 20 seconds, the IP address will be set to 192.168.1.100.

https://googledrive.com/host/0B-t5klOOy ... 150908.zip
Last edited by pavel on Tue Sep 08, 2015 12:39 pm, edited 1 time in total.

newkew
Posts: 5
Joined: Thu Apr 02, 2015 1:26 pm

Re: Python on the Red Pitaya board

Post by newkew » Wed Sep 02, 2015 12:42 pm

thanks for new version

Concerning my last Pyredpitaya problem,
I clone git hub and i added
export LD_LIBRARY_PATH=/Redpitaya/python/PyRedPitaya-1.0/monitor

see :
http://stackoverflow.com/questions/1099 ... n-sys-path


Kewin

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 22 guests