Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static IP address #1

Open
emefbiemef opened this issue May 31, 2018 · 8 comments
Open

Static IP address #1

emefbiemef opened this issue May 31, 2018 · 8 comments

Comments

@emefbiemef
Copy link

Is there a file to modify for specifying static IP address parameters?

@zecoj
Copy link
Owner

zecoj commented May 31, 2018

Not at the moment. You can use "reserved DHCP" from your DHCP server or play around with ifconfig (refer samtap/fang-hacks#86)

@emefbiemef
Copy link
Author

I have done it before by modifying the "01-network" script in fanghacks, so how do I do the same in this fork? Is the file located on internal flash?

@zecoj
Copy link
Owner

zecoj commented May 31, 2018

Have a look at /etc/rtsp/my.rc.local.

You can try comment out line 15
udhcpc -i wlan0 -p /var/run/udhcpc.pid -b &
and replace with the ifconfig command.

If it works, I'll implement static IP in the future.

@emefbiemef
Copy link
Author

emefbiemef commented May 31, 2018

I'm replacing that line with these:

ifconfig wlan0 10.1.7.78 netmask 255.255.255.0 broadcast 10.1.7.255 2>&1
echo "nameserver 10.1.7.1" > /etc/resolv.conf 2>&1
route add default gw 10.1.7.1 wlan0 2>&1

These lines work in fanghacks. Will it cause any problem in this fork?

@zecoj
Copy link
Owner

zecoj commented May 31, 2018

Looks OK to me. If it failed, you can always re-apply this hack using Chuck Norris mode.

@emefbiemef
Copy link
Author

emefbiemef commented May 31, 2018

Yep, it works. Wow.

Maybe you can implement it in such a way that doesn't require re-addition of my.rc.local into files.tar everytime we change the IP address parameters?

@zecoj
Copy link
Owner

zecoj commented May 31, 2018

Yes, that's the plan.

@emefbiemef
Copy link
Author

emefbiemef commented May 31, 2018

One note though, it didn't work the first time using the method in "Updating SSID/PSK/etc" (even after rebooting multiple times).
I then enabled Chuck Norris Mode and it worked after reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants