Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-26-2021, 07:16 AM   #1
CubeBag
Junior Member
CubeBag began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2021
Device: Kindle 4 NT
Question Problem with Kindle 4 UsbNetwork on Raspberry Pi Zero

Hi! I was able to connect my Kindle 4 to my Mac over usbnetwork with the provided instructions (using host IP 192.168.15.201 and kindle IP 192.168.15.244) pretty easily, but when I attempt to do the same thing on my Raspberry Pi Zero on Linux, I'm running into "No route to host" while attempting to ssh.

This is the full output when I run relevant commands:

Code:
pi@raspberrypi:~ $ sudo ifconfig usb0 192.168.15.201
pi@raspberrypi:~ $ sudo ifconfig usb0
usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.15.201  netmask 255.255.255.0  broadcast 192.168.15.255
        ether a2:da:5f:04:7f:64  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
pi@raspberrypi:~ $ ssh root@192.168.15.244
ssh: connect to host 192.168.15.244 port 22: No route to host
pi@raspberrypi:~ $ ping 192.168.15.244
PING 192.168.15.244 (192.168.15.244) 56(84) bytes of data.
From 192.168.15.201 icmp_seq=1 Destination Host Unreachable
From 192.168.15.201 icmp_seq=2 Destination Host Unreachable
From 192.168.15.201 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.15.244 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 134ms
pipe 4
pi@raspberrypi:~ $ lsusb
Bus 001 Device 002: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Originally I had an issue where usb0 did not show up in ifconfig at all. It appears I solved the issue by editing config.txt and cmdline.txt as detailed in this Adafruit article.

I found a much earlier thread in MobileRead's forums that seems to cover a very similar problem: https://www.mobileread.com/forums/sh...d.php?t=222133
I used it as a reference while troubleshooting. However, I don't have network-manager installed, and my "ip route show" output looks a little different:

Code:
default via 10.0.1.1 dev wlan0 proto dhcp src 10.0.1.208 metric 304 
10.0.1.0/24 dev wlan0 proto dhcp scope link src 10.0.1.208 metric 304 
169.254.0.0/16 dev usb1 scope link src 169.254.96.198 metric 205 
192.168.15.0/24 dev usb0 proto kernel scope link src 192.168.15.201 linkdown
I think the difference that stands out the most is the "linkdown" at the end of the final line, but I'm not sure. Also, there is both a usb0 and a usb1 even though the Pi Zero only has one usb port. I'm not too sure why.

How should I proceed with the problem?
CubeBag is offline   Reply With Quote
Old 06-26-2021, 01:15 PM   #2
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,323
Karma: 98809518
Join Date: Apr 2011
Device: pb360
How do you know a network manager is not installed on the raspberry pi?

On the raspberry pi do
Code:
sudo dmesg -H | tail -22 > before.txt
before connecting your kindle to the raspberry pi. Then after connecting do
Code:
sudo dmesg -H | tail -22 > after.txt
Then post before.txt and after.txt here. That will give some clues as to what is going on.
j.p.s is online now   Reply With Quote
Advert
Old 06-26-2021, 04:54 PM   #3
CubeBag
Junior Member
CubeBag began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2021
Device: Kindle 4 NT
Here are my before.txt and after.txt.
Attached Files
File Type: txt before.txt (1.4 KB, 108 views)
File Type: txt after.txt (1.5 KB, 94 views)
CubeBag is offline   Reply With Quote
Old 06-26-2021, 06:39 PM   #4
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,323
Karma: 98809518
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by CubeBag View Post
Here are my before.txt and after.txt.
Thanks. Your raspberry pi is seeing your kindle on the pi's usb1. usb0 may be something else or you have convinced the pi it is taken and your kindle gets assigned to usb1.

sudo dmesg -H | grep usb | more
might give clues on what usb0 is.

I would try
sudo ifdown usb0
sudo ifconfig usb1 192.168.15.201
ping 192.168.15.244

If that works, then you are on your way to getting back on track.

You might consider switching to the new naming convention. It is super arcane, but it guarantees device names across boots unplugging, replugging, and changing to different ports. I recently did a fresh OS install at work and my ethernet went from eth0 to eno1 and my beaglebone connected over usbnet went from usb0 to enxc8a030b52f96.

Last edited by j.p.s; 06-26-2021 at 06:41 PM.
j.p.s is online now   Reply With Quote
Old 06-26-2021, 09:09 PM   #5
CubeBag
Junior Member
CubeBag began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2021
Device: Kindle 4 NT
Unfortunately, that didn't seem to work either. It does look like the Kindle is on usb1, but the ping still did not go through.
I tried rebooting the Pi, and then when I plugged the kindle in, "sudo dmesg -H" said something peculiar at the end:
Code:
[Jun26 20:41] usb usb1-port1: disabled by hub (EMI?), re-enabling...
[  +0.000061] usb 1-1: USB disconnect, device number 2
[  +0.007791] cdc_subset 1-1:1.1 usb1: unregister 'cdc_subset' usb-20980000.usb-1, Linux Device
[  +1.531992] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[  +1.310018] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[  +0.000166] usb usb1-port1: attempt power cycle
At this stage, trying to ifconfig usb1 returned
Code:
SIOCSIFADDR: No such device
usb1: ERROR while getting interface flags: No such device
and pinging it on usb0 didn't work either. I tried a couple of other cables too and nothing worked, and neither did rebooting the Kindle.
However, I rebooted the Pi once more and things are behaving differently:
Code:
[Jun26 20:54] usb 1-1: new high-speed USB device number 2 using dwc2
[  +0.265112] usb 1-1: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 3.25
[  +0.000046] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  +0.000022] usb 1-1: Product: RNDIS/Ethernet Gadget
[  +0.000021] usb 1-1: Manufacturer: Linux 2.6.31-rt11-lab126 with fsl-usb2-udc
[  +0.255479] cdc_ether 1-1:1.0 usb1: register 'cdc_ether' at usb-20980000.usb-1, CDC Ethernet Device, ee:49:00:00:00:00
[  +0.001743] usbcore: registered new interface driver cdc_ether
[  +0.012911] usbcore: registered new interface driver cdc_subset
[  +0.855560] IPv6: ADDRCONF(NETDEV_CHANGE): usb1: link becomes ready
Now, when I try to ssh into the Kindle (on usb1) instead of throwing "No route to host" it just hangs with no output and without returning to shell until I break. Ping won't show "Destination Host Unreachable" but it's not receiving any packets either.
Code:
PING 192.168.15.244 (192.168.15.244) 56(84) bytes of data.

--- 192.168.15.244 ping statistics ---
51 packets transmitted, 0 received, 100% packet loss, time 1041ms
I wonder why it's acting so inconsistent now...?
CubeBag is offline   Reply With Quote
Advert
Old 06-26-2021, 09:54 PM   #6
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,323
Karma: 98809518
Join Date: Apr 2011
Device: pb360
KUAL has a USBNetwork button.
Tap that, then tap the USBNetwork Status button in the menu that comes up.
That will print a couple of likes at the bottom of the screen.
What does that say?

Also, did you check on ifconfig after you rebooted the pi?
j.p.s is online now   Reply With Quote
Old 06-27-2021, 03:10 AM   #7
CubeBag
Junior Member
CubeBag began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2021
Device: Kindle 4 NT
On reboot, ifconfig shows only usb0, but when I then connect the tablet and rerun ifconfig then both usb0 and usb1 appear. On a whim, since ifconfig was showing an ipv6 address for usb1, I disabled ipv6 for both usb0 and usb1 by doing "sudo sysctl -w net.ipv6.conf.usb0.disable_ipv6=1" and then the same command for usb1. It made the ipv6 address disappear but ssh still hangs.

Also, the status button in KUAL outputs only one line:
Code:
N * USBNetwork: enabled (usbnet, sshd up) *
I tried enabling verbose mode and still only that line shows up.
CubeBag is offline   Reply With Quote
Old 06-27-2021, 01:12 PM   #8
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,323
Karma: 98809518
Join Date: Apr 2011
Device: pb360
I think I know what the problem is.

That Adafruit article is for changing the USB port on your pi from a USB host port to an USB gadget. That would allow connecting the pi to your mac over USB. To get your pi working with your kindle you are going to have to undo the changes you made to config.txt and cmdline.txt then continue debugging your original problem.
j.p.s is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Wifi on Raspberry Pi apexskier Kindle Developer's Corner 12 05-17-2015 03:06 PM
USBNetwork Problem volkaoth Kindle Developer's Corner 2 01-26-2015 08:14 AM
Kindle Touch & Raspberry Pi alip Kindle Developer's Corner 4 06-17-2013 03:38 PM
KindleBerry Pi, raspberry pi with a kindle screen! damaru Kindle Developer's Corner 39 01-20-2013 10:59 PM
Hacks Usbnetwork problem after updating to 2.5.2 zzw007008 Amazon Kindle 4 06-24-2010 08:50 PM


All times are GMT -4. The time now is 05:35 PM.


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