|
|
#1 |
|
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Apr 2022
Device: PW6
|
To transfer files to my kindle when I'm not at home, what I do is first start a WiFi hotspot on my Android phone. Then connect the Kindle to the corresponding WiFi. This way the Kindle and the Android are on the same local network. I can now ssh into the kindle.
The problem is assigned network changes every time. And now I can't have a convenient stfp bookmark in my file manager app to transfer files. I have to look up the IP address in the kindle and then change the bookmark accordingly. Example of assigned IP: 10.171.131.210 or 10.69.217.210 How would I go about assigning static LAN IP address to my kindle when connecting? |
|
|
|
|
|
#2 |
|
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Apr 2022
Device: PW6
|
Welp, found the solution: https://www.mobileread.com/forums/sh...05&postcount=4
Click on the "Other..." in the wifi connection list. It has the option of static IP. It was drowned in the list of wifi connections. |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Apr 2022
Device: PW6
|
Welp again, seems like it was NOT the solution.
(I don't know much about networking.) The problem is the router/gateway of the android hotspot is not fixed. It randomly chooses a /24 subnet from the 10.x.x.x private range. So you can't fill the IP address, router box. (they will change). It at least changes after restarting the phone. for example this: 39: wlan2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 3000 link/ether 9a:6e:91:dd:3d:40 brd ff:ff:ff:ff:ff:ff inet 10.69.217.162/24 brd 10.69.217.255 scope global wlan2 changes to this after a restart: 29: wlan2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 3000 link/ether b2:09:7f:bb:64:ce brd ff:ff:ff:ff:ff:ff inet 10.136.103.178/24 brd 10.136.103.255 scope global wlan2 valid_lft forever preferred_lft forever Last edited by killerbug; 07-18-2025 at 07:22 PM. |
|
|
|
|
|
#4 | |
|
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 421
Karma: 4500000
Join Date: Nov 2015
Device: none
|
Quote:
|
|
|
|
|
|
|
#5 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 53,464
Karma: 181843001
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
One friend of mine once spent way too many hours trying to figure out how to have an Android phone do address reservations. Basically, what they came up with is that is not a supported function.
|
|
|
|
| Advert | |
|
|
|
|
#6 | |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 938
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
|
Quote:
Dave |
|
|
|
|
|
|
#7 |
|
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Apr 2022
Device: PW6
|
Last year I spent some time looking into assigning static IP for my kindle on android's hotspot. I couldn't get it to work properly, short of building my own android. I am not familiar with patching stuff on android.
I was met with some success using https://github.com/Mygod/VPNHotspot (root required), but it was quite a flaky solution. I don't remember exactly what went wrong but I uninstalled it. I've found a solution now, so I'm leaving it here for posterity. The problem was that I had to manually update Kindle's IP bookmark in my preferred file manager on android (FX) after every android reboot. Previously I thought of having the Android assign a static IP, which didn't work out. Now the solution I've settled on is in the other direction: update the file manager's bookmark automatically when the IP has changed (only needed to be done once after reboot). It will require root access. Here's the script I'm using: Code:
#!/system/bin/sh
###############################################################################
# Configuration
###############################################################################
# FX database
DB="/data/user/0/nextapp.fx/databases/Net.db"
# Bookmark ↔ Wi-Fi MAC mappings
# Format:
# update_bookmark "<bookmark name>" "<wifi mac>"
#
# Add more lines here if needed.
BOOKMARKS="
pw6 <YOUR KINDLE'S MAC ADDRESS>
pw6-sub <REDACTED>
"
###############################################################################
# Logging
###############################################################################
LOGFILE=/data/local/tmp/fx-kindle.log
# Clear log every boot
: > "$LOGFILE"
exec >>"$LOGFILE" 2>&1
echo "================================================"
echo "Started: $(date)"
echo "PID=$$"
echo "UID=$(id)"
echo
###############################################################################
# Tools
###############################################################################
IP=/system/bin/ip
AWK=/system/bin/awk
SQLITE=/system/bin/sqlite3
LOGGER=/system/bin/log
###############################################################################
# Update one bookmark
###############################################################################
update_bookmark() {
NAME="$1"
MAC="$2"
echo "--- $NAME ($MAC) ---"
if [ ! -f "$DB" ]; then
echo "Net.db not found"
return 1
fi
NEWIP=$($AWK -v mac="$MAC" '
BEGIN { IGNORECASE=1 }
$4 == mac { print $1; exit }
' /proc/net/arp)
if [ -z "$NEWIP" ]; then
echo "Device not present"
return 1
fi
CURIP=$($SQLITE "$DB" \
"SELECT host FROM host WHERE display_name='$NAME';")
echo "Current=$CURIP New=$NEWIP"
if [ "$CURIP" = "$NEWIP" ]; then
echo "Already correct"
return 0
fi
$SQLITE "$DB" \
"UPDATE host SET host='$NEWIP' WHERE display_name='$NAME';"
VERIFY=$($SQLITE "$DB" \
"SELECT host FROM host WHERE display_name='$NAME';")
if [ "$VERIFY" != "$NEWIP" ]; then
echo "Verification failed"
return 1
fi
echo "Updated successfully"
$LOGGER -t fx-kindle "Updated $NAME -> $NEWIP"
return 0
}
###############################################################################
# Update all bookmarks
###############################################################################
update_all() {
ALL_DONE=1
echo
echo "Checking bookmarks..."
echo "$BOOKMARKS" | while read NAME MAC
do
[ -z "$NAME" ] && continue
if ! update_bookmark "$NAME" "$MAC"; then
ALL_DONE=0
fi
done
# while runs in a subshell, so recompute outside
for ENTRY in $BOOKMARKS
do
:
done
# Return success only if every configured MAC currently exists
while read NAME MAC
do
[ -z "$NAME" ] && continue
NEWIP=$($AWK -v mac="$MAC" '
BEGIN { IGNORECASE=1 }
$4 == mac { found=1 }
END { exit !found }
' /proc/net/arp)
[ $? -ne 0 ] && return 1
done <<EOF
$BOOKMARKS
EOF
return 0
}
###############################################################################
# Main
###############################################################################
echo "Initial attempt..."
if update_all; then
echo
echo "All bookmarks updated."
exit 0
fi
echo
echo "Waiting for neighbour events..."
$IP monitor neigh | while IFS= read -r EVENT
do
echo
echo "EVENT: $EVENT"
if update_all; then
echo
echo "All bookmarks updated."
exit 0
fi
done
This script uses ip monitor neigh to wait for network changes and when network changes occurs compares the device MAC to our Kindle's MAC. If it matches, then update the file manager's bookmark with the device IP and exits. This is not polling based but event based, and stops after updating bookmark. So it has negligible cpu/memory usage. Not as universal as static IP for a solution but solves the problem. |
|
|
|
|
|
#8 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,353
Karma: 153744555
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
There is a solution that's so very simple. You're running around in circles trying to do what's so very very simple.
In my router under Advanced is Lan Setup. Under that is Device Setup. You put in the MAC address and the address you want it to be and that's it done. It's that easy. You're router may be different, but you should have the same function to assign an internal IP to a given MAC address, |
|
|
|
|
|
#9 |
|
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Apr 2022
Device: PW6
|
Read the first post again.
There's no router. Only two devices: Android and Kindle. We connect our Kindle to Android's hotspot. So Android acts as a router and assigns IP address to devices connected to it's wifi hotspot. On Android things aren't that easy to set up as you have described for a real router, even with root access. My previous post already outlines a solution. |
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Troubleshooting Kindle not connecting to new LAN | n0toriety | Amazon Kindle | 3 | 01-07-2025 04:26 AM |
| Is there anyway to set a static IP address on the Kobo Wifi? | saladasalad | Kobo Reader | 3 | 07-11-2012 07:22 AM |
| Content Download a static website to the kindle? | scotter | Amazon Kindle | 1 | 03-07-2011 06:52 PM |
| Free Book (Kindle) - The Static of the Spheres | koland | Deals and Resources (No Self-Promotion or Affiliate Links) | 3 | 06-21-2010 06:24 AM |
| How does Calibre assign 'Book' vs. 'Personal Doc' for Kindle? | thorn | Calibre | 1 | 02-04-2010 07:09 AM |