It is happened that I needed to obtain UART access on Galaxy S7. I tried Google search, apparently. I have found several threads on XDA dedicated to this question; however, they all are a bit outdated (2012-2013 years), containing information about an old loader.
Moreover, they are describing information in a very limited way, mostly telling the reader only about how to use UART with loader and do not going deeper into details.
Finally, despired to find any valuable piece of information, I performed my own research and here I will structure all the information I gathered and discovered.
To begin with, there is an USB multiplexing unit between USB-connector and USB-controller, aimed to measure the value of resistance between ID and GND, and setup a USB controller mode in dependance of that. That is not a new thing: the same way works, for instance, USB OTG.
But there exist other work modes which are hidden from the normal user. These work modes are utilized by a special device which is used by Samsung engineers. One can order a device like this on Ebay, but I do not se any reason for. Source codes of the mobile phone kernel are available for download and include a multiplexing unit driver.
The S7's MUIC name is MAX77854, which comes with lack of documentation, but we have a driver, which, obviously, has source codes which are available here: drivers/muic/max77854-muic.c. Going through the sources, I found an actual table of the resistance values and work modes for this device:
OTG =*GND
MHL = 1K
VZW_ACC = 28.7K
VZW_INCOMPATIBLE = 34K
RDU_TA = 40.2K
HMT = 49.9K
AUDIODOCK = 64.9K
USB_LANHUB = 80.07K
CHARGING_CABLE = 102K
GAMEPAD = 121K
TYPE1_CHG = 200K
JIG_USB_OFF = 255K
JIG_USB_ON = 301K
DESKDOCK = 365K
TYPE2_CHG = 442K
JIG_UART_OFF = 523K
JIG_UART_ON = 619K
TA = OPEN
USB = OPEN
CDP = OPEN
UNDEFINED_CHARGING =*UNDEFINED
ATTACHED_DEV_NUM = NUM
I have no idea what the listed most modes mean, but I see one very interesting mode JIG_UART_ON, which has been researched a bit and which allowes us to connect a device through USB-UART adapter and get a SBOOT boot log. I was inspired by an article about SBOOT where a guy researched the possibility of hijacking the boot loader and discovered a way how to change boot parameters including kernel boot parameters.
First of all, we need to build a JIG(UART) adapter. For that purpose we need to have any USB-UART adapter (I used FT232) and resistance unit for 619kOm (I have purchased one for 620kOm in the shop next to my house). Then we need to get them together as on the scheme:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The newly created adapter we need to plug in to the computer and wait for a new device name (on my system it set as /dev/ttyUSB0), then connect to this device through a terminal application (I used minicom).
Code:
sudo minicom -D /dev/ttyUSB0
I am not sure what settings will you have for your terminal application, that's why I highly recommend you to set up your port settings and disable the hardware flow control setting. After all things done, you have to plug a mobile phone to this adapter and turn it on using the key combo: Vol-(Volume Down) + Power.
As symbols on the screen start displaying, you need to quickly press Enter key as minimum as 3 times until we see the command line. Congratulations! We are in the SBOOT console! Run the following command:
Code:
setenv CMDLINE console=ttySAC4,115200 loglevel=4
saveenv
After its execution complete, press and hold Vol-(Volume Down) (if the above mentioned key has not been pressed, SBOOT will not print anything in the console) and enter the command into the SBOOT console:
Code:
reset
The device will reboot and we will see a SBOOT boot log and a part of kernel boot log. Why only a part? Because as of my research, a small bug is located in the kernel sources, I give you a patch for it below:
Code:
diff --git a/drivers/muic/universal/muic_apis.c b/drivers/muic/universal/muic_apis.c
index 342bc51..5af193c 100755
--- a/drivers/muic/universal/muic_apis.c
+++ b/drivers/muic/universal/muic_apis.c
@@ -796,7 +796,7 @@ int detach_jig_uart_boot_off(muic_data_t *pmuic)
*/
int attach_jig_uart_boot_on(muic_data_t *pmuic, muic_attached_dev_t new_dev)
{
- int com_index = COM_OPEN;
+ int com_index = COM_UART_AP;
int ret = 0;
pr_info("%s:%s JIG UART BOOT-ON(0x%x)\n",
After it has been applied, we will be able to see all the kernel boot log; however, we will break the GSM component of the mobile device. This UART port is used be system to communicate with a GSM modem. At this stage we can use it for kernel debugging, but it wasn't our goal.
Now let's get mobile device console access through UART, using the information received above.
To achieve this, we have to install TWRP on our device and using it, get root access. Then we have to install busibox, which includes getty application and that is the only its difference from the original. Afterwards, we boot our device, install a terminal emulator and switch the device to the airplane mode.
Now start the emulator and enter the following commands:
Code:
su
echo 1 > /sys/devices/virtual/sec/switch/uart_en
echo AP > /sys/devices/virtual/sec/switch/uart_sel #на этом этапе должен появиться лог ядра
su root -c "getty -n -L -l /system/bin/sh 115200 ttySAC4 vt102"
Useful links:
xda old forum thread
SBOOT hacking
and you connected the 3.3v line -why- exactly? the samsung won't power your max232 (if it does, like with usb otg, it will supply 5v, not 3.3 or usb converter and 3.3v won't power the samsung. just txd rxd and gnd is enough. also the 301ohm one always turns on the phone and boots to factory 'odin' mode for mass deployment of new firmware. (normal usb tho). when using them with the rs232 resistor value they'll output some crap at 115k2 during the bootloader.
cb3rob said:
and you connected the 3.3v line -why- exactly? the samsung won't power your max232 (if it does, like with usb otg, it will supply 5v, not 3.3 or usb converter and 3.3v won't power the samsung. just txd rxd and gnd is enough. also the 301ohm one always turns on the phone and boots to factory 'odin' mode for mass deployment of new firmware. (normal usb tho). when using them with the rs232 resistor value they'll output some crap at 115k2 during the bootloader.
Click to expand...
Click to collapse
I connected 3.3v because it normal to connect this line and it works. Probably without this line it will work. Everything that I write was tested by me. If you see crap during bootloader check minicom config.
lSDriim said:
I connected 3.3v because it normal to connect this line and it works, ft232 won't power Samsung because it's not working like that. Everything that I write was tested by me. If you see crap during bootloader check minicom config.
Click to expand...
Click to collapse
connecting a 3.3v line to a 5v line (regardless of which way the power goes) doesn't seem very practical for long time use. at least for 'factory odin' mode the phone can be powered from the 5v usb side during the firmware deployment (as usually the batteries aren't all too full when we pull them out of the box anyway
nah not crap as in frame errors and random bytes crap. crap as in some status messages but nothing useful. could not find any way to stop it and drop into a machine language monitor, get any type of prompt, inject code to be booted, or anything else that would be useful from there. it literally just seems to be some debug messages of the bootloader(s)
1650 pages of leaked "samsung confidential" datasheet but finding how to actually -use- the things for anything 'not android' (as in registers, memory map instruction set)? nah. it's more work to figure out how samsung screwed things up and get rid of all their 'monopoly' code which they try to pass off as 'security' than to just design a new phone and order it into production
anyway, the age of the post of the resistor values doesn't matter. the values are the same for every samsung device i've tried (we only use s7's but i got boxes full of other models, including very old ones. the resistor cables work exactly the same way all of those - although the 'magic bytes' for samsungs 'modified' simg format are different for each model, as are obviously the partition sizes. and really old ones seem to use a different and incompatible version of the odin protocol alltogether). haven't tried it with those usb-c connectors on those j5/a5 or whatever those things are called, as i don't have usb-c male pcb connectors in stock, but most likely there too. it's also not very picky on the actual resistor value. 300 ohm instead of 301 is fine. as long as it's 'close enough' it'll go to the desired mode. (as their specified values are weird, you can't buy 301 ohm resistors (pretty much all of them do uart mode and turn on+odin factory mode)
cb3rob said:
connecting a 3.3v line to a 5v line (regardless of which way the power goes) doesn't seem very practical for long time use. at least for 'factory odin' mode the phone can be powered from the 5v usb side during the firmware deployment (as usually the batteries aren't all too full when we pull them out of the box anyway
nah not crap as in frame errors and random bytes crap. crap as in some status messages but nothing useful. could not find any way to stop it and drop into a machine language monitor, get any type of prompt, inject code to be booted, or anything else that would be useful from there. it literally just seems to be some debug messages of the bootloader(s)
1650 pages of leaked "samsung confidential" datasheet but finding how to actually -use- the things for anything 'not android' (as in registers, memory map instruction set)? nah. it's more work to figure out how samsung screwed things up and get rid of all their 'monopoly' code which they try to pass off as 'security' than to just design a new phone and order it into production
anyway, the age of the post of the resistor values doesn't matter. the values are the same for every samsung device i've tried (we only use s7's but i got boxes full of other models, including very old ones. the resistor cables work exactly the same way all of those - although the 'magic bytes' for samsungs 'modified' simg format are different for each model, as are obviously the partition sizes. and really old ones seem to use a different and incompatible version of the odin protocol alltogether). haven't tried it with those usb-c connectors on those j5/a5 or whatever those things are called, as i don't have usb-c male pcb connectors in stock, but most likely there too. it's also not very picky on the actual resistor value. 300 ohm instead of 301 is fine. as long as it's 'close enough' it'll go to the desired mode. (as their specified values are weird, you can't buy 301 ohm resistors (pretty much all of them do uart mode and turn on+odin factory mode)
Click to expand...
Click to collapse
I write from my phone, because I am on vacation now and can't write long messages(too lazy now). But in this guide I write how to get bootloader prompt and change kernel start command and you can change kernel and boot anything you want... I already do this to boot up normal linux. In links there are link to guy that tried to hack sboot, may be he can help you.
Related
OK, there's been quite a few unanswered questions on bootloader development.. I didn't want to clutter the Make your Own Bootloader thread with hardware stuff. I didn't want to clutter up the UnBrickable Mod thread with Bootloader development setup stuff. UnBrickable mod will be a one-stop shop thread for the Captivate eventually.
Introduction
This thread will get you started with bootloader development speciffic to the captivate, however the same techniques work on all GalaxyS devices with an adjustment to the RX/TX locations
We need to delve into the hardware, remove a resistor, attach a wire, and bring two wires outside of the phone. This is quite a bit more difficult then the typical UART over USB connection which we have used in the past. For bootloader development the UART Output described in this video will not work..
The external UART output with a 619Kohm jig between pins 4 and 5, monitoring 115200 8N1 serial output between pins 2 and 3 will not work because the USB hardware is initialised by the bootloaders. In order to test the bootloaders you are developing, you must go to a lower level.
Note:While the UART output in the video will not work for Bootloader development, itis absolutely unbeatable for Kernel level debug on nearly all Samsung devices.
Getting Started
You will need:
1. UnBrickable modded captivate (or other device)
2. A UART device (Android Acessory Development kit or Arduino Mega or a Bus Pirate or any other UART device)
3. A Soldering Iron
4. Flux
5. Solid core wire
6. A relay (For the wire contained within)
7. A Linux computer (get Ubuntu here and dual boot, or run in a virtual machine)
Instructions
1. Apply the UnBrickable Mod to your Samsung Captivate. See Here: http://forum.xda-developers.com/showthread.php?t=1206216
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2. Next we need to connect a relay wire to the internal JTAG UART points. We cannot use the external UART via USB as we have seen in the past for writing bootloaders because the chip which handles switching for UART has not been initialized yet. We need to go directly to the source off of the processor. You can connect to the internal JTAG UART RX and TX lines here on the JTAG pads:
Using the JTAG header, you can connect to these points using this header: http://www.mouser.com/ProductDetail/Panasonic/AXT612124/?qs=2rFUEsTwVNwSdqVM5XnLHw==
and this Receptical: http://www.mouser.com/ProductDetail/Panasonic/AXT512124/?qs=2rFUEsTwVNy9TGVyeT43Dg==
They can be connected directly, or you can use a board from a guy named "K-WW" on the Hackaday.com forums
Here is a picture of my JTAG connector... This is optional and you will likely want to run wires directly for this project.
Alternately you can get these same points here, next to the processor:
3. Once you have the wires connected to the board, technically you're done and you can now connect up to your Android using your UART Device of choice. I decided to go the extra step and run those small wires to some solid core wire I bent and melted into the phone's case.
The further one is RX and the closer one is TX. Using this low point allows me to close up the device properly and I can still use my SDCard slot.
4. To do some debugging you can connect your Arduino at 8N1 using the same code from the video above...
Code:
void setup() {
// initialize both serial ports:
Serial.begin(115200);
Serial1.begin(115200);
}
void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.print(inByte, BYTE);
}
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
Serial1.print(inByte, BYTE);
}
}
Or connect the Bus Pirate up to the device using the following options in a terminal:
Code:
HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
9. DIO
x. exit(without change)
(1)>3
Set serial port speed: (bps)
1. 300
2. 1200
3. 2400
4. 4800
5. 9600
6. 19200
7. 38400
8. 57600
9. 115200
10. BRG raw value
(1)>9
Data bits and parity:
1. 8, NONE *default
2. 8, EVEN
3. 8, ODD
4. 9, NONE
(1)>1
Stop bits:
1. 1 *default
2. 2
(1)>1
Receive polarity:
1. Idle 1 *default
2. Idle 0
(1)>1
Select output type:
1. Open drain (H=Hi-Z, L=GND)
2. Normal (H=3.3V, L=GND)
(1)>2
Ready
UART>
4. Next you need some firmware. There is firmware in the Captivate Development Platform thread, and there is some in the Create Your Own bootloaders thread You can create your own.
5. In order to debug the firmware it has to be uploaded. You can use the SMDK Download tool attached in this post. Uncompress to your desktop
6. To prepare the phone for debug, remove the battery, insert the battery attach USB and run the following program in a new terminal (not the one you are monitoring USB Output)
Upon plugging in the USB, you should see
Code:
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
Uart negotiation Error
Then you execute this in a new window
Code:
sudo ~/Desktop/dltool/smdk-usbdl -f ~/Desktop/dltool/s5pc110_test/s5pc110_sbl_loader.bin -a D0020000
you will see this in the same window
Code:
SMDK42XX,S3C64XX USB Download Tool
Version 0.20 (c) 2004,2005,2006 Ben Dooks <[email protected]>
S3C64XX Detected!
=> found device: bus 002, dev 011
=> loaded 24576 bytes from /home/adam/Desktop/dltool/s5pc110_test/s5pc110_sbl_loader.bin
=> Downloading 24586 bytes to 0xd0020000
=> Data checksum ffb7
=> usb_bulk_write() returned 24586
[email protected]:~$
And upon upload of the primitive bootloader, you will see this in the UART window
Code:
Welcome to the S5PC110 resurrector by Rebellos!
Calling SGS IBL Stage2, pray so it wont hang...
DONE!
Testing if BL3 area is R/W
DONE!
Please prepare USB dltool with BL3 (SBL)
Starting downloader in...
9
8
7
6
5
4
3
2
1
0
7. Unplug the USB cable. As soon as the USB cable is removed all executing commands stop and the device awaits you to push the power on button.
Some notes:
PBL execution automatically occurs at 0xD002000 (this is with a 0x10 signature in front so the actual code begins at 0xD002010)
SBL is in DRAM at 0x40244000
Conclusion
So, there you have it. This is how to set up your Captivate to be a bootloader development kit. You don't have to develop a bootloader to load it up using this method.. You can simply stop at step 1 of this guide, UnBrickable mod, and be able to test results without UART output.
If anyone would like to give me one of the following devices' mainboard I will make a UnBrickable Mod/Development Platform for each device.
Samsung Devices: I9000 S8500, S8530, SGH-897, SGH-i896, SGH-i997, T959, SGH-T849, GT-P1000, GT-i9010, GT-i8350, GT-I917
Google Nexus S, Odroid T,
Apple iPhone4
Any new Samsung WP7
Further reading
Create your own bootloader: http://forum.xda-developers.com/showthread.php?t=1233273
The Captivate Development Platform: http://forum.xda-developers.com/showthread.php?t=1206216
Lets save some bricks: http://forum.xda-developers.com/showthread.php?t=1018862
Samsung Infuse (SGH-i997) Owners:
We've got it much easier when it comes to the JTAG header. As you can see in the picture below, the header is already attached to the PCB, and all we need is the connector board from "K-WW".
The large metallic thing on the left is the SIM card slot. The connector for the display (at the bottom of the picture) might be in the way. If it isn't we'll be able to connect to the JTAG and UART2 ports without doing any soldering or even disconnecting a single cable on the device.
We need someone to donate an Infuse to AdamOutler. He needs to remove the processor from the PCB to be able to find the xOM5 pad. This means destroying the phone, so it doesn't matter what the condition is. If it's bricked with a smashed screen and water damage, it doesn't matter! If you can help us with this, please speak up on this thead: http://forum.xda-developers.com/showthread.php?t=1221064
You don't NEED the board. The receptical itself with wires attached will attach to the header and you could close up the device with it attached. With the socket breakout board, the device would need to remain open. I would be searching for alternate UART points as well so the JTAG header would remain available.
Like I said.... I need device mainboards... they need not work. I'm not gaining anything directly from this except fruits of firmware development.... alternate OSs and open source bootloaders
Or, try to find 5 OM resistors while phone is being powered up.
3 should be 100.3kOhm resistance and connected to GND
2 should be ~10.1kOhm resistance and connected to VCC PDA (most likely exactly 2.8V, but 1.8V and similiar is also possible option)
These should be in row, or close to itselves. Then all whats left is guessing which one of the 3 is OM5. By some dangerous tests most likely, but with much smaller risk of damaging the board, comparing to complete CPU teardown.
aww dude, that's awesome....will try to do some of it on my cappy ; )
Rebellos said:
Or, try to find 5 OM resistors while phone is being powered up.
3 should be 100.3kOhm resistance and connected to GND
2 should be ~10.1kOhm resistance and connected to VCC PDA (most likely exactly 2.8V, but 1.8V and similiar is also possible option)
These should be in row, or close to itselves. Then all whats left is guessing which one of the 3 is OM5. By some dangerous tests most likely, but with much smaller risk of damaging the board, comparing to complete CPU teardown.
Click to expand...
Click to collapse
On my device, all resistors are 100.3kohm.
how to send the MB or how to fix my bricked phone GT-i8350
Adam,
I've been staring at this document, the picture of the infuse and the sgh-t959v pictures from ifixit for a while and finally got the gumption to try finding the internal uart. Big thanks for this picture:
AdamOutler said:
You can connect to the internal JTAG UART RX and TX lines here on the JTAG pads:
Click to expand...
Click to collapse
SGH-T959V Internal Uart thread.
Thanks again for all you do for the community!
-Bryan
The Samsung Anyway Jig
Summary: Some information and pictures of the mysterious Samsung Anyway Jig
Skill Level: Medium
==================================================
Do NOT post questions/requests on how to obtain one, they
will not be answered. (Because I have no idea, since its
Samsung proprietary test equipment!)
Do NOT post links to commercial jigs, unless you also post
the internal schematics, in such a way that it can be easily
constructed at home.
If you already have a working home-made multifunction jig
that you would like to share, please remember:
- a picture of the device
- a picture of the schematics
- a detailed parts list
- the phone/models it applies to
- any other relevant features to make it work
==================================================
Purpose
As custom ROM flashing become more and more popular, the XDA-forums are
continuously bombarded with questions and answers on how to debrick their
devices, often using (what used to be) professional hardware analysis and
debugging equipment, like vendor provided JTAG, JIG and software flashing
tools. These tools used to be only available to certified technical repair and
support centers, closely connected with the various phone vendors. However,
this scenario is rapidly changing as more people are getting higher technical
skills, while using these devices and tools on their phones.
One particular such device, provided by Samsung, has been used for years to
program, customize, repair, debug and unbrick essentially all available
Samsung phones. This blue box is called the "Samsung Anyway Jig", and somehow
Samsung has managed to hide it from public scrutiny and analysis, which have
elevated this device to an almost mythical status. At least for the common
person wishing to repair or modify his phone. Probably because Samsung have
realized that there is a great profit to be made, by having their customer
sending their phones in for repair, rather than letting them in on the simple
secret on how to do this kind of repairs themselves. This behavior have also
been a great joy for the few professional service centers that actually have
access to this device (or similar devices) or who were able to figure out how
it works, making it into a million dollar industry, and obviously without
sharing their knowledge to the public.
Thanks to great community oriented websites and forums like XDA and others,
the public awareness have increased to such a level, that today anyone (with
minimal soldering skills) can build a multifunction and debricking JIG. And
because of the increasingly better standardization among mobile phone
manufacturers, very few modifications are needed for this device to be working
with essentially any modern mobile-phone on the market.
This thread is an attempt to better understand the Samsung Anyway Jig, such
that one can build his/her own Jig, with the information contained herein,
together with many other publicly available documents. It shall be noted that
I do not have access to this device, and I have neither factual data, nor
info, on how this thing actually works. But I do have a very good idea!
Close inspection, of the only 3 (!) images found, as obtained by Google Image
Search (which I am growing increasingly unhappy with), provide a good start
for what is going on in that device.
The Anyway Versions
The Anyway Jig come in slightly different versions. And since I only have access
to 4 pictures, I cannot tell what other versions are available. However, I
noticed the following:
Code:
[SIZE=2]Version PartNumber Variation/Note
-------------------------------------------------------------------------------
S100 Doesn't have "EMP" Solution
S101 GH99-36900A Has "EMP" solution. Is used with GT-S7230 (Bada OS)
S102[/SIZE][SIZE=2] GH99-36900B [/SIZE][SIZE=2]1.2A High-Current version for Tabs & Tablets
[/SIZE]
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
So let me first reproduce the text as seen on the photo of this box:
Code:
[SIZE=2]
| Function
-------------------------------------------------------------------------------
No Solution | Mode OFF ON
-------------------------------------------------------------------------------
1 Agere TC | Boot Low High
2 Hp, Vision, Infineon | SDS O X
3 NXP Sysol | USB O X
4 NXP Swift Broadcom | DBG X O
5 UMTS (Qualcomm) | M-USB Use Not Use
6 EMP | ID type UART USB
7 - | ID-BOOT Boot-On Boot-Off
8 - | - - -
9 - | SDS TRX - Loop
10 - | DBG TRX - Loop
-------------------------------------------------------------------------------
| O = Connect, X = Disconnect
[/SIZE]
"The Solution"
The first thing to notice, is that the "Solution" column is completely
independent of the "Function" column. The "Solution" column seem to refer to
the manufacturer of the modem hardware used in the device, usually the
cellular/baseband processor (CP/BP) used by your phone or the modem chip in
routers etc. You can find out what you have by using the methods I have
outlined in the thread: "Phone/Modem Hardware Cross Reference List".
Once you know what you have, you use the 10-pole (BCD?) rotary micro-switch,
as shown in the picture below, to set it to the number corresponding to your
phone modem. (The settings in that picture, corresponds to a Samsung Wave
[GT-S7230] which has a Broadcom BP and thus the rotary-switch is set to #4.)
But according to this document, for attaching a [GT-I9000], you need to set
it to #2 (for Infineon).
It is unclear at this point whether or not this setting is actually changed
much when using various modern phones. It is more likely that this is used for
backward compatibility to older phones that use older connectors, and that new
phones all use the same setting since most of them, now use micro-USB
connectors. Otherwise it simply wouldn't make sense to use a
micro-rotary-switch, especially considering the vast number of modems chips
available today, while the uUSB standard connectors doesn't allow other
signals.
"The Function"
As you have already noticed, next to the rotary switch, there is a 10-pole DIL
switch, that is used to set the Jigs "Function", or behavior. The table above
show the various functional options available, that you can use for the JIG.
Although it is unclear what all these functions actually does, without access
to a box or manual, we are free to make some educated guesses.
Here we make the following (rather wild) guesses as what the various modes does:
Code:
[SIZE=2]DILpos Mode Typical What Description-Guess
-------------------------------------------------------------------------------
1 Boot 0 Low ??
2 SDS 1 X ??
3 USB 0 O ?Enable/disable USB pass trough: [target]--->[JIG]--->[PC]
4 DBG 0 X ?Enable/disable debug by "port":
5 M-USB 0 Use ?Enable/disable modem USB connection
6 ID type 1 USB ?"Interface Dongle" output-side selection (wheter to use the USB or UART to connect to PC)
7 ID-BOOT 0 Boot-on ?Determines if the device should bootup/start when connected to the JIG.
8 - - - -
9 SDS TRX 0 - ?Enable/disable Loopback on this interface
10 DBG TRX 0 - ?Enable/disable Loopback on this interface
-------------------------------------------------------------------------------
where (0==OFF, 1=ON) of the 10-pol DIL switch,
while "O" is connect and "X" disconnect.[/SIZE]
If you have any knowledge of what these does, please let us know. For example,
I like to know what the "SDS" refers to and what it is/was used for?
Then What?
So how interesting is this, for our modern Android based and micro-USB
connected phones, on a scale from 1-10? Probably not much more than 3.
Because most of the device magic happens inside the phone, determined by
various internal multiplexers (MUX), resistance/capacitance detectors, the
Power Management IC (PMIC) and related device drivers.
The most important thing to understand, is that today there are very specific
standards regarding what functionality is offered and expected, given certain
conditions on the micro-USB signals. For example, shorting the D+ and D- USB
signals, tells your phone to start charging, using the VBUS and GND lines.
While a resitive short between the micro-USB lines ID_CON (pin 4) and GND
(pin-5), allows and selects a wide range of functionality from remote control,
debug mode, download mode, audio/video transfer and everything else you may
want to do. These are some of the things we would like to focus on here.
So what is more interesting, is how we can build a JIG that is much more
modern and useful than this old dinosaur, that can provide us with a fully
controlled set of the functions mentioned above. So if you still dream about
getting one, forget it and build your own! Below I will link to a list of DIY
multifunction JIGs. That means I only list serious JIGs that contain a little
more functionality, than just a resistor. Post if you have something worth
showing.
Useful Resources
*Fun with resistors (home/car dock mode + more)
Lets Save Some Bricks
*The Captivate Development Platform mod AKA UnBrickable Mod
Set up a Captivate for Samsung Bootloader Development
The Vibrant Development Platform AKA UnBrickable Mod
USB Jig FAQ (Frequently Asked Questions) [4/4/2012] ICS bootloader added
Galaxy S UART JIG & Debugging Connector
Complete USB2.0 Specifications (>13 MB, 30 files, main: 650 pages)
USB Battery Charging Specifications 1.2 (71 pages)
FSA9280A Datasheet (Used in SGS1)
FSA9285 censored Datasheet ()
FSA9485 censored Datasheet ()
FSA3200 Datasheet (Used in SGS2)
---------------------------------------
* Strongly recommended reading
Let me know of any dead links.
Here is an internal photo of the original Anyway S100.
Keywords: jig, samsung, anyway, resistors, multiplex
UPDATE: 2012-10-24
Anyway Software, Drivers and Manuals for:
Anyway D100 (8 port factory jig)
Anyway S100 (1 port factory jig)
Can be found for download in Post#67 ...
Building your own multifunction JIG
The first thing you need to know, when building your own jig, is how various
resistor values determine the behavior of your phone. Below is a list of
resistor values used in the FSA9280A multiplexer chip. These values have been
become a bit of a standard for new Samsung phones and are thus likely to
remain true also for new models and many other devices running AOS. In
post #3 we use these values to build our Resistor Banks.
FSA9280A/88A Resistor Value Functionality
ID_CON Accessory Detection Table (ID_CON resistance to GND):
Code:
[SIZE=2]ADC-reg Min Typ Max Attn Accessory Detected
-------------------------------------------------------------------------------
00000 GND [COLOR=Red]GND [/COLOR]GND ! Host Mode / OTG (On-The-Go)
00001 1.9K 2K 2.1K Audio Send/End Button
00010 2.47K 2.604K 2.73K Audio Remote S1 Button
00011 3.05K 3.208K 3.37K Audio Remote S2 Button
00100 3.81K 4.014K 4.21K Audio Remote S3 Button
00101 4.58K 4.82K 5.06K Audio Remote S4 Button
00110 5.73K 6.03K 6.33K Audio Remote S5 Button
00111 7.63K 8.03K 8.43K Audio Remote S6 Button
01000 9.53K 10.03K 10.53K Audio Remote S7 Button
01001 11.43K 12.03K 12.63K Audio Remote S8 Button
01010 13.74K 14.46K 15.18K Audio Remote S9 Button
01011 16.4K 17.26K 18.12K Audio Remote S10 Button
01100 19.48K 20.5K 21.53K Audio Remote S11 Button
01101 22.87K 24.07K 25.27K Audio Remote S12 Button
01110 27.27K 28.7K 30.14K Reserved Accessory #1
01111 32.3K 34K 35.7K Reserved Accessory #2
10000 38.19K 40.2K 42.21K Reserved Accessory #3
10001 47.41K 49.9K 52.4 K Reserved Accessory #4
10010 61.66K 64.9K 68.15K Reserved Accessory #5
10011 76.1K [COLOR=Red]80.7K[/COLOR] 84.1K ! Audio Device Type-2
10100 96.9K [COLOR=Red]102K[/COLOR] 107.1K ! Phone Powered Device
10101 115K 121K 127K TTY Converter
10110 143K 150K 157K UART Cable
10111 190K 200K 210K Type-1 Car Kit Charger*
11000 242K 255K 268K Factory Mode Boot OFF-USB
11001 292K 301K 316K Factory Mode Boot ON-USB
11010 347K [COLOR=Red]365K[/COLOR] 383K ! Audio/Video MHL Cable**
11011 420K 442K 464K Type-2 Car Kit Charger*
11100 507K 523K 549K Factory Mode Boot OFF-UART
11101 588K 619K 650K Factory Mode Boot ON-UART
11110 750K 1000/2K 1050K Audio Device Type-1 with Remote
11111 - Open - Slave Mode / Charger Mode***
-------------------------------------------------------------------------------
* USB Car Kit specification: ANSI/CEA-936-A.
** USB MHL (Mobile High definition Link)
! Attention, when these values are used, all pin functions
changes. Having the wrong device connected in this mode, may
short and brick interior phone chips.
-------------------------------------------------------------------------------
[/SIZE]
There is a good reason why some resistor values are marked as "DO NOT USE", in
the original FSA9280A datasheet. That reason is because these values trigger a
signal path switch (by cascading multiplexers), in such a way that the
original 2-5 USB (cable) signals no longer exists as such. If this occurs,
when you have another type of device connected, than what was intended for
that function, you risk short-circuiting and bricking the relevant internal
chip that is driving that function. The best example is the MHL function. When
MHL is activated, all mUSB pins become part of MHL signal lines. If during you
happen to have a dedicated charger connected instead of a dedicated
mUSB-to-HDMI cable, you will for sure burn out your MHL Transmitter chip (or
possibly any other chip using those signals in that path). Why? Because a
dedicated charger has D+ and D- pins shorted, while its trying to provide +5V
(@1.2A) on pin-1. This at the same time the MHL chip is trying to provide
various output signals on all 5 pins!
Factory Mode Auto-Configuration Table (1% Resistors on ID_CON Pin):
Code:
[SIZE=2]Configuration Boot VBUS DP_CON DM_CON ID_CON BOOT JIG
-------------------------------------------------------------------------------
FactoryMode 0 (UART) On Open RxD TxD 619K HIGH LOW --> Triggers "Dock Mode" (Google Car Home)
FactoryMode 0 (UART) Off Open RxD TxD 523K LOW LOW -->
FactoryMode 1 (USB) On Closed DP_Host DM_Host 301K HIGH LOW --> Triggers "Download Mode" (aka "Debrick/Recovery JIG")
FactoryMode 1 (USB) Off Closed DP_Host DM_Host 255K LOW LOW -->
[/SIZE]
In addition to the above resistor values based on just that one chip, and mainly used by Samsung, there is an international standard specification for Battery Charging. In these spec's there are three additional values to consider.
Battery Charging 1.1 Specifications
(May need to be verified...)
Code:
[SIZE=2]DCP: USB Dedicated Charger Port RID_A = 124K
CDP: USB Charging Downstream Port RID_B = 68K
SDP: USB Standard Downstream Port RID_C = 36.5K
where RID = "Resistor Identification"[/SIZE]
List of DIY multifunction JIGs
UberPinguin's Multi-R Jig
Another nice I9100 UART JIG (chinese)
DHylands SGS2 Serial Adapter and Console
Recommended UART Cables
FTDI's "Chipi-X" USB-to-RS232 Cable
Good to Know
Android D2XX FTDI Driver
"Build your own Music dock" [Samsung]
The Dancing MyWay Jig
< here be dragons 2 >
Dude! excellent find. Holy Hack!
you may have seen this thread.. http://forum.gsmhosting.com/vbb/f200/who-used-samsung-anyway-jig-1347210/
that Duc guy may have some info.
someone also links to a user manual where you can see more of that puppy in action.. http://samfirmware.webs.com/I5801_Flash_Tutorial_English.pdf
enjoy. ciao.
^^ Yeah, thanks, but most of those links are dead and the "manual" is just an old standard flashing/service manual. In fact I got the above pictures from some other service manuals. Finally, I don't like having to register to a website, just so that I can see some images.
I do have a AnyWay S100 jig here that i got when samsung support left the place i work. I think i can get a hold of all the cables that they had for it. If i remember correct there was never a micro usb cable tho. But if you want i cna open that puppy up and provide pictures of the inside of the jig. also it could be nice if i could find a way to make a micro usb cable for it...
ParanoidDK said:
But if you want i cna open that puppy up and provide pictures of the inside of the jig.
Click to expand...
Click to collapse
Yes! We'd love to see what's inside! Chips, and wiring etc!
Do you happen to have any windows software drivers for the device? (Why? Because of this.)
Making a micro USB hack would be easy...if you have the right tools or a micro-USB breakout PCB. Just remember that most micro-USB to USB cables do not have the USB_ID line in the cable, but is immediately shorted inside micro-connector. You could get a micro-to-mini-USB cable, that should also include the USB_ID (aka ID_CON) line, but these are hard to find as they are not conforming to common USB cable standards.
Well the usb cable should be the least thing... And if i make one i might just as well make one from start with a micro usb plug, cable and the printer plug in the other end... I think i might be able to use the cable for one of the older samsung phones i have for the box as start point...
i have a print i need to make and then i will open up the box and start to take some pics with my SGS3 just so you can get a preview of the inside...
An anonymous and friendly contributor have come forward with a little bit more information, although not very useful.
1) The S102 model is modified to allow a higher current as used in Tablets.
2) The manual "Function" settings can now be made in software, and is no longer used. (Well then, how is it set in software?)
3) The "Solution" for Galaxy models should be set to "NXP Swift". (But this contradicts the Service Manual for the GT-I9100 and others! But is probably explained by the different BP's used in those devices.)
We need internal pictures! (or the schematics)
Here is some pictures of the internals from the S100 i have here. Proberly not the best ones but the best i can take with my cam... If i have to take better ones i will have to get my friend involved with his DSLR.
I had to upload them to my server as they was to large to upload to xda...
Internals Pictures of the AnyWay S100 Jig
-----EDIT----
I am going to see if i can find the last cables and the psu for the jig today in the bin... As it is now without the PSU windows dont even see the device...
ParanoidDK said:
Here is some pictures of the internals from the S100 i have here. Proberly not the best ones but the best i can take with my cam... If i have to take better ones i will have to get my friend involved with his DSLR.
I had to upload them to my server as they was to large to upload to xda...
Internals Pictures of the AnyWay S100 Jig
-----EDIT----
I am going to see if i can find the last cables and the psu for the jig today in the bin... As it is now without the PSU windows dont even see the device...
Click to expand...
Click to collapse
hi thanks to give all i need full box so can you help me ?
[email protected] said:
hi thanks to give all i need full box so can you help me ?
Click to expand...
Click to collapse
I am not going to part with the anyway jig i got so no... You will have to keep looking on ebay... I dont mind opening it up to let the world see the inside but am not going to sell it.
That's a whole lot of relays in that box.
I don't know if anyone has stated which connector is for what,
but I'd guess that the 25 pin connector goes to a model-specific resistor assembly.
Too much of the relay wiring goes out there.
The big "printer port" is the port for the phone connections that i know... i have a cable for a older samsung phone with the box... and that might be a problem because it might use diffrent pins for diffrent phone models... so without seeing both ends of the micro usb cable naked it will be hard to make a cable...
If you guys need more pics let me know... i can also strip that samsung cable i allready got...
Sent from my GT-I9300 using xda premium
ParanoidDK said:
Here is some pictures of the internals from the S100 i have here... I am going to see if i can find the last cables and the psu for the jig today in the bin... As it is now without the PSU windows dont even see the device...
Click to expand...
Click to collapse
Wow! This thing was (any?) way more complicated inside than what I could have imagined! Containing several relays, a PIC16F876A, and who knows what all those other chips are doing.
This is kind of bad news, as then it will be nearly impossible to build anything like it. At least without the firmware for the PIC and the drivers used. However, I believe that most of its functionality is for switching purposes in order to be able to use it on a broad spectrum of devices. So if we can limit ourselves to the most recent smart phones with micro-USB connectors, much of the internal electronic can be ignored.
So don't worry about the PSU (Power Supply Unit?). It would be much more useful if you have the drivers...
This is how it looks:
<I seem to have some upload problems!! >
(Not sure if its an XDA issue or not...)
EDIT: Now it worked...3 days later!
Could you take apart the shell on the 25 pin adapter cable for the old cell phone model?
I'll bet that there are some precision resistors in there.
Thanks.
I dont have the drivers... and i do worry about the psu because without that the unit dont work....
I will open the cable and upload some pictures of that today....
Sent from my GT-I9300 using xda premium
no comment
You sure have some problems with that image E:V:A
But here it is (I hope):
Did just open the cable i got ant it is a S20 cable.
http://www.samsung.com/us/mobile/cell-phones-accessories/APCBS10UBEBSTD
There is no resistors it is just a 25 pins to S20 cable... Will upload some pics here in a bit... And now i really have to check to see if there are more cables just to check the 25 pins end..
---EDIT----
Link to pictures of the naked cable: http://blog.moonman.dk/files/Anyway_S20_cable.zip
Are you sure that this jig does anything for current cell phones?
It seems to me that this device has nothing to do with the semi-standard today
of 5 pin micro USB connectors with resistance coding on the 5th ID pin.
Hello everybody,
I've been trying to hack a kernel in order to enable charging my RockChip 3066 tablet when in USB OTG (Host) Mode. I know it has been done before for the Nexus 7, but the code is totally different and since I have a limited experience hacking Linux kernels (although I'm familiar with C code), I'll ask here for help in this great community
So, I've narrow it down to some files and also found out the variable and the function that turns on the vbus power to the devices:
file: dwc_otg_cil.c
Code:
/* Turn on the vbus power. */
DWC_PRINT("Init: Port Power? op_state=%d\n", _core_if->op_state);
if (_core_if->op_state == A_HOST)
{
hprt0.d32 = dwc_otg_read_hprt0(_core_if);
DWC_PRINT("Init: Power Port (%d)\n", hprt0.b.prtpwr);
if (hprt0.b.prtpwr == 0 )
{
//hprt0.b.prtpwr = 1;
dwc_write_reg32(host_if->hprt0, hprt0.d32);
}
}
The variable in question is the prtpwr which is an unsigned int, that when its value is 1, it represents that vbus should be turned on, ie, power must be sent *from* the tablet to the USB port (which is what we don't want).
The dwc_write_reg32 function then takes the variable hprt0 which is a struct of type hprt0_data representing a series of register bits, (including the prtpwr), and writes that . I've commented 3 times in the code where hprt0.b.prtpwr = 1, in order not to send power to the USB. In theory, it should work. In practice, it doesn't.
I'm thinking it could be the Y-cable that was home made, because the tablet has an old mini-usb connector instead of micro-usb.
In order for me not to get in trouble because of IP, instead of attaching the files I'll give you the URLs where you can take a look at the source:
https://casper.berkeley.edu/svn/trunk/roach/sw/linux/drivers/usb/gadget/dwc_otg/dwc_otg_driver.c
https://casper.berkeley.edu/svn/trunk/roach/sw/linux/drivers/usb/gadget/dwc_otg/dwc_otg_hcd.c
https://casper.berkeley.edu/svn/trunk/roach/sw/linux/drivers/usb/gadget/dwc_otg/dwc_otg_cil.c
https://casper.berkeley.edu/svn/trunk/roach/sw/linux/drivers/usb/gadget/dwc_otg/dwc_otg_pcd.c
https://casper.berkeley.edu/svn/trunk/roach/sw/linux/drivers/usb/gadget/dwc_otg/dwc_otg_regs.h
Overview
I have designed a "universal" serial adapter that the XDA community might appreciate. I recently needed access to a variety of devices using serial TTL and RS232 communication. The devices being a phone, router and firewall unit. I talked with a few friends that are in IT and polled some other ROM developers to get an idea on what they may find useful in a serial adapter device. Below is the result of the work. The idea is to have 1 serial adapter that takes care of all of your DB9 / null modem / goofy pinouts in one package.
Project Page
I have posted all of the code, pictures and an early circuit diagram to github: https://github.com/mcrosson/arduino_universal_serial_adapter . As I continue to develop and implement the project I will be pushing to github. Please note at this time the circuit diagram is a bit out of date. I am working on getting an updated diagram built but I am still learning Eagle and it will be a little while before I have it published.
Compatible Devices
Phone UART chips
Null modem serial ports
Cisco serial consoles
Working Features
Configurable line speed
TTL voltage adjustments (1.8V, 3.3V, 5V)
RS232 communication
Full UI
Future Features
Session recording to SD card
RTC for timestamped sessions and output timestamps
Inline display of serial communication on LCD Won't fix, LCD response is too low for this
RX/TX status via blinking the button LEDs
Known Issues
At 115200 line speeds the serial channel may drop characters -- This appears to be a speed limitation / bad code Fixed in dd981aa44d
UI timeout isn't reset when events occur Fixed in 7f60a42f9b
Timeout config doesn't reset / change current timeout Fixed in ebd4ac5d04
Code
IDE / Environment
This project was developed using stino (Sublime Text 2 plugin). It works slightly differently (read: more powerful) than the standard Arduino IDE. This project may or may not build under the Arduino IDE.
Configuration
The `Project.h` and `Project.cpp` files define the pinouts in use, Arduino pinout and a number of other items that may vary between builds. Please read through these [short] files and update the pinouts, addresses and anything else that may be different before uploading to your Arduino.
Prototype
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Demo
I have posted some rough demo videos here (clickable) demonstrating some of the projects functions.
Parts
Arduino Mega
AdaFruit 1.8" LCD with MicroSD Card Slot
PSP Joystick
LED backlit buttons
Spark Fun MicroUSB breakout
AdaFruit logic level converter (bi-directional)
RJ-45 jacks
DB9 jack
Maxim Max3232 RS232 to TTL DIP IC's
Credits / Thanks
ChildOfTheHorn/Stacy Wylie
Adam Outler
Motorhead
utkanos
bhundven
Articles / Information Used For Project
http://forum.xda-developers.com/showthread.php?t=1901376
http://forums.hackaday.com/viewtopic.php?f=3&t=623
http://petervanhoyweghen.wordpress.com/2012/11/08/using-the-leonardo-as-usb-to-* serial-converter/
http://www.cellbots.com/how-to/handling-3-3v-to-5v-logic-level-conversion/
https://plus.google.com/104711040110222472212/posts/3764HBYeb2X
http://www.cutedigi.com/arduino-shields/rs232-shield-for-arduino.html
http://www.arduino.cc/en/Tutorial/SoftwareSerial
http://arduino.cc/en/Tutorial/ArduinoSoftwareRS232
http://www.ossmann.com/5-in-1.html
http://www.lammertbies.nl/comm/cable/RS-232.html
http://www.usconverters.com/index.php?main_page=page&id=61&chapter=0
Happy to be a part of it KemoNine. I'm all set with my simplified version but I'm still happy to have helped.
second!
great works kemonine96,curious to try it!
sert00 said:
second!
great works kemonine96,curious to try it!
Click to expand...
Click to collapse
Hopefully it works well for you. I've been hoping to find a solid solution to the problem of dropped serial data when running at faster line speeds. I'm thinking the code is setup in a way where it takes too long to process all of the input events. Going to be trying to set it up as an interrupt driven serial read/pass through to see if that fixes the problem any.
If not, I recently obtained an Arduino Due which should have enough CPU to keep up with everything compared to the standard Arduino Mega I'm currently using.
kemonine96 said:
Overview
I have designed a "universal" serial adapter that the XDA community might appreciate. I recently needed access to a variety of devices using serial TTL and RS232 communication. The devices being a phone, router and firewall unit. I talked with a few friends that are in IT and polled some other ROM developers to get an idea on what they may find useful in a serial adapter device. Below is the result of the work. The idea is to have 1 serial adapter that takes care of all of your DB9 / null modem / goofy pinouts in one package.
Project Page
I have posted all of the code, pictures and an early circuit diagram to github: https://github.com/mcrosson/arduino_universal_serial_adapter . As I continue to develop and implement the project I will be pushing to github. Please note at this time the circuit diagram is a bit out of date. I am working on getting an updated diagram built but I am still learning Eagle and it will be a little while before I have it published.
Compatible Devices
Phone UART chips
Null modem serial ports
Cisco serial consoles
Working Features
Configurable line speed
TTL voltage adjustments (1.8V, 3.3V, 5V)
RS232 communication
Full UI
Future Features
Session recording to SD card
RTC for timestamped sessions and output timestamps
Inline display of serial communication on LCD
Known Issues
At 115200 line speeds the serial channel may drop characters -- This appears to be a speed limitation / bad code
UI timeout isn't reset when events occur Fixed in 7f60a42f9b
Timeout config doesn't reset / change current timeout Fixed in ebd4ac5d04
Code
IDE / Environment
This project was developed using stino (Sublime Text 2 plugin). It works slightly differently (read: more powerful) than the standard Arduino IDE. This project may or may not build under the Arduino IDE.
Configuration
The `Project.h` and `Project.cpp` files define the pinouts in use, Arduino pinout and a number of other items that may vary between builds. Please read through these [short] files and update the pinouts, addresses and anything else that may be different before uploading to your Arduino.
Prototype
Demo
I have posted some rough demo videos here (clickable) demonstrating some of the projects functions.
Parts
Arduino Mega
AdaFruit 1.8" LCD with MicroSD Card Slot
PSP Joystick
LED backlit buttons
Spark Fun MicroUSB breakout
AdaFruit logic level converter (bi-directional)
RJ-45 jacks
DB9 jack
Maxim Max3232 RS232 to TTL DIP IC's
Credits / Thanks
ChildOfTheHorn/Stacy Wylie
Adam Outler
Motorhead
utkanos
bhundven
Articles / Information Used For Project
http://forum.xda-developers.com/showthread.php?t=1901376
http://forums.hackaday.com/viewtopic.php?f=3&t=623
http://petervanhoyweghen.wordpress.com/2012/11/08/using-the-leonardo-as-usb-to-* serial-converter/
http://www.cellbots.com/how-to/handling-3-3v-to-5v-logic-level-conversion/
https://plus.google.com/104711040110222472212/posts/3764HBYeb2X
http://www.cutedigi.com/arduino-shields/rs232-shield-for-arduino.html
http://www.arduino.cc/en/Tutorial/SoftwareSerial
http://arduino.cc/en/Tutorial/ArduinoSoftwareRS232
http://www.ossmann.com/5-in-1.html
http://www.lammertbies.nl/comm/cable/RS-232.html
http://www.usconverters.com/index.php?main_page=page&id=61&chapter=0
Click to expand...
Click to collapse
oh how i miss those breadboards
I managed to solve the dropped characters issue tonight. I am now using the Timer3 library (look for Timer1 library on non-mega hardware) to control the serial IO using an interrupt timer.
Works great with the interrupt driven IO. Next up is RTC and SD card integration.
Quick update on progress: I implemented some basic sd card logging and RTC functionality today. I also cleaned up some of the code and generally improved things.
Ran into an issue with sd card data transfers being "slow" which is forcing me to look into non-standard libraries for io purposes. My next step will be to be able to log data at 115200 baud to the sd card. Hopefully I'll have this rectified soon.
kemonine96 said:
Quick update on progress: I implemented some basic sd card logging and RTC functionality today. I also cleaned up some of the code and generally improved things.
Ran into an issue with sd card data transfers being "slow" which is forcing me to look into non-standard libraries for io purposes. My next step will be to be able to log data at 115200 baud to the sd card. Hopefully I'll have this rectified soon.
Click to expand...
Click to collapse
Not a lot of activity in this thread lately, but I'm just getting into this area.
Have you made any progress on logging data to sd card?
Maplobats said:
Not a lot of activity in this thread lately, but I'm just getting into this area.
Have you made any progress on logging data to sd card?
Click to expand...
Click to collapse
No, I ran into some performance issues when I went to implement the feature. I believe I traced it down to some case statements but it's been awhile since I worked on the build.
Sent from my XT1053 using Tapatalk
Me and my wife have 2 identical Verizon note 3 phones. Her phone works flawlessly when I plug it into a computer or external hard drive or even a card reader. But my phone on the other hand will not recognize anything I plug into it. I've tried updating usb drivers with kies 3 but kies doesn't even recognize my phone. I manually downloaded usb drivers and installed, but nothing.
I even did a phone reset and that didn't help. Thanks for any replies and help.
Sent from my SM-N900V using Tapatalk
Most likely a hardware issue then - either something mechanical like an open contact in the connector, or something electrical such as the mux chip connected to the USB connector got fried by static. It is possible that the cable in use is very marginal which would allow it to work with one phone but not the other, but that is sort of rare. But swapping USB cables is a good trial too.
Ignoring software driver issues (on the PC side), does the PC make any noises when you plug the phone in? USB insertions typically are followed on the PC with a two-tone audio confirmation. Second tone higher than the first = hardware detected & driver configured; Second tone lower than the first = hardware detected but driver not configured/not found. No tones at all? Probably a dead USB interface or bad cable or connector.
Also, even on non-rooted phones, from a terminal emulator you can run a 'dmesg' command twice which will spit out the kernel log. By doing it twice (once before plugging in the USB cable and once after) you can see if there is any new hardware detected by Android during the plugging event.
e.g.
Code:
dmesg | tail -n 20
then, plug in the device
Code:
dmesg | tail -n 20
If the Android kernel is detecting new hardware being plugged in, you will see some new jibberish saying something about USB in the second 'dmesg' run. (The first one is run before plugging in so you know what the end of the kernel log looks like.) If the kernel log is unchanged the second time, then you pretty much know that you have a dead USB port (or a bad cable which mysteriously works for one phone but not the other).
You should try to complete the 3-step sequence above fairly rapidly - other stuff routinely appears in the kernel log such as battery status messages. One way of doing that is
Code:
dmesg | tail -n 20 ; sleep 7 ; dmesg | tail -n 20
that gives you seven seconds to plug the cable in - do it as soon as you see output appearing on the screen.
This is the error I get when I plug my phone into the computer.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is error I get when I try to use the terminal emulator with the command u gave me.
I tried using a different usb cord also.
Thanks
Sent from my SM-N900V using Tapatalk
slufoot69 said:
This is the error I get when I plug my phone into the computer.
This is error I get when I try to use the terminal emulator with the command u gave me.
I tried using a different usb cord also.
Thanks
Sent from my SM-N900V using Tapatalk
Click to expand...
Click to collapse
Thanks for posting the pics
Well, for the 2nd part it looks like you need to be root to run the "dmesg" command. rats. (I assume you are not rooted.)
But the fact that you get a pop-up for the device on the PC says that there *probably* isn't anything wrong electrically, that's good news I suppose.
Let's try this: do you have the developer options turned on on your phone but not the wife's? Specifically I note the ADB interface in your first picture. Try turning off ADB (settings->Developer Options iirc) and possibly also Developer Options and re-plugging the device to see how things go.
The thing which is curious though is that you also mentioned not being able to plug in "other devices" - are you using a OTG cable adapter or something for that purpose? Note that drivers on the PC should have nothing to do with this use case. (Kies does not install "drivers on the phone", only on the PC)
I turned off USB Debugging and then turned Developer Options in settings off. (My wife's phone has Debugging ON and Developer Options ON)
Yes I have a OTG cable which works perfectly on external HD when my wife's phone is plugged into HD
Well after turning off Debugging and Developer Options I get the same error on pc after plugging it in. Any other suggestions? Thanks.
Sent from my SM-N900V using Tapatalk
slufoot69 said:
Any other suggestions? Thanks.
Click to expand...
Click to collapse
Not really. Your phone and the wifes are on the same boot firmware and OS release?
The only other thing that I can think of is that some ROMs pop up a USB notification when you attach a device; in the case of a PC, tapping on that notification will give you a choice between MTP mode and PTP mode. (I don't know if your stock ROM does that).
But given that the first pic you showed indicated a problem with a Mass Storage device, you could experiment with that MTP/PTP toggle (if you can find it).
But I don't know why that would have any effect on the phones behavior with an OTG device attached.
I can say this: there is a "mux" chip directly attached to the USB connector on the phone which allows for detection of a wide variety of devices; it typically comes into play not when using "normal" four-wire USB connections (like to a PC), but has the 5th wire attached to a resistance that goes to the ground terminal. This 5th connection is used in OTG, though. (I know this because I am using a UART adapter on my Note 3 - when the right resistance is present, it switches the connector from a USB interface to the UART interface - different voltages levels and all).
Anyhow, the point is that if that particular part of the Mux chip (OTG device detection pin) was messed up, the mux could (possibly?) stay stuck in a specific mode; it might be electrically active, but never proceed to the correct USB mode.
I don't know how you would correct such a situation, but you could probably identify something like this by looking at the USB "VID/PID" identifier pair that the PC sees for your device when you plug it in, and compare to see if those values are identical to your wife's phone.
In the Windows Device Manager, you find the USB device, select Properties, and then Details Tab. In the pull-down "Property" selector, look at the values for the field called "Hardware Ids" - the VID (Vendor ID) and PID (Product ID) should be identical between the two phones.
Sorry, that's all I've got.
FWIW, I stumbled across something this morning which - while not a "solution" - might make it easier for you to collect some data by comparing the wife's phone to yours.
The Windows Driver Kit 10 (yes, I am assuming you are using a Windows PC) has a graphical tool named "usbview.exe" which provides lots of details about USB devices attached to your PC. (I was installing the WDK for a different reason and happened to notice it).
It's a free download from Microsoft (note also it downloads hundreds of MB of components during it's install), and while the Microsoft Docs describe it as integrating with VisualStudio, there are a bunch of standalone tools in there (including "usbview.exe"). So, for this particular purpose installing VisualStudio is not required.
In my install they were located at
C:\Program Files (x86)\Windows Kits\10\Tools\x64\usbview.exe
(or, if you are on 32-bit)
C:\Program Files (x86)\Windows Kits\10\Tools\x86\usbview.exe
good luck! (The only thing the above will do for you is determine what the differences are; from there you will have to figure out a solution.)
PS. Quite a long time ago (in a different context) I ran into an odd problem where two peer computers were not talking to each other correctly. Eventually I traced the problem down to a situation where one side could successfully send and receive data, but the other end could only send (but not receive). If you have something like that going on, it is possible that the PC sees data sent from the USB device - enough to start the configuration process, but can't complete the negotiation process because the other side is deaf.
This is all hypothetical, but it could be something like that - a bad connector pin on one side of the D+/D- USB pins. (Obviously it's not the cable, as you swapped that with no change). On the Note 3, the charging port assembly can be replaced without replacing the motherboard. That could be something to try if you make no more progress.
Thanks for the help I will give it a go
Sent from my SM-N900V using Tapatalk