LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-25-2016, 08:09 AM   #1
lukecam1995
LQ Newbie
 
Registered: Oct 2016
Posts: 6

Rep: Reputation: Disabled
Error when restarting network. Pre-up and Post-down not found.


Hi I am trying to configure Khepera 3 robots to connect to the WI-FI hotspot of my Windows 10 laptop. The robots run on Linux.

So far I have managed to get the robot to connect to the WIFI network and I can ping other devices on the network as well as google servers (8.8.8.8).

The problem is that my laptop is not showing that the robot is connected to it. When I try to send a file using the scp command the connection times out. When I try to restart the network using /etc/init.d/networking restart I get the following output:

root@korebot2:/etc/wpa_supplicant$ /etc/init.d/networking restart
Reconfiguring network interfaces... /etc/network/if-pre-up.d/wireless: /etc/network/if-pre-up.d/wireless: 5: pre-up: not found
/etc/network/if-pre-up.d/wireless: /etc/network/if-pre-up.d/wireless: 6: post-down: not found
run-parts: /etc/network/if-pre-up.d/wireless exited with return code 127: Success
route: SIOC[ADD|DEL]RT: File exists
/etc/network/if-pre-up.d/wireless: /etc/network/if-pre-up.d/wireless: 5: pre-up: not found
/etc/network/if-pre-up.d/wireless: /etc/network/if-pre-up.d/wireless: 6: post-down: not found
run-parts: /etc/network/if-pre-up.d/wireless exited with return code 127: Success
done.

It says that pre-up and post-down not found. I have included the contents of the /etc/network/if-pre-up.d/wireless file below as well.

#!/bin/sh
ifconfig eth0 up
ifconfig eth0 192.168.137.101
route add default gw 192.168.137.1 eth0
pre-up wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -ieth0 -Dwext -B
post-down killall -q wpa_supplicant


Thanks for your time, I am completely stuck.

Last edited by lukecam1995; 10-25-2016 at 08:10 AM. Reason: add more info
 
Old 10-26-2016, 10:55 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
If you can ping other devices on the network then do you have a ssh versus networking problem?

Can you connect to the server using ssh? Is ssh running and have you allowed ssh traffic through the firewall?
 
Old 10-26-2016, 11:14 AM   #3
lukecam1995
LQ Newbie
 
Registered: Oct 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Update:

I am now connected to the WI-FI without any errors. The problem was because I chose an IP address out of its range.

However I have a problem with ssh now. I can ssh into my laptop from the robot. I can also copy files from my robot to the laptop using scp. For some reason I cannot do it the other way round. When I try to ssh from my laptop to the robot the connection times out. My firewall is inactive. The robot does not have a firewall. Both devices use port 22 as ssh port. I checked that the robot is listening for ssh connections too!

The robot uses dropbear as an ssh program, hence I installed an old version of ssh on my laptop to see if it was the reason but nothing changed.

It is all very odd to me. Thank you for the response!

Last edited by lukecam1995; 10-26-2016 at 11:37 AM. Reason: adding more info
 
Old 10-26-2016, 02:42 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
I have not played with dropbear in a while but I assume you have verified that it is running. What are the error messages? Does the robot have a host key?
 
Old 10-26-2016, 03:57 PM   #5
lukecam1995
LQ Newbie
 
Registered: Oct 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
The password of the robot is just enter. It does not give an error. It tries to connect to port 22 of the robot but never actually establishes a connection. As I said when I execute the command ssh on the robot side to log into my laptop it works perfectly.
 
Old 10-26-2016, 04:03 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
You can use the -v option to see debug messages. multiple v's (max of 3) increase verbosity. See man pages for details. i.e.

ssh -v username@robot
 
Old 10-26-2016, 04:08 PM   #7
lukecam1995
LQ Newbie
 
Registered: Oct 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
I did. The last update it gives is that it is trying to conect to the port of the robot, and it stays that way until it times out.

I will try with 3 v's though because I have only tried with one so far. Thanks!

Last edited by lukecam1995; 10-26-2016 at 04:14 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Post LFS: Compiling systemd - error: *** libacl not found basica Linux From Scratch 3 10-12-2016 07:59 AM
[SOLVED] FATAL: Module off not found while restarting the Network Service Redhat 6.4 jitt.198@gmail.com Red Hat 2 09-08-2015 08:53 AM
LXer: Welcome to the pre-Post-PC era LXer Syndicated Linux News 0 03-10-2012 01:20 AM
Post/pre Routing shipon_97 Linux - Networking 1 02-25-2006 01:26 AM
anaconda post-install error - resolv.conf not found anamika Linux - Distributions 3 09-19-2002 03:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration