Dawn Robotics Forum Support and community forums for Dawn Robotics Ltd 2015-09-19T14:10:20+01:00 http://forum.dawnrobotics.co.uk/feed.php?f=5&t=1381 2015-09-19T14:10:20+01:00 2015-09-19T14:10:20+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1927#p1927 <![CDATA[Re: SD for Robot help]]>
That could be for the best. One thing to try if you were still getting the 'couldn't read interfaces file "/etc/network/interfaces"' error would be to completely empty the file (which I think must solve it...) and then add lines back in one by one until you can see the error.

Regards

Alan

Statistics: Posted by Alan — Sat Sep 19, 2015 2:10 pm


]]>
2015-09-18T12:56:36+01:00 2015-09-18T12:56:36+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1925#p1925 <![CDATA[Re: SD for Robot help]]> Statistics: Posted by RockyPi — Fri Sep 18, 2015 12:56 pm


]]>
2015-09-15T14:21:39+01:00 2015-09-15T14:21:39+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1923#p1923 <![CDATA[Re: SD for Robot help]]>
Ok, a google search for the error message 'couldn't read interfaces file "/etc/network/interfaces"' shows that apparently this message is code for 'there's an error in the file' (see here) not, 'I can't find the file' which is what I thought.

Looking at the contents of the file on our standard SD card image

Code:
auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0

iface wlan0 inet static
    address 192.168.42.1
    netmask 255.255.255.0

#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp


The bottom 3 lines are commented out so don't matter, however the other changes I can see in yours are

  • DHCP is in upper case
  • You seem to be missing indentation on the iface address, netmask and gateway lines

If there's one thing I've learnt in many years of dealing with Linux is, 'you never get rid of the indentation!' :) and sometimes, (for example with make files) it's important to use tabs rather than spaces (although I don't think that matters here).

Could you please try to fix the indentation and see if that works? If not you may have some joy by resetting the interfaces file to the original and then putting your changes back in. If that doesn't work then I'd suggest reflashing a copy of our SD card. Flashing over your existing card is fine, although it may be helpful to do it on another SD card if you want to try to work out what change was made that stopped it from working.

Regards

Alan

Statistics: Posted by Alan — Tue Sep 15, 2015 2:21 pm


]]>
2015-09-14T12:47:08+01:00 2015-09-14T12:47:08+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1920#p1920 <![CDATA[Re: SD for Robot help]]>
Result for cat /etc/network/interfaces:
Code:
login as:
pi@raspberrypi ~ $ cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet DHCP

allow-hotplug wlan0
auto wlan0
iface wlan0 inet static
address 192.168.42.1
netmask 255.255.255.0
gateway 192.168.42.1
pi@raspberrypi ~ $


And if I reflash it should I just do it to the same SD card?

Statistics: Posted by RockyPi — Mon Sep 14, 2015 12:47 pm


]]>
2015-09-07T11:06:01+01:00 2015-09-07T11:06:01+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1918#p1918 <![CDATA[Re: SD for Robot help]]>
Ummm, do you have the file '/etc/network/interfaces'? What is the result of running

Code:
cat /etc/network/interfaces


If /etc/network/interfaces is not there then it looks like the SD card has been changed or corrupted in some way. Could you try reflashing the SD card with our disk image to test that an unchanged card works?

Regards

Alan

Statistics: Posted by Alan — Mon Sep 07, 2015 11:06 am


]]>
2015-09-05T14:41:14+01:00 2015-09-05T14:41:14+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1917#p1917 <![CDATA[Re: SD for Robot help]]>
Code:
pi@raspberrypi ~ $ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 005: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n reless Adapter [Realtek RTL8188CUS]
pi@raspberrypi ~ $


Here is what happens when I stop and restart the hostapd and isc-dhcp-server:
Code:
pi@raspberrypi ~ $ sudo ifdown wlan0
/etc/network/interfaces:3: unknown method
ifdown: couldn't read interfaces file "/etc/network/interfaces"
pi@raspberrypi ~ $ sudo ifup wlan0
/etc/network/interfaces:3: unknown method
ifup: couldn't read interfaces file "/etc/network/interfaces"
pi@raspberrypi ~ $ sudo service hosapd stop
hosapd: unrecognized service
pi@raspberrypi ~ $ sudo service isc-dhcp-server stop
[FAIL] Stopping ISC DHCP server: dhcpd failed!
pi@raspberrypi ~ $ sudo service isc-dhcp-server start
[FAIL] Starting ISC DHCP server: dhcpd[....] check syslog for diagnostics. ... failed!
 failed!
pi@raspberrypi ~ $ sudo service hostapd start
[ ok ] Starting advanced IEEE 802.11 management: hostapd.
pi@raspberrypi ~ $ ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 74:da:38:0c:c0:c0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

pi@raspberrypi ~ $

Statistics: Posted by RockyPi — Sat Sep 05, 2015 2:41 pm


]]>
2015-09-02T18:16:20+01:00 2015-09-02T18:16:20+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1916#p1916 <![CDATA[Re: SD for Robot help]]>
Hostapd and the DHCP server being down is a problem, but I would say that it stems from the fact that wlan0 your wifi dongle does not have an ip address.

Can you please send the output of running lsusb? I'd like to check that the dongle is being detected. After that could you please try running

Code:
sudo ifdown wlan0
sudo ifup wlan0


(for code there's a button 5th from left above the editor btw) those two commands should restart the wifi, and if you run 'ifconfig wlan0' after that you should hopefully see that wlan0 has the ip address 192.168.42.1.

Once the ip address is there you should hopefully be able to run

Code:
sudo service hostapd stop
sudo service isc-dhcp-server stop
sudo service isc-dhcp-server start
sudo service hostapd start


If the service are up then you should be able to connecto to the Pi_Mini_Robot WiFi network.

Regards

Alan

Statistics: Posted by Alan — Wed Sep 02, 2015 6:16 pm


]]>
2015-09-02T13:02:49+01:00 2015-09-02T13:02:49+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1915#p1915 <![CDATA[Re: SD for Robot help]]>
This is from the Ifconfig:
pi@raspberrypi ~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:7e:61:f7
inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1040 errors:0 dropped:0 overruns:0 frame:0
TX packets:1563 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:72163 (70.4 KiB) TX bytes:229301 (223.9 KiB)

wlan0 Link encap:Ethernet HWaddr 74:da:38:0c:c0:c0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

For Sudo service hostapd status:
pi@raspberrypi ~ $ sudo service hostapd status
[FAIL] hostapd is not running ... failed!

For sudo service isc-dhcp-server status:
pi@raspberrypi ~ $ sudo service isc-dhcp-server status
Status of ISC DHCP server: dhcpd is not running.

Is the fact that hostapd and isc-dhcp-server the problem? If so what's next to fix them?

Thank you

Statistics: Posted by RockyPi — Wed Sep 02, 2015 1:02 pm


]]>
2015-09-01T11:47:54+01:00 2015-09-01T11:47:54+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1911#p1911 <![CDATA[Re: SD for Robot help]]>
No worries for the delay. With a newborn child at home I can sympathise with other responsibilities popping up. :)

That's great news that you've got an ethernet cable connected.

Can you please now ssh into the Pi (if you need help with this, let me know your main PCs operating system and I can provide more instructions). Once into your Pi, can you please let me know the output of running the following commands

Code:
ifconfig
sudo service hostapd status
sudo service isc-dhcp-server status


The first command checks the status of the network cards, the second command checks that the software responsible for the WiFi access point is running, and the third command checks that the dhcp server (which should give you the IP address when connecting to the robot) is running.

Regards

Alan

Statistics: Posted by Alan — Tue Sep 01, 2015 11:47 am


]]>
2015-08-31T12:56:11+01:00 2015-08-31T12:56:11+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1909#p1909 <![CDATA[Re: SD for Robot help]]>
What is the next step I should take?

Thank you.

Statistics: Posted by RockyPi — Mon Aug 31, 2015 12:56 pm


]]>
2015-08-26T17:36:46+01:00 2015-08-26T17:36:46+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1907#p1907 <![CDATA[Re: SD for Robot help]]>

Statistics: Posted by Alan — Wed Aug 26, 2015 5:36 pm


]]>
2015-08-25T18:06:04+01:00 2015-08-25T18:06:04+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1905#p1905 <![CDATA[Re: SD for Robot help]]>
I can certainly unplug it and see if that helps in the problem. I think i may have forgotten that I can plug it into a monitor. I just can't plug a Ethernet cable into it. (Sorry about that.) I can try something that may allow me to do so, but it will require some finesse. But I may be able to do it so I'll give it a try.

I'll update you once I've gotten the chance to do so. Thank you again.

Statistics: Posted by RockyPi — Tue Aug 25, 2015 6:06 pm


]]>
2015-08-25T09:52:26+01:00 2015-08-25T09:52:26+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1903#p1903 <![CDATA[Re: SD for Robot help]]>
So just so that I can confirm I understand the situation correctly. You're currently running the Pi off a wall adapter using the EW7811-Un. When you try to connect to the Pi_Mini_Robot wifi network generated by the Pi you're unable to obtain an IP address. Is that correct?

There may possibly be a problem with power to the mini driver. Can you either unplug the mini driver whilst we resolve this, or else make sure that it is powered separately with some AA batteries and that its switch is on?

Beyond that, it's going to be really tricky to debug this if you can't connect an ethernet cable, or a monitor to see what's going on. Is a HDMI monitor an option? In the absence of being able to look at the running system, my best guess would be that the SD card may be corrupted and would advise you to try reflashing the image.

Regards

Alan

Statistics: Posted by Alan — Tue Aug 25, 2015 9:52 am


]]>
2015-08-23T20:07:39+01:00 2015-08-23T20:07:39+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1902#p1902 <![CDATA[Re: SD for Robot help]]>
We bought the Raspberry Pi Camera Robot bundle ( http://www.dawnrobotics.co.uk/raspberry ... is-bundle/) and, I believe, it's a raspberry pi B+ since it has 4 usb ports.

And thank you for the answer to that question. I had read the instructions wrong then. Thought that's what it meant. Solves that problem. Thank you.

/etc/network/interfaces Code:

auto lo
iface lo inet loopback
iface etho0 inet DHCP

allow-hotplug wlan0
auto wlan0
iface wlan0 inet static
address 192.168.42.1
netmask 255.255.255.0
gateway 192.168.42.1



If there any of the other files you may want to see just let me know and I'll type them up for you to see them.

Thank you for your help once again.

Statistics: Posted by RockyPi — Sun Aug 23, 2015 8:07 pm


]]>
2015-08-21T21:45:08+01:00 2015-08-21T21:45:08+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1381&p=1901#p1901 <![CDATA[Re: SD for Robot help]]>
What WiFi dongle is it that you're using? If it's not the Edimax EW-7811Un then it's possible (depending upon what type of batteries you're using to power the robot) that the batteries are not able to provide enough current to keep the WiFi dongle stable. This could also explain the network disappearing and reappearing.

Are you able to power the robot from a wall power adapter for a bit just to see if that solves the problem? Also, are you able to perhaps plug an ethernet cable into the Pi and run 'ifconfig wlan0' at the command line to see if the WiFi is running properly?

I should have also probably asked this earlier, but could you also please tell me what type of batteries you're using, and what version of the Pi (model B, B+ or Pi 2) are you using?

Oh, and in answer to your question our SD card is configured so that no extra router is needed. Although you can change the configuration if you like to connect via a router.

Cheers

Alan

Statistics: Posted by Alan — Fri Aug 21, 2015 9:45 pm


]]>