Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-25-2010, 06:53 PM   #16
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 5,241
Karma: 5164853
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O
Cf. http://www.mobileread.com/forums/sho...1&postcount=11

And maybe ~reloadContentRoster too.

Last edited by NiLuJe; 10-25-2010 at 08:08 PM.
NiLuJe is offline   Reply With Quote
Old 10-25-2010, 07:12 PM   #17
badbob001
Evangelist
badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.
 
badbob001's Avatar
 
Posts: 447
Karma: 1042602
Join Date: Sep 2009
Device: Kindle 3 (US 3G)
Quote:
Originally Posted by coolbird View Post
After copying the ebook(s) through sftp to kindle 3, how to get the new books to show up? seems like the only way I can get them to show up is to reboot the kindle, which really defeats the purpose of this wifi sftp transfer thingy.
Does Alt-Z help?

Update: nope, doesn't help. Wasn't Alt-Z suppose to refresh the index of items in the Pictures folder?

Last edited by badbob001; 10-26-2010 at 12:35 AM.
badbob001 is offline   Reply With Quote
Old 10-26-2010, 02:58 AM   #18
Jongwe
Junior Member
Jongwe began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Kindle 3G
Hi,

Thank you badbob001 I have the transfers working well. I was stuck at the authorized_keys and was saving the key into a folder exported from puttygen. Thanks for correcting this as the readme isn't too clear.

:Jono
Jongwe is offline   Reply With Quote
Old 10-28-2010, 01:50 PM   #19
badbob001
Evangelist
badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.
 
badbob001's Avatar
 
Posts: 447
Karma: 1042602
Join Date: Sep 2009
Device: Kindle 3 (US 3G)
Quote:
Originally Posted by NiLuJe View Post
Cf. http://www.mobileread.com/forums/sho...1&postcount=11

And maybe ~reloadContentRoster too.
~reloadContentRoster does not do anything for my on my K3. ;DebugOn was enabled at the time.

Alt-Z does show new content from the Pictures folder but does nothing for documents.

"dbus-send --system /default com.lab126.powerd.resuming int32:1" from shell does refresh the home page to show new documents, though I got duplicates of the new picture folders I got from the Alt-Z. I suggest not using both after uploading mixed content.

NiLuJe, when disconnecting from a sftp connection, is there some process on the Kindle that is aware of this and needs to react, like a clean up process or shutdown sftp process? Perhaps it would be nice to have an option for it to run the dbus-send command after a sftp disconnect.
badbob001 is offline   Reply With Quote
Old 10-28-2010, 08:56 PM   #20
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 5,241
Karma: 5164853
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O
@badbob001: Not sure, you'd have to take a look at dropbear and/or OpenSSH's sftp code.
NiLuJe is offline   Reply With Quote
Old 10-29-2010, 01:44 AM   #21
badbob001
Evangelist
badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.
 
badbob001's Avatar
 
Posts: 447
Karma: 1042602
Join Date: Sep 2009
Device: Kindle 3 (US 3G)
Quote:
Originally Posted by NiLuJe View Post
@badbob001: Not sure, you'd have to take a look at dropbear and/or OpenSSH's sftp code.
That is probably beyond my ability. Perhaps I can try the hotkey app and assign the function to a hotkey.
badbob001 is offline   Reply With Quote
Old 11-01-2010, 07:15 AM   #22
Tvangeste
Enthusiast
Tvangeste began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Sep 2010
Device: Kindle 3 Wi-Fi
Quote:
Originally Posted by badbob001 View Post
That is probably beyond my ability. Perhaps I can try the hotkey app and assign the function to a hotkey.
I use excellent WinSCP program to connect to my Kindle over SSH, it can use keys for authentication, and it also understands the SSH agent as well.

Also, there is a very neat option to put any ssh command on the toolbar, so I added "Refresh Kindle" button there, that invokes that dbus command.

So, once I upload my books to Kindle, then I just need to click that "Refresh Kindle" button, and that's it.
Tvangeste is offline   Reply With Quote
Old 11-04-2010, 01:30 PM   #23
badbob001
Evangelist
badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.
 
badbob001's Avatar
 
Posts: 447
Karma: 1042602
Join Date: Sep 2009
Device: Kindle 3 (US 3G)
Quote:
Originally Posted by Tvangeste View Post
I use excellent WinSCP program to connect to my Kindle over SSH, it can use keys for authentication, and it also understands the SSH agent as well.

Also, there is a very neat option to put any ssh command on the toolbar, so I added "Refresh Kindle" button there, that invokes that dbus command.

So, once I upload my books to Kindle, then I just need to click that "Refresh Kindle" button, and that's it.
Thanks for the tip! The Filezilla client currently doesn't support custom commands to be sent over the SFTP protocol, so I may need to try WinSCP.
badbob001 is offline   Reply With Quote
Old 11-12-2010, 02:46 PM   #24
gemjuno
Junior Member
gemjuno began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2010
Device: Kindle 3
Quote:
Originally Posted by badbob001 View Post
Complete beginning to end instructions for usbnet are not available and one has to piece the needed steps from documentation and forum posts and mix in some experimentation. Not sure why it's not as well supported as the other hacks as this doesn't seem 'more linux' than usual. But here is how I got ssh over wifi working with auth keys in a Windows environment:
  1. Install usbnet hack.
  2. Mount kindle and edit file \usbnet\etc\config
    K3_WIFI="true"
    K3_WIFI_SSHD_ONLY="true"
  3. Download and run puttygen: http://www.chiark.greenend.org.uk/~s.../download.html
  4. With (x) SSH-2 RSA selected, click Generate.
  5. Copy the text under 'Public key for pasting into OpenSSH authorized_keys file'.
    Do not be tricked by: Conversions > Export OpenSSH Key.
  6. Paste into a new file named authorized_keys.
    I previously thought authorized_keys was a folder to be created and placed my key file under that... wrong!
  7. If you plan to use the filezilla client for sftp, do not enter a key passphrase as that is not supported. Click Save Private Key to the local PC.
  8. Copy file authorized_keys to \usbnet\etc\
  9. Unmount kindle.
  10. Turn on WIFI. The kindle should obtain an IP address from your wireless access point. A quick way to find the kindle's IP is to go to Settings and then type 711. On a private WIFI network, set up a DHCP IP reservation so your kindle IP is always the same. Or just change your kindle wifi settings for a static ip address (the usbnet config file can not be used to set the WIFI ip address).
  11. On Kindle, type:
    ;debugOn
    ~usbNetwork
    ;debugOff


To connect with Putty for shell access:
  1. Configure your putty session to connect to the Kindle's IP over SSH. Under Connection > SSH > Auth > Private key file for authentication, choose the private key you saved locally.
  2. Connect to the kindle, enter username root, enter key passphrase if you used one, and you should be in. To save a step, you can set Connection > Data > Auto-login username: root.
  3. As you can tell from the login banner, if you need to change anything that is not in /mnt/us, then you will need to first mount the filesystem as RW (readwrite):
    mntroot rw
    Once you're done, you should put the filesystem back to RO (readonly):
    mntroot ro

To connect with Filezilla client to transfer files:
  1. Edit > Settings > Connection > SFTP > Add keyfile, choose the private key you saved locally.
  2. Create a new connection entry with server type: SFTP, Logon Type: normal, User: root, and blank password.
  3. You can save some time by setting your Default Remote Directory to: /mnt/us to match the directory you see when mounting over usb.
  4. Unfortunately, filezilla doesn't support sending custom commands over sftp, which makes using it annoying. See WinSCP below for a better alternative.

To connect with WinSCP client to transfer files:
  1. Create a new session filling in fields for 'Host name', User name (root), and Private Key File (WinSCP does not support private key passphrases).
  2. To add a custom command for refreshing the Kindle:
    1. Preferences > Commands > Add...
    2. Description: Refresh Kindle
    3. Custom Command: dbus-send --system /default com.lab126.powerd.resuming int32:1
    4. (x) Remote command
    5. Select a Keyboard Shortcut if you like.
    To invoke the command, either Files > Custom Commands > Refresh Kindle
    or Options > Toolbars > Custom Command Buttons or use the keyboard shortcut if defined.

Note that if you reboot your Kindle, the hack is disabled and you have to run the following commands again:
;debugOn
~usbNetwork
;debugOff

Alternatively, to have usbnet be enabled after a reboot, simply rename \usbnet\DISABLED_auto to auto and reboot.

Since you're using SSH over wifi instead of over usb, a setting of 'auto' is not so dangerous since you can still mount the kindle over usb to fix something. People using networking over usb can run into an issue where they change something on the kindle that prevents them from connecting over SSH, but since they have auto enabled, they can't mount the kindle to fix it.

FYI: if you keep the Kindle on usb (unmounted or charger), then the WIFI will stand on even when the screensaver kicks in.
I've tried this tutorial on my kindle with usbnetwork-0.28. It successfully connects with rndis adapter via usb and I was able to putty as well as filezilla into kindle with sshkey. However when I try to connect with wifi it fails to connect. I changed IPs in config file to match my network and I could only ping it. Both putty and filezilla can't access over wifi. Am I missing something here?

regards
gemjuno is offline   Reply With Quote
Old 11-12-2010, 02:58 PM   #25
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 5,241
Karma: 5164853
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O
@gemjuno: By 'fail to connect' you mean 'fail to auth' or 'timeout'?

If it's a timeout, you probably got the wrong *wireless* IP address, and it's your wireless router that chooses which IP to give the Kindle, the IP config in the hack is for the USB network interface, not wifi.
NiLuJe is offline   Reply With Quote
Old 11-12-2010, 03:10 PM   #26
gemjuno
Junior Member
gemjuno began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2010
Device: Kindle 3
@NiLuJe
It was timeout. My router leases 192.168.27.x addresses. Currently my computer has .2 and kindle has .10 so I set HOST_IP=192.168.27.2 ,KINDLE_IP=192.168.27.10

Do you mean I don't have to change IPs in config file and leave as default 2.1 and 2.2 addresses? I'm confused now.
gemjuno is offline   Reply With Quote
Old 11-12-2010, 03:23 PM   #27
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 5,241
Karma: 5164853
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O
@gemjuno: I meant that the HOST_IP / KINDLE_IP config will only apply to the *USB* network interface.

On the WiFi front, if you want to make sure your Kindle always gets leased the same IP for its *wireless* network interface, you'd have to setup a MAC filter in the DHCP config of your router.

And, FYI, when you're using USB, you're bypassing your router, so you don't even have to be in the same address class at all, much less in the same range. In fact, I'd recommend explicitly getting out of the usual network address range of your network to avoid IP conflicts, so, yeah, you could use the default.

Last edited by NiLuJe; 11-12-2010 at 04:57 PM.
NiLuJe is offline   Reply With Quote
Old 11-12-2010, 03:40 PM   #28
gemjuno
Junior Member
gemjuno began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2010
Device: Kindle 3
@NiLuJe

Thanks for clearing that up. I made changes in router config for static kindle IP but still keep getting connection timed out error with putty and filezilla.
gemjuno is offline   Reply With Quote
Old 11-12-2010, 04:57 PM   #29
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 5,241
Karma: 5164853
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O
@gemjuno: I assume you've set K3_WIFI to true, and that you can ping the Kindle over wifi?
NiLuJe is offline   Reply With Quote
Old 11-13-2010, 11:13 AM   #30
gemjuno
Junior Member
gemjuno began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2010
Device: Kindle 3
@NiLuJe: Yes. I set K3_WIFI true but false to K3sshd because I still can't connect with wifi. I can ping to Kindle with no problem at all.
gemjuno is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh from Kindle 3 aKarma Kindle Developer's Corner 6 09-21-2010 09:59 PM
SSH to Kindle Zorz Kindle Developer's Corner 16 01-15-2010 02:18 AM
ubuntu 9.04 ssh help please lampadena OpenInkpot 9 08-19-2009 12:21 AM
Kindle + SSH? Elegant Forkbomb Amazon Kindle 3 03-05-2009 09:12 AM
iLiad How do I get ssh access to my 2.7.1 iLiad? narve iRex Developer's Corner 3 11-28-2006 06:59 PM


All times are GMT -4. The time now is 10:06 AM.


MobileRead.com is a privately owned, operated and funded community.