SD for Robot help

If you need technical help with anything you've bought from Dawn Robotics, please post here.

Re: SD for Robot help

Postby Alan » Wed Aug 26, 2015 5:36 pm

Best of luck. :)
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: SD for Robot help

Postby RockyPi » Mon Aug 31, 2015 12:56 pm

Sorry for the long wait. Some other responsibilities popped up. I managed to clear a spot for the monitor and the raspberry pi next to our router and was able to successfully connect an Ethernet cable from it to the raspberry pi. It can now successfully access the internet now.

What is the next step I should take?

Thank you.
RockyPi
 
Posts: 11
Joined: Mon Aug 17, 2015 1:17 am

Re: SD for Robot help

Postby Alan » Tue Sep 01, 2015 11:47 am

Hi there,

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: Select all
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
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: SD for Robot help

Postby RockyPi » Wed Sep 02, 2015 1:02 pm

Sorry I don't know how to post this into code brackets.

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
RockyPi
 
Posts: 11
Joined: Mon Aug 17, 2015 1:17 am

Re: SD for Robot help

Postby Alan » Wed Sep 02, 2015 6:16 pm

Hi there,

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: Select all
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: Select all
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
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: SD for Robot help

Postby RockyPi » Sat Sep 05, 2015 2:41 pm

Here is what comes up for lsusb:
Code: Select all
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: Select all
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 ~ $
RockyPi
 
Posts: 11
Joined: Mon Aug 17, 2015 1:17 am

Re: SD for Robot help

Postby Alan » Mon Sep 07, 2015 11:06 am

Ok,

Ummm, do you have the file '/etc/network/interfaces'? What is the result of running

Code: Select all
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
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: SD for Robot help

Postby RockyPi » Mon Sep 14, 2015 12:47 pm

Sorry again for the long reply.

Result for cat /etc/network/interfaces:
Code: Select all
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?
RockyPi
 
Posts: 11
Joined: Mon Aug 17, 2015 1:17 am

Re: SD for Robot help

Postby Alan » Tue Sep 15, 2015 2:21 pm

Hmmm,

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: Select all
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
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: SD for Robot help

Postby RockyPi » Fri Sep 18, 2015 12:56 pm

Unfortunately, rewriting the interfaces file didn't solve the problem. So i'm going to re flash the image here soon.
RockyPi
 
Posts: 11
Joined: Mon Aug 17, 2015 1:17 am

PreviousNext

Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests