Page 1 of 1

Setting IP address

Posted: Mon Sep 21, 2015 2:59 pm
by tony1tf
Hi folks,
Just received my redpitaya. I am trying to set it up with a static IP address by editing the wired ethernet parameters -
commented out :

# Dynamic (DHCP) IP address
# iface eth0 inet dhcp
# udhcpc_opts -t7 -T3

and uncommented:
# Static IP address
iface eth0 inet static
address 192.168.2.15
netmask 255.255.255.0
gateway 192.168.2.1

The interfaces file also has this comment:
# Don't forget to set the static DNS IP in sd:/etc/init.d/rcS too
so I put the new static IP address in there too.

However, I cant see the device on my Mac ethernet port. When I send ifconfig on the terminal, I get:

redpitaya> ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:32:F0:17:14
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:342 (342.0 B)
Interrupt:54 Base address:0xb000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:552 (552.0 B) TX bytes:552 (552.0 B)

So the IP address is some default one - this actually conflicts with one of my existing devices so I cant use it.
Not sure how to get the device to use different IP addresses. Help, please
Tony

Re: Setting IP address

Posted: Mon Sep 21, 2015 6:20 pm
by tony1tf
Answering myself. I have spent most of the day, hardly getting anywhere, using the ethernet port of my Macbook. I got to the point where I could see the device at 192.168.1.100 only if I turned off the wifi on my Macbook. So, then I couldn't access the bazaar. Finally, partially solved the problem by putting the device back to DHCP an plugging direct into my router, which issued it the address 192.168.1.62. I was able to discover this with the "discover" application entering the MAC address. It could then be used on my LAN without upsetting the other devices.
However, when I try to download an application to the redpitaya, I get this error:
Cannot access http://bazaar.redpitaya.com/device
Is this part of the website down?
Tony

Re: Setting IP address

Posted: Mon Sep 21, 2015 7:00 pm
by Nils Roos
Hi Tony,

You were probably editing the wrong file - since some time, the Red Pitaya's default wifi configuration is "access point", which uses the file /opt/etc/network/interfaces.ap instead of /opt/etc/netzwork/interfaces for configuration. If you don't want to use the RP as wifi access point, you can change /opt/etc/network/config - the wifi mode parameter is at the end of that file. If you change it to "client", your changes to interfaces should become active.

The bazaar seems to be working fine at the moment, I just installed a couple of apps on an empty RP.

Re: Setting IP address

Posted: Mon Sep 21, 2015 7:08 pm
by tony1tf
Sorry - answering my own post again. I discovered that the applications could also be loaded to the SD card into www/apps, so I took it out and did that. I also noted that the rcS file needed the "echo" command commenting out again, and the network/config file needed editing back from static to NETWORK=dhcp.
I rebooted the device, and the new apps had appeared and I was able to access bazaar correctly.
It looks great, although I note that the sweeping apps seem to time out quickly.
I just need now to find out how to link directly to the ethernet port on my Macbook, since the Red Pitaya is now next to my router - a long way away from my electronics workshop.
Tony
ps - thanks for the reply Nils - we were overlapping. OK - I'll look at the access point enabling, although its working well enough now for me to play. Maybe I need to change that mode to get it connected to my Macbook.

Re: Setting IP address

Posted: Mon Sep 21, 2015 7:19 pm
by pavel
Hi Tony,

"I just need now to find out how to link directly to the ethernet port on my Macbook"

You can activate the DHCP server on the Ethernet port of your Macbook by activating the sharing of the Wireless Internet Connection via Ethernet. Here is a link to an article that explains how it can be done:

http://www.maclife.com/article/howtos/h ... n_ethernet

After you complete the first step "1. Set up the Sharing" and connect Red Pitaya to Macbook, it's Macbook that will assign an IP address to Red Pitaya.

Cheers,

Pavel

Re: Setting IP address

Posted: Tue Oct 20, 2015 1:27 am
by drey
    Does one need to create a WiFi bridge in order to use the RP with a direct RJ45 connection to a Windows7 laptop? Will the RP access the Bazaar without it? If it is necessary, is there documentation that describes this?
      the file \etc\network\interfaces.ap has the statement
      # Don't forget to set the static DNS IP in sd:/etc/init.d/rcS too.
      but the directory "etc" only contains the directory "network" and nothing else, so how does one follow this direction?
        The documentation lists 192.168.1.100 as the default IP address but the address generated by the Quick Start site using the RP MAC address is 192.168.0.18. How can there be two addresses?

        Re: Setting IP address

        Posted: Tue Jul 04, 2017 10:47 am
        by F4HTB
        Hello dear all,

        I have juste a litle question, know you how to change the MTU?

        Thanks in advance