Wifi connections


#1

I’m getting messages saying my ads-b is offline. I need to connect via wifi because of the location of my router.
I’ve tried following the script for activating wifi but when I get to
sudo chmod /root/network_monitor.sh the response is
sudo: unable to execute /root/network_monitor.sh: & no such file or directory exists

Can anyone explain where I’m going wrong?

Many thanks


#2

You need to tell ‘chmod’ which permissions you’re assigning to the file. Try this:

‘sudo chmod 755 /root/network_monitor.sh’


#3

Thanks. I tried that but nothing happened when I made that entry. It simply reverted to the pi@piaware entry line.

Any other suggestions?


#4

Sounds like it worked. If it hadn’t you would have seen an error message, like you did before.

Type ‘sudo ls -l /root/network_monitor.sh’

The result should look something like this:


pi@piaware ~ $ sudo ls -l /root/network_monitor.sh
-rwxr-xr-x 1 root root 218 Nov 22 22:04 /root/network_monitor.sh


If the rwx’s look like the above, then you’ll know it worked.


#5

I entered the above suggestion and gotthe indcated response, however my ads-b is still not online. I’ve reverted temporarly to a fixed internet connection but that hasn’t respolved the problem either.
Also, when I enter sudo piaware-status the status of my ads-b is no longer shown.

Help!


#6

Have you tried:


sudo piaware -restart


#7

Thanks ironjungle, but that didn’t work. I’ve just formatted my sd card and reloaded piaware and that did the trick.
Can you help me with adding wifi?
I’ve followed the script carefully but when I get to
sudo /root/network_monitor.sh &
I get the response
unable to execute /root/network_monitor.sh: no such file or directory
I’ve been over and over the whole process several times but cannot seem to complete it. Any help would be very much appreciated.
Thanks


#8

Check that the very first line of the script is exactly correct.


#9

The first line of script I entered is
sudo nano /etc/rc.local
Is this correct? Does the colour of the individual letters matter? Mine are all the same colour.

Thanks again


#10

I mean the first line of the file /root/network_monitor.sh, which you can edit with “sudo nano /root/network_monitor.sh”

The first line should read exactly:



#!/bin/bash


Coloring doesn’t matter, that’s not present in the file

The #! (“hashbang”) line indicates what interpreter to use to run the script. If it’s not correct, you’ll see that “no such file or directory” from sudo - it’s actually because the interpreter can’t be found, not the script itself.


#11

Thank you very much for your help.

The first line of my script is exactly as you have indicated. It is the first part of the following line as shown on the wifi instructions
#!/bin/bashwhile true ; do if ifconfig wlan0 | grep -q “inet addr:”;

I’ve tried putting #!/bin/bash on a separate line but the response I now get is Permission Denied.

I’m at the stage of thinking about giving up the whole project as it has become too frustrating. However, I’m prepared to give it one last blast to see if I can get the wifi up and running. Any help much appreciated.

Bryan


#12

Yes, it must be on a separate line! You need to have the script exactly as shown, linebreaks and all. Not everything on one line!

but the response I now get is Permission Denied.

One thing you really need to do here is tell us exactly what you are doing and exactly what you get in response.
Either an exact cut and paste of what you typed and what you got back, or even better a screenshot of the console showing this.
It’s just too hard to diagnose what you’re doing wrong without precise information.

I should point out, too, that this network monitor script won’t actually get wifi running - it is about checking that it stays live once you have set it up.
If you don’t have the wifi working in the first place it’s not going to help.


#13

I have been trying unsuccessfully to set up my ads-b piaware on wifi for several days now without success. I have received many well intentioned responses from members but I have not been able to progress my installation.
I have followed very carefully the instructions on how to set up wifi but when i get to the point where I enter

sudo chmod +x /root/network_monitor.sh

the response I get is nothing. I then enter

sudo /root/network_monitor.sh &

the response I get now is
unable tyo execute. No such file or directory.

I have tried following all the previous advice I have been given in earlier posts but I am still all at sea. I should add that I have no previous experience of adding code to Linux files.
Any help will be much appreciated.

I’m at my wit’s end now and I simply do not know what to do next. I should add that I have no previous experience of adding code to Linux and this is all new to me.


#14

What I am trying to do is follow the steps in Optional PiAware Setup steps at flightaware.com/adsb/piaware/bui … l#password

The section which starts #!/bin/bash is not on its own line as you will see. If this tutorial is not correct, can you please spell out for me what I should be entering. Sorry, I’m inexperienced in entering code in Linux (or MS-dos for that matter) and I cannot interpret incomplete instructions. Similarly, I’m writing this on my pc and don’t know how to take screen shots off my Pi and transfer them to this forum.

By the way, wifi is running as I can do startx, go back to the Raspian home screen and get into Google.

All assistance much appreciated.


#15

Uh, yes it is:

Maybe there’s a browser rendering problem you’re having there. The instructions look complete to me.


#16

First: What obj has told you is absolutely correct. You should take his advise as holy.

Secondly: At this point, you need to describe exactly your intent. You prior stated that you’re trying to get WiFi working, however, in the other post, you claim it’s already working. network_monitor.sh is to help maintain a WiFi connection. It doesn’t configure it. If that connection goes down, that script will attempt to reestablish the connection. If WiFi isn’t already setup correctly, it won’t make a difference.

Thirdly: At this point, you need to be posting screenshots of exactly what you’re doing. No copy and paste. No, describing the situation. You’re leaving out critical data when you say what you’re doing instead of showing it.

Please type the following at the command line and post a screenshot:


sudo pico /root/network_monitor.sh

The, type the following at the command line and post a screenshot (if there is a line listed with wpa-psk followed by an long string of numbers and letters, hide it on the screenshot. DO NOT EDIT THE FILE!!! (You don’t want that data exposed publicly).:


sudo pico /etc/network/interfaces


#17

Additionally, please type the following at the command line and post a screenshot:


sudo ls -la /root/network_monitor.sh

Edit: It appears that the two threads started by the OP have been merged. The context of some of the posts may be confusing.