android
  #1  
Old 08-30-2012, 12:39 PM
VanniX VanniX is offline
Member
 
Join Date: Nov 2011
Location: Italy - Clowns country
Posts: 120
Default Add external UART port YP-R0

As i wrote in the other post, i already found the UART port on this player, so today i decided to bring the UART outside the player. This is very useful for kernel, mod and rom developement.

I don't re-write the entire tutorial in english (actually is not very useful, because the procedure changes for the components used), but i post the images for a graphical explanation:
http://dl.dropbox.com/u/21543264/IMG...R0_UART_00.jpg
http://dl.dropbox.com/u/21543264/IMG...R0_UART_01.jpg
http://dl.dropbox.com/u/21543264/IMG...R0_UART_02.jpg
http://dl.dropbox.com/u/21543264/IMG...R0_UART_03.jpg
http://dl.dropbox.com/u/21543264/IMG...R0_UART_04.jpg
http://dl.dropbox.com/u/21543264/IMG...R0_UART_05.jpg
http://dl.dropbox.com/u/21543264/IMG...R0_UART_06.jpg
http://dl.dropbox.com/u/21543264/IMG...R0_UART_07.jpg
http://dl.dropbox.com/u/21543264/IMG...R0_UART_08.jpg

At the end if all goes well the result should be similar to the following:
http://dl.dropbox.com/u/21543264/IMG...R0_UART_09.jpg


Complete tutorial (currently only in Italian):
http://www.dronix.org/forum/viewtopi...=22&t=255#p913
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 08-31-2012, 11:02 AM
Lorenz092 Lorenz092 is offline
Member
 
Join Date: Jan 2011
Location: Italy
Posts: 449
Default

Great! Indeed as I've seen before a very clean job

Anyways it should be possible also to get the serial interface from the usb, through the g_serial usb gadget...

Of course this stuff is for professionals only and some users may want an easier interface...
__________________
Check out my modded firmware both for YP-R0 and YP-R1!!!
** DONATE ** -> https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K658CHJKX2X8C
NOTE: if you want to donate for Rockbox itself and not my work, go to their website!!
Reply With Quote

  #3  
Old 08-31-2012, 02:45 PM
VanniX VanniX is offline
Member
 
Join Date: Nov 2011
Location: Italy - Clowns country
Posts: 120
Default

Next step is, as you told, virtualize an UART in usb, like the android debug bridge.
Reply With Quote

  #4  
Old 09-06-2012, 06:01 PM
VanniX VanniX is offline
Member
 
Join Date: Nov 2011
Location: Italy - Clowns country
Posts: 120
Default

I simply compiled all gadget modules (scsi are required for OTG storage) from samsung sources:
Code:
  CC      drivers/scsi/ch.mod.o
  LD [M]  drivers/scsi/ch.ko
  CC      drivers/scsi/scsi_mod.mod.o
  LD [M]  drivers/scsi/scsi_mod.ko
  CC      drivers/scsi/scsi_wait_scan.mod.o
  LD [M]  drivers/scsi/scsi_wait_scan.ko
  CC      drivers/scsi/sd_mod.mod.o
  LD [M]  drivers/scsi/sd_mod.ko
  CC      drivers/scsi/sg.mod.o
  LD [M]  drivers/scsi/sg.ko
  CC      drivers/usb/gadget/arcotg_udc.mod.o
  LD [M]  drivers/usb/gadget/arcotg_udc.ko
  CC      drivers/usb/gadget/g_file_storage.mod.o
  LD [M]  drivers/usb/gadget/g_file_storage.ko
  CC      drivers/usb/gadget/g_midi.mod.o
  LD [M]  drivers/usb/gadget/g_midi.ko
  CC      drivers/usb/gadget/g_serial.mod.o
  LD [M]  drivers/usb/gadget/g_serial.ko
  CC      drivers/usb/gadget/g_zero.mod.o
  LD [M]  drivers/usb/gadget/g_zero.ko
  CC      drivers/usb/gadget/gadgetfs.mod.o
  LD [M]  drivers/usb/gadget/gadgetfs.ko
And then i loaded it without problems:
Code:
modprobe g_serial
Now serial gadget and usb otg hardware basically work, but now we need a good configuration for linux.
In player console when i connect the usb cable it write:
Code:
[  261.130000] gs_disconnect: Gadget Serial disconnected
[  261.240000] gs_setup_complete: status error, status=-108, actual=28, length=28
[  261.250000] gs_disconnect: Gadget Serial disconnected
[  261.380000] gs_setup_complete: status error, status=-108, actual=18, length=18
[  261.390000] gs_setup_complete: status error, status=-108, actual=32, length=32
[  261.400000] gs_setup_complete: status error, status=-108, actual=28, length=28
[  261.410000] gs_setup_complete: status error, status=-108, actual=4, length=4
[  261.410000] gs_set_config: Gadget Serial configured, high speed BULK config
[  261.420000] gs_setup_complete: status error, status=-108, actual=38, length=38
And.. In my thinkpad, with lsusb it shows:
Code:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 0a5c:2110 Broadcom Corp. Bluetooth Controller
Bus 005 Device 003: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 004 Device 008: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x Composite Device
Bus 001 Device 019: ID 0525:a4a6 Netchip Technology, Inc. Linux-USB Serial Gadget
This is your link, but it's useless now...
http://talk.maemo.org/showthread.php?t=23219

Like these other... http://www.mjmwired.net/kernel/Docum...serial.txt#105
http://blog.ringerc.id.au/2011/01/se...serial-on.html
http://www.armadeus.com/wiki/index.p...alk:USB_Gadget


Then i can't go on myself, i need help :P
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 08:51 AM.