I could use a Coach

If you are using piaware SD card image, it has a file named piaware-config.txt. If you are using RaspberryPiOS image, then this file wont exist.

Open this file for editing by following command.
NOTE:If you are using RaspberryPiOS image, this command will open a blank file “new file”. In this case any addition to this blank file will have no effect.

sudo nano /boot/piaware-config.txt  

Now scroll to the bottom of the file, and check if there is any entries bellow the following line:

# Additional settings can be added below.

Do the entries, if any, below above line contain config for Static IP?

If not, then copy-paste following below last line

wireless-type static 
wireless-address 192.168.12.197 
wireless-netmask 255.255.255.0 
wireless-broadcast 192.168.12.255 
wireless-gateway 192.168.12.1 
wireless-name servers 8.8.8.8 8.8.4.4 

SAVE FILE
REBOOT PI
After reboot check if Static IP has taken effect.

 

In the Nano file editor, it may not be obvious to a new user how to save and exit.

Most commands in Nano use the CTRL key plus another key. If you wanted to close a file without saving your changes, you would hold down the CTRL key and press the ‘x’ key briefly (for eXit). If anything has changed while you have the file open, it will prompt you to ask if you want to save your changes. At that point you would type the ‘n’ key if you don’t want to save anything, or the ‘y’ key if you do. If you choose to save, it will then prompt you for a file name. usually you will just hit the Enter key because it will default to the name of the file that you have open.

There is a little menu at the bottom of Nano that displays some of the more common commands. in that menu, the “caret” (^) represents the CTRL key.

I never can remember the key combination for saving my work, so my solution is to exit, and then save when prompted.

These commmands will do this:

^x
y
<enter>

Again, don’t type ‘enter’ just press the enter/return key on your keyboard.

If you think you messed up and want to enter without saving (there’s not really a useful undo command), you can just do

^x
n

This will kick you back out to the command line without saving your work & you can start over by reopening the file.

If you want to be really safe before you start editing important files, you can make a duplicate as a backup before you start editing. The linux “cp” (copy) command can easily do this. you just need to give it the name of a file you want to copy and the name you want to call the copy. to use the example from above,

sudo cp /boot/piaware-config.txt /boot/piaware-config-txt.bak

sudo = run the following command as root (super user)
cp = copy
/boot/piaware-config.txt = the name of the file we want to copy
/boot/piaware-config.txt.bak = the name of the backup file (we just added .bak to the file name).

Now, if you did a directory listing of the /boot/ folder, you would have both piaware-config.txt and piaware-config.txt.bak.

That backup copy will happily sit there and be completely ignored by the system. But if you manage to completely bork your ‘live’ config file, you can just delete it and rename the back up file.

sudo rm /boot/piaware-config.txt
sudo mv /boot/piaware-config.txt.bak /bootpiaware-config.txt
sudo reboot

The “delete” command in linux is rm (for remove). Linux doesn’t have an actual rename function, so it gets around that by using a “move” (mv) command - you just “move” a filename to a different filename to effect a rename.

Hope that adds some additional clarity.

2 Likes

@jafrank
Thanks for providing details I have missed

Another way to save and close the file:

Ctrl+O ( ^O ) followed by Enter Key will save without exiting. If after this you press Ctrl+X ( ^X ), nano will close straightaway.

1 Like

Thanks to you and “abcd” for those of us who are still displaying the yellow rookie stripe on our rear bumpers!

1 Like

To all,

I am so sorry I am having such a hard time with this issue. Unfortunately, I am now more confused than ever.
Every time I attempt to edit using y’alls instructions, I don’t get the result I think I should, or end up at a place I’m not familiar with, and end up having to exit out of Putty with no changes made or possibly the wrong changes made.

I’m kinda frustrated of nothing making sense at this point, and I wonder if I’d be better off starting over from Day One with my FlightAware SD card pulled to make any editing changes there.

Again my apologies to all who have attempted to penetrate my thick skull. I’m sorry I just don’t get it.

Jay

1 Like

Okay Jay, let’s take it step by step in order to let you get the modifications done.
Copy and paste each command into the Raspberry Pi screen by using Ctrl+C and paste by Crtl +V (or use the rightside mouse key, select copy and rightclick again inside the Putty session, this will paste the command).
These steps will write the settings to the correct file without the need to edit and save a file.
Every time you press enter the file is modified with the new setting.

Step 1
log in to the Raspberry Pi via Putty

Step 2 (In this step we set the connection type to static)
copy and paste the line below

sudo piaware config wireless-type static

press enter

Step 3 ( in this step we set the desired IP address)
copy and paste the line below

sudo piaware config wireless-address 192.168.12.197

press enter

Step 4 (in this step we set the needed netmask)
copy and paste the line below

sudo piaware config wireless-netmask 255.255.255.0

Press enter

Step 5 ( in this step we set the broadcast address)
copy and paste the line below

sudo piaware config wireless-broadcast 192.168.12.255

Press enter

Step 6 ( in this step we set the gateway towards the internet)
copy and paste the line below

sudo piaware config wireless-gateway 192.168.12.1

Press enter

Step 7 ( in this step we set the DNS servers)
copy and paste the line below

sudo piaware config wireless-name servers 8.8.8.8 8.8.4.4

Press enter

Step 8
Reboot the Pi with the following command:

sudo reboot

wait a few minutes to finish the reboot

Step 9
Login to the Pi via Putty with the modified IP address 192.168.12.197

If this doesn’t work don’t hesitate to ask

3 Likes

 

Camera photo below seems to be that of a Monitor connected to RPi. The copy-paste cannot be used in this case

I think we look at a laptop screen (there’s a built-in camera visible) and that Jay has set a fullscreen Putty session :wink::sunglasses: but I could be wrong :innocent:

1 Like

Thanks again Tom, you’re a champ!

And thanks to all who are trying to assist me with this…I appreciate your time, efforts and knowledge.

I pulled the SD card from my 1090 RPi, and attempted to make the suggested changes, and it didn’t go well. More red flags than a CCP parade.

But, after a few minutes, I think I’ve got it all back in it’s original configuration, and wonder if it might be best, now that my setting is ‘static’, leave my FA IP as .191 and FR24 and adsbx will work out that change?

I did modify the IP of my UAT RPi to .110, and that seems to have me sharing 978 data again. (But that RPi isn’t set to 'static IP yet)

Jay

1 Like

If you have a static ip now then you could leave it as it is indeed. For the sites like fr24 or adsbexchange it doesn’t really matter what the ip address is, it is you sharing key that identifies the site.

2 Likes

A word of caution. You have set your IP address to be static but it appears that it is within the DHCP range that is being issued by your router. You will need to exclude the address from your router’s DHCP pool otherwise there is a danger that if you add any other device to your network that uses DHCP it could be issued the address of your pi and hence you will have a duplicate address.

1 Like

LH,

Thanks for that bit of knowledge!!

I’m using T-Mobile At Home 5G, and while it’s a great connection for my rural area, the router is like Fort Knox…can’t crack it, can’t do nuthin’ with it!

Jay

Oh dear, I think that the inability to configure your DHCP might cause
problems in the long run.
If you can find out what the DHCP pool is (I couldn’t on a quick search)
you may be better off changing your static address to one that is
outside the pool.

1 Like

It’s unlikely that he has anywhere near 100 devices on the network.

Thus i would assume using .10 to .30 for static ip adresses should be fairly safe.

1 Like

I use DHCP reservations for static IP addresses rather than using a “hard” address. If one is using a notebook or other portable device, DHCP still works when away from one’s home network.

1 Like

I would have thought so too but the .197 and .191 addresses were both previously allocated by DHCP, if I understand correctly, so I wonder where the pool is?

1 Like

I agree for a portable device, for a Pi a static IP address on the device itself would be fine in my network. You usually don’t travel with them ( but someone else could do so :blush:)

1 Like

@wiedehopf Default pool is probably .2 through .254

@tomvdhorst I agree, however I frequently take a Pi with me when away from home more than a day.

Edit
T-Mobile support that indicated that the DHCP pool is 192.168.12.101 thru 192.168.12.254,

1 Like

That’s the way I do it too. Unfortunately the T-Mobile At Home 5G router that @Jsbird69 has, does not allow you to set a reservation or have any control over DHCP at all.

1 Like

Why would it assign addresses like 191 / 197 then?

I guess to make an educated guess the pool you’d need to scan the network for which IP adresses are dished out by the DHCP.
Or do a lot of DHCP requests with a changing faked MAC addresses :slight_smile:

Edit: Anecdotal that some routers start their default DHCP range at 100:
https://community.t-mobile.com/gateways-and-devices-37/how-may-i-access-the-dhcp-settings-want-to-make-printer-a-fixed-ip-42695

When you see addresses like 191 assigned by DHCP, it’s not a bad guess that below 100 is not used by the DHCP server.
It’s certainly better using a sub 100 IP than using one of the addresses you KNOW has been assigned by the DHCP server.

3 Likes