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-28-2012, 07:11 AM   #1
pepijndevos
Connoisseur
pepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 71
Karma: 23166
Join Date: Sep 2012
Device: Kindle 4NT
Serial cable for FT232RL <-> Kindle 4

In order to get USB OTG support on my Kindle, I had the debug the kernel and attach a serial circuit.

I used this Sparkfun breakout based on the excellent FT232RL chip.

What is great about this chip is that it has a VCIO pin on which you can supply any voltage you need. I combined this with a simple voltage divider for 1.65v.



This works great for reading kernel output, but sending data only works when the Kindle is plugged in to USB.

I'm not sure if this is related to speed or voltage. I admit my voltage/current might be on the low side with two 10k resistors.

When sending data while not on USB, I observe the following transmission:

Code:
pressed: g(1100111)
received: G(1000111)/g(1100111)
pressed: o(1101111)
received: o(1101111)/O(1001111)
pressed: s(1110011)
received: o(1110011)/c(1100011)
pressed: t(1110100)
received: t(1110100)/p(1110000)
pressed: p(1110000)
received: p(1110000)/`(1100000)
A couple of other characters degrade to `, while a newline seems to degrade to a tab or carriage return and backspace has no visible effect.

Again, when the Kindle is connected to USB it works fine.

Blogpost: http://pepijndevos.nl/2012/10/26/spa...to-serial.html
pepijndevos is offline   Reply With Quote
Old 10-28-2012, 08:39 AM   #2
qlob
Official Lurker
qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.qlob ought to be getting tired of karma fortunes by now.
 
qlob's Avatar
 
Posts: 1,050
Karma: 7096675
Join Date: Apr 2012
Device: Kindle 3.4
Doesnt the Kindle need 1.8volts?
qlob is offline   Reply With Quote
Old 10-28-2012, 08:57 AM   #3
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by pepijndevos View Post
In order to get USB OTG support on my Kindle, I had the debug the kernel and attach a serial circuit.

I used this Sparkfun breakout based on the excellent FT232RL chip.

What is great about this chip is that it has a VCIO pin on which you can supply any voltage you need. I combined this with a simple voltage divider for 1.65v.

...

This works great for reading kernel output, but sending data only works when the Kindle is plugged in to USB.

I'm not sure if this is related to speed or voltage. I admit my voltage/current might be on the low side with two 10k resistors.

...

Again, when the Kindle is connected to USB it works fine.

Blogpost: http://pepijndevos.nl/2012/10/26/spa...to-serial.html
We have seen this behavior before. Yifanlu reported it, and I have seen it on my K4 and K5 with serial ports. It appears that the supposed GND pin on the serial port is not effective. We noticed that serial I/O works reliably when the USB cable is also attached, to provide an alternate ground path back to the host PC.

It also works if you get your ground from a known good internal ground, such as a metallic shield cover, instead of from the serial I/O pad or connector. This information has been posted to this forum multiple times in the past.

Of course, using a 1.8v reference voltage as qlob suggested is also a good idea.

EDIT: I use part of the circuit posted here (the top part with R1 and D1) on my kindles:
https://www.mobileread.com/forums/sho....php?p=1903472

I also had to remove an LED on my 3.3v USB serial adapter that was supplying too much current for the kindle to sink to a logic zero. I replace the LED with the 22K resistor shown in the circuit at the post linked above. That allows me to use a 3.3v adapter just fine on my K4 and K5. I actually soldered the resistor and diode inside one of my kindles, so that kindle now supports 1.8v to 5v TTL serial.

Last edited by geekmaster; 10-28-2012 at 09:11 AM.
geekmaster is offline   Reply With Quote
Old 10-28-2012, 09:04 AM   #4
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by pepijndevos View Post
In order to get USB OTG support on my Kindle, I had the debug the kernel and attach a serial circuit.

I used this Sparkfun breakout based on the excellent FT232RL chip.

What is great about this chip is that it has a VCIO pin on which you can supply any voltage you need. I combined this with a simple voltage divider for 1.65v.



This works great for reading kernel output, but sending data only works when the Kindle is plugged in to USB.

I'm not sure if this is related to speed or voltage. I admit my voltage/current might be on the low side with two 10k resistors.

When sending data while not on USB, I observe the following transmission:

Code:
pressed: g(1100111)
received: G(1000111)/g(1100111)
pressed: o(1101111)
received: o(1101111)/O(1001111)
pressed: s(1110011)
received: o(1110011)/c(1100011)
pressed: t(1110100)
received: t(1110100)/p(1110000)
pressed: p(1110000)
received: p(1110000)/`(1100000)
A couple of other characters degrade to `, while a newline seems to degrade to a tab or carriage return and backspace has no visible effect.

Again, when the Kindle is connected to USB it works fine.

Blogpost: http://pepijndevos.nl/2012/10/26/spa...to-serial.html
Sounds like a floating ground.
Check (again) where you have connected the adapter board ground to the Kindle ground plane (the black lead connection point to your voltage divider board).

Also, check that connection point where you are picking up the 3.3v at, be sure that is the output pin of the FR232's 3.3 volt regulator (pin 17).

I don't see (at only a quick glance) the current requirement of VCCIO, but it should be low. Low enough so that the 20K divider should provide enough current.
BUT the data sheet says that 1.8v is the minimum input for that sense lead.

So, as qlob says, change your divider -
Both the FT232 and the Kindle's SoC are designed to work with 1.8v logic levels.
knc1 is offline   Reply With Quote
Old 10-28-2012, 09:13 AM   #5
pepijndevos
Connoisseur
pepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 71
Karma: 23166
Join Date: Sep 2012
Device: Kindle 4NT
Ah, great! I did read that someone thought the K3 ground was not a ground but a flow control.

The K4 serial ground is clearly connected to the ground "trace" that covers large areas of the board. So what is a "good" ground?

By shield cover, do you mean the metal boxes coving some components? There is one close to the serial port, but it seems to be connected to the same ground.
Attached Thumbnails
Click image for larger version

Name:	DSCN1879 copy.jpg
Views:	273
Size:	26.6 KB
ID:	95075  
pepijndevos is offline   Reply With Quote
Old 10-28-2012, 09:22 AM   #6
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by pepijndevos View Post
Ah, great! I did read that someone thought the K3 ground was not a ground but a flow control.

The K4 serial ground is clearly connected to the ground "trace" that covers large areas of the board. So what is a "good" ground?

By shield cover, do you mean the metal boxes coving some components? There is one close to the serial port, but it seems to be connected to the same ground.
Yes, the metal boxes that cover some components are covers that shield components from radiating or receiving EMF interference (i.e. Faraday Sheild or Faraday Cage). They are connected to ground. The USB cable sheild is also grounded, and if connected to a host PC provides an acceptable alternate ground path. That is why the circuit in the first post was reported to work when the USB cable was connected.
geekmaster is offline   Reply With Quote
Old 10-28-2012, 09:56 AM   #7
pepijndevos
Connoisseur
pepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 71
Karma: 23166
Join Date: Sep 2012
Device: Kindle 4NT
New ground connection resolved the problem
pepijndevos is offline   Reply With Quote
Old 10-28-2012, 10:02 AM   #8
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by pepijndevos View Post
New ground connection resolved the problem
Your welcome.
knc1 is offline   Reply With Quote
Old 10-28-2012, 10:32 AM   #9
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by geekmaster View Post

I also had to remove an LED on my 3.3v USB serial adapter that was supplying too much current for the kindle to sink to a logic zero. I replace the LED with the 22K resistor shown in the circuit at the post linked above. That allows me to use a 3.3v adapter just fine on my K4 and K5. I actually soldered the resistor and diode inside one of my kindles, so that kindle now supports 1.8v to 5v TTL serial.
The Tx and Rx leds of this adapter board are driven by dedicated output pins of the FT232, not by a "parasitic" connection to the signal leads.

The chip on this board is the same one inside of the cable that I recommend.
knc1 is offline   Reply With Quote
Old 10-28-2012, 10:41 AM   #10
pepijndevos
Connoisseur
pepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austenpepijndevos has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 71
Karma: 23166
Join Date: Sep 2012
Device: Kindle 4NT
Thanks

Source about the LEDs: https://www.sparkfun.com/products/71...395f850e000000

Fact is, I measured 2.7v on VCIO with my voltage divider and the LEDs still attached. I removed the completely.
pepijndevos 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
Kindle DX-G serial console ebs Kindle Developer's Corner 53 12-03-2018 12:04 PM
lv Serial Cable knc1 Kindle Developer's Corner 66 11-02-2012 06:54 PM
Are you trying a Kindle Serial? tomsem Amazon Kindle 5 10-10-2012 11:37 PM
Kindle 3 serial cable Frenko Kindle Developer's Corner 8 11-08-2011 09:07 AM
Kindle 3 serial numbers Tiersten Amazon Kindle 0 09-05-2010 10:01 AM


All times are GMT -4. The time now is 10:22 PM.


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