4 pagesV1234>
Reply
>OTG on the mobile router| | | Opportunities, difficulties, problem solving
* Dimitriy *
Message#1
11.04.16, 19:22
Local
*****
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 317
Date: 03.11.08

Reputation:-17+

Discussion and problem-solving with OTG on the mobile router




I propose to discuss this topic and to start mobile router from a megaphone under the code 150-2

Posted image
Posted image


Topic with no curator. For filling caps please contact the moderators section through a buttonPicturea message that you need to add links.

Post has been editedartem1701 - 12.04.16, 13:38
Reason for edit: Cap
vvevvevve
Message#2
26.07.15, 18:31
Guru
*********
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 0 Members:
Date: 02.12.08

Reputation:-936+

Continuation of research on the topic of wired Ethernet_a

Run the above D-Link adapter on the ASIX chip and did not work. As I understand it, the asix driver has a "table" of VID / PID devices, which it recognizes. But the driver version in the kernel is old, and there are no identifiers for this D-Link_a (DUB-E100 rev.C).
The attempt to use the driver as a separate module, as expected, was unsuccessful: if there is such a driver in the kernel, it is not possible to correctly launch the second one with the same name. No, you can change the source code and change the names, but somehow you do not want to do it.
I'm almost sure that if you take any other ASIX-based adapter whose identifiers are original (ASIX), then it will work.

But I went the other way. I took another adapter, on a different chipset. This time, STLab U-660 got caught,here is a. It is assembled on the chip of Moschip family MCS783x. It requires a mcs7830 driver, which I assembled as a module. Everything worked from the first time, without any questions.
This is how it looks in dmesg:
[2.765105] usb 2-1: new high-speed USB device number 2 using msm_hsusb_host
...
[2.950683] usb 2-1: New USB device found, idVendor = 9710, idProduct = 7832
...
[2.967066] usb 2-1: New USB device strings: Mfr = 1, Product = 2, SerialNumber = 3
...
[2.999006] usb 2-1: Product: USB-MAC Controller
[3.003822] usb 2-1: Manufacturer: Moschip Semiconductor
...
[3.014618] usb 2-1: SerialNumber: cd294e66
...
[5.086456] usb 2-1: Applying rev.C fixup
[5.104200] usb 2-1: Applying rev.C fixup
[5.128110] MOSCHIP usb-ethernet driver 2-1: 1.0: eth0: register 'MOSCHIP usb-ethernet driver' at usb-msm_hsusb_host-1, MOSCHIP 7830/7832/7730 usb-NET adapter, 00: 0a: cd: 29: 4e: 66
...
[5.152352] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
...
[15.674073] eth0: no IPv6 routers present


Generally,Here is the packagedecorated in a standard style. After installation, the device automatically reboots and, after a reboot, is ready to connect the adapter. The package includes a test startup script that loads the module and sets the Ethernet interface address 10.10.10.11/24. You do not need to configure the broadcast for it separately, because This has already been done - the system uses an unconditional masquerade for any packet coming to the "internal" interface to the currently available "external" interface - modem, Wi-Fi (in client mode) or tunnel (if my openvpn package is used). So if you connect via a wired Ethernet any device with an address from the 10.10.10.0/24 subnet and the default gateway 10.10.10.11, it will automatically receive traffic through the MF910.
Here is the configuration of the adapter, obtained from ifconfig eth0:
Eth0 Link encap: Ethernet HWaddr 00: 0A: CD: 29: 4E: 66
Inet addr: 10.10.10.11 Bcast: 10.10.10.255 Mask: 255.255.255.0
Inet6 addr: fe80 :: 20a: cdff: fe29: 4e66 / 64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1
RX packets: 1960 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 1983 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 1000
RX bytes: 394389 (385.1 KiB) TX bytes: 731600 (714.4 KiB)

Of course, this script can (and, for sure, you need) to fix for application in specific conditions. You can, for example, configure the DHCP server for it, if necessary. And still, for good, you need to ensure that the assignment of the address occurs when the adapter is connected, and not when the router is started. At me something at once did not turn out - similar, udev on this platform does not work. As a result, if you start the router with the adapter unconnected, it will "see" the system, but it will be unconfigured.

Yes, this package will work on the MF910 with any of the (two :)) known firmware.

And here's the set for working with Ethernet in my "collective farm" performance:
Posted image

Of course, the lack of power for external devices on the USB router bus significantly "heavier" the design and serves as an obstacle to the implementation of some interesting usage scenarios. On the other hand, new scenarios appear, because, apparently, the router in this mode is powered by an external source, not by the battery. This, however, requires verification - I'm not sure about it.
And the adapter itself consumes about 200 mA, so when the battery is powered by the router, the whole thing would not work for a long time.
In any case, power in OTG mode remains one of the moments that require a separate study.

And ... too many of these moments have accumulated, requiring ...
Connect someone - I do not have enough resources to do it all alone!
vvevvevve
Message#3
14.09.15, 09:51
Guru
*********
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 0 Members:
Date: 02.12.08

Reputation:-936+

-Stranik- @ 09/13/2015, 11:21 pm*
I use such a wire

Something at me such piece (under a picture) does not cause trust. Too thin cables in it are used.
Unable to recognize USB-3G-modem

And this also speaks in favor of the version of malnutrition. Modems, like flash drives, consume (on average) more than BT adapters and, especially, sound cards.
USB hub with external power, by the way, does not save the situation either ...

But with the hubs, in fact, in this configuration of Linux there is some kind of problem. As far as I remember, I never managed to find a hub that would work with the MF910. I have not studied the details. Now I am engaged in tightly Y900, he has “full-fledged”, with power, OTG - however, not “out of the box”, an additional module is needed. But not all hubs work with it either: judging by preliminary information, there is a strong dependence on the chipset on which the hub is assembled. True, there I tested USB 3.0 hubs (2.0, everything seems to work), and even hubs that do not work with the device are correctly detected by the USB subsystem - in the sense that all descriptors are read correctly and the device is registered as a hub. Errors occur only later, after connecting devices to the hub itself.
I think that this issue (with hubs) for the MF910 is not so difficult to solve. But in your case, the problem with flash drives / modems is clearly not such a plan.
I'll try to take another cable (type, such)

Yes, in it, perhaps, the guides are even thinner. Is that only the length of the cable from the power source to the jack is smaller.
You seem to specifically choose such cables. :)

No, of course, the large outer diameter of the shell does not guarantee a large cross-section of the conductors inside, but with it there is at least a physical possibility to use a sufficient cross-section. And so, if you have a shell diameter, say 3 mm, and besides this shell, there are still inside the round shells on each of the 4 conductors, what kind of cross section can each be? I assume that it really turns out 0.1 ... 0.2 mm2, not more.

It would be better for you, for experiment, to take a good, thick OTG-cable, cut its shell, cut the power wire and cut (removed the insulation) from the ground wire, and then filed - on the side of the jack - external power to these wires.
Alternatively, you can take from someone for the sample external hard drive with external power.
quick31
Message#4
10.11.15, 12:03
Local
*****
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 196
Date: 17.03.12
Xiaomi Redmi 3S

Reputation:-11+

He askedvvevvevveBuild for kernel modules usbserial, everything works fine.
I use a USB Hub with external power.

[13748.460819] usb 2-1: New USB device found, idVendor = 05e3, idProduct = 0606
[13748.460839] usb 2-1: New USB device strings: Mfr = 1, Product = 2, SerialNumber = 0
[13748.460852] usb 2-1: Product: USB Hub 2.0
[13748.460860] usb 2-1: Manufacturer: ALCOR
[13748.464589] hub 2-1: 1.0: USB hub found
[13748.465847] hub 2-1: 1.0: 4 ports detected
[13748.764073] usb 2-1.2: new full-speed USB device number 3 using msm_hsusb_host
[13748.888227] usb 2-1.2: New USB device found, idVendor = 067b, idProduct = 2303
[13748.888248] usb 2-1.2: New USB device strings: Mfr = 1, Product = 2, SerialNumber = 0
[13748.888261] usb 2-1.2: Product: USB-Serial Controller
[13748.888271] usb 2-1.2: Manufacturer: Prolific Technology Inc.
[13748.892115] pl2303 2-1.2: 1.0: pl2303 converter detected
[13748.907066] usb 2-1.2: pl2303 converter now attached to ttyUSB0
[13748.994022] usb 2-1.4: new full-speed USB device number 4 using msm_hsusb_host
[13749.131674] usb 2-1.4: New USB device found, idVendor = 0403, idProduct = 6001
[13749.131695] usb 2-1.4: New USB device strings: Mfr = 1, Product = 2, SerialNumber = 3
[13749.131708] usb 2-1.4: Product: FT232R USB UART
[13749.131717] usb. 2-1.4: Manufacturer: FTDI
[13749.131726] usb 2-1.4: SerialNumber: A7WQN2WY
[13749.136317] ftdi_sio 2-1.4: 1.0: FTDI USB Serial Device Converter detected
[13749.138976] usb 2-1.4: Detected FT232RL
[13749.138990] usb 2-1.4: Number of endpoints 2
[13749.139000] usb 2-1.4: Endpoint 1 MaxPacketSize 64
[13749.139010] usb 2-1.4: Endpoint 2 MaxPacketSize 64
[13749.139020] usb 2-1.4: Setting MaxPacketSize 64
[13749.141732] usb 2-1.4: FTDI USB Serial Device converter now attached to ttyUSB1


In occasion of a food through OTG it is necessary to dig all aboutbq24192. Page 15 in the datasheet.
Judging by the datasheet, the power supply capability of 5V is provided, but it seems to be disabled in the kernel. In the kernel, there seems to be nothing at all about bq24192, it is possible to control through zte modules.
Someone already found something on this topic?

Root @ mdm9625: ~ # cat / sys / class / i2c-adapter / i2c-3 / 3-0036 / name
Max17058
Root @ mdm9625: ~ # cat / sys / class / i2c-adapter / i2c-3 / 3-0057 / name
Smb137c
Root @ mdm9625: ~ # cat / sys / class / i2c-adapter / i2c-3 / 3-006b / name
bq24296


Post has been editedquick31 - 10.11.15, 12:57


--------------------
vvevvevve
Message#5
10.11.15, 13:38
Guru
*********
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 0 Members:
Date: 02.12.08

Reputation:-936+

Quick31 @ 10.11.2015, 12:03*
Someone already found something on this topic?

Think that someone was looking for?

In my opinion, to implement such a thing in the device does not have enough electronic components.
But this is so, "by sight," without justification.
But yes, usually in such cases, the logic of the "reverse" power supply is implemented in the charge control chip driver. Perhaps with additional support in the battery drivers and E (X) HCI.
I would start by studying the event, which happens when connecting to the device just a cable with an OTG jumper. What happens in this case?
quick31
Message#6
10.11.15, 14:13
Local
*****
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 196
Date: 17.03.12
Xiaomi Redmi 3S

Reputation:-11+

* vvevvevve,
Just an OTG cable.
[2848.808302] msm_otg f9a55000.usb: USB exited from low power mode
[2848.925529] msm_hsusb_host msm_hsusb_host: Qualcomm On-Chip EHCI Host Controller
[2848.925585] msm_hsusb_host msm_hsusb_host: new USB bus registered, assigned bus number 2
[2848.952392] msm_hsusb_host msm_hsusb_host: irq 166, io mem 0xf9a55000
[2848.972391] msm_hsusb_host msm_hsusb_host: USB 2.0 started, EHCI 1.00
[2848.972519] usb usb2: New USB device found, idVendor = 1d6b, idProduct = 0002
[2848.972532] usb usb2: New USB device strings: Mfr = 3, Product = 2, SerialNumber = 1
[2848.972545] usb usb2: Product: Qualcomm On-Chip EHCI Host Controller
[2848.972556] usb usb2: Manufacturer: Linux 3.4.0+ ehci_hcd
[2848.972566] usb usb2: SerialNumber: msm_hsusb_host
[2848.976456] hub 2-0: 1.0: USB hub found
[2848.976492] hub 2-0: 1.0: 1 port detected
[2851.072702] msm_bam_lpm_ok: Going to LPM now
[2851.072806] msm_otg f9a55000.usb: USB in low power mode
[2851.072883] msm_otg f9a55000.usb: USB exited from low power mode

Cable + any device, the same output, until there is no external power.
Has someone parsed the router? How to disconnect the battery connector? Show me an example of how to disable, I just crashed on another iron, I do not want to repeat this.
You need to make photos in good quality without screens, so you can study the strapping. Ideally, if someone already has everything dismantled and there is an opportunity to make a good photo.

More piecesCodeFor bq24296.

Post has been editedquick31 - 10.11.15, 14:33


--------------------
quick31
Message#7
11.11.15, 01:07
Local
*****
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 196
Date: 17.03.12
Xiaomi Redmi 3S

Reputation:-11+

Posted image

As I thought, there is a binding, you need now to search for the software that pulls PSEL & OTG pin.
USB current limit selection pin during buck mode, and active high enable pin during boost mode.
For bq24296, when in buck mode with USB host (PSEL = High), when OTG = High, IIN limit = 500 mA
And when OTG = Low, IIN limit = 100 mA.
For bq24297, when in buck mode with USB host, when OTG = High, IIN limit = 500 mA and when OTG
= Low, IIN limit = 100 mA.
The boost mode is activated when the REG01 [5] = 1 and OTG pin is High.


Root @ mdm9625: ~ # cat / sys / kernel / debug / gpio
GPIOs 0-75, platform / fd510000.gpio, msmgpio:
Gpio-4 (spi_mosi) out lo
Gpio-5 (spi_miso) in hi
Gpio-6 (spi_cs) out hi
Gpio-7 (spi_clk) out hi
Gpio-13 (CHARG ENABLE) out lo
Gpio-14 (CHARGER INT) in hi
Gpio-16 (LCD_RESET) out hi
Gpio-20 (wps-key) in hi
Gpio-21 (restore-key) in hi
Gpio-23 (LCD_RS) out hi
Gpio-50 (LCD_BACKLIGHT_EN) out hi
Gpio-61 (CHARGE STATUS) in hi
Gpio-62 (ath6kl-chip-pwd-l) out hi
Gpio-65 (POWER STATUS) in hi
Gpio-68 (lcd_power_en) out hi
Gpio-71 (MI2S_MCLK) in lo

GPIOs 756-761, spmi / qpnp-pin-cf5cf400, pm8019-mpp:

GPIOs 762-767, spmi / qpnp-pin-cf5cf200, pm8019-gpio:
Gpio-764 (ath6kl-pm-enable) out hi
Gpio-765 (ext_2p95v) out lo

GPIOs 768-799, platform / qcom, smp2pgpio-smp2p-2-out.17, smp2p:

GPIOs 800-831, platform / qcom, smp2pgpio-smp2p-2-in. 15, smp2p:

GPIOs 832-863, platform / qcom, smp2pgpio-ssr-smp2p-1-out.14, master-kernel:

GPIOs 864-895, platform / qcom, smp2pgpio-ssr-smp2p-1-in.13, slave-kernel:

GPIOs 896-927, platform / qcom, smp2pgpio-smp2p-1-out.11, smp2p:

GPIOs 928-959, platform / qcom, smp2pgpio-smp2p-1-in.9, smp2p:

GPIOs 960-991, platform / qcom, smp2pgpio-smp2p-7-out.7, smp2p:

GPIOs 992-1023, platform / qcom, smp2pgpio-smp2p-7-in. 5, smp2p:


--------------------
vvevvevve
Message#8
11.11.15, 22:21
Guru
*********
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 0 Members:
Date: 02.12.08

Reputation:-936+

Quick31 @ 10.11.2015, 13:07*
Pieces of code for bq24296

There is no such code in the kernel. If you look at the configuration, then there is a variable CONFIG_REGULATOR_BQ24192, corresponding to which I did not find the source right away. The situation is aggravated by the fact that CONFIG_CHARGER_BQ24192, which you would expect to see in the configuration, is not here. However, the assembly and loading of the corresponding module does not change anything.
And the initialization of this thing in the log is as follows:
[2.782929] bq24192 bsp_init
[2.785826] bq24x9x 3-006b: chg is 61
[2.789373] bq24x9x 3-006b: pg is 65
[2.792964] bq24x9x 3-006b: ce is 13
[2.796485] bq24x9x 3-006b: no isel gpio found: -22
[2.801364] bq24x9x 3-006b: no psel gpio found: -22
[2.806211] bq24x9x 3-006b: int is 14
[2.809851] bq24x9x 3-006b: no otg gpio found: -22
[2.814645] bq24x9x 3-006b: no hi vol gpio found: -22
[2.819660] bq24x9x 3-006b: vbat is 33
[2.823412] bq24x9x 3-006b: ntc is 16
[2.827040] bq24x9x 3-006b: sys is 7
[2.830598] bq24x9x 3-006b: usb is 22
[2.834258] there is no pump

That is, here we also see problems with the distribution of gpio lines.

Yes, and in order to confuse everything, CONFIG_SMB137C_CHARGER is defined in the configuration, and the components of this driver are naturally present in the kernel itself. But there is no such chip in the device (Or am I wrong? But there can not be two "chargers" there ...), what the driver constructor tells in the log:
[2.300454] smb137c_read_reg: i2c_smbus_read_byte_data failed. Reg = 0x33, rc = -107
[2.307859] smb137c: probe of 3-0057 failed with error -107


In general, here is the mess ...
For starters, it would be nice to find the source of the driver that they gathered for the presence of CONFIG_REGULATOR_BQ24192 in the configuration.
Chujoi13
Message#9
16.11.15, 01:24
Local
*****
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 320
Date: 04.02.12
Sony Xperia T2 Ultra

Reputation:-52+

CONFIG_SMB137C_CHARGER is defined in the configuration, and the components of this driver are naturally present in the kernel itself. But there is no such chip in the device (Or am I wrong?

Perhaps it is, just to see it you need to try very hard. After all, it is performed in the case "The SMB137C is available in an ultra-compact CSP-30 package" and the size of it can be literally 2mm. X 2mm.
But there can not be two "chargers"

If you look at the same configuration, then from there it follows that the SMB137C chip is a "MODULbus GPIO expanders". If I understand correctly, this is a chip that is responsible for working with the battery. And the BQ24192 chip is the "Multifunction device drivers". This chip should ideally be responsible for charging, the OTG function, the function of powering / charging external devices from the battery of the router, etc.
Chujoi13
Message#10
16.11.15, 20:34
Local
*****
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 320
Date: 04.02.12
Sony Xperia T2 Ultra

Reputation:-52+

Yes, they did not do anything. Just driver of this charger was accidentally included in the kernel.

Maybe you are right, but still I will stay with my opinion. By the way, I found confirmation that 2 microcircuits can be used in the device:
Brings home, connect the charging - silence. I opened it, examined it, there was no damage, but the protective shield was removed near the battery connector, under it the charge controller (BQ24192) and mikruha, which reads the battery status (I do not know how to explain, BQ27530). So, the second chip (on the diagram marked as U1401) stood somehow crooked, did not touch half a fifth of the board ... It's BGA, 5x3 pins.

Do not get distracted. You need to find the sources of the driver for the voltage generation subsystem (regulator) BQ24192.

Yes, I'm not distracted :) From ZTE firmware it is impossible to find, and even about the source code and I will not speak ... But I found the sources of the BQ24192 chip driver from another device in this device by the way implemented USB OTG if it certainly has some value.
Attached fileBq24192_charger.zip ( 55,46 )
Point03
Message#11
16.11.15, 22:12
User
****
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 72
Date: 05/10/15
HTC Desire Z

Reputation:-9+

But I found the source code of the BQ24192 chip from another device in this device by the way implemented USB OTG if it certainly has some value.
Bq24192_charger.zip (55,46 KB)

I'm not on the topic ... just looked ...
It seems that the kit will need more, at least, and
Linux / power / bq24192_charger.h
Chujoi13
Message#12
25.11.15, 05:36
Local
*****
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 320
Date: 04.02.12
Sony Xperia T2 Ultra

Reputation:-52+

* vvevvevve,
Still, we have the second mikruha is not smb137c and mp2617 seems to have found a mention of it in several demons. As for bq24192 that's what I found, it might be interestingAttached fileBq24192.zip ( 79,41 )
. Yes, and OTG apparently will not work, there at the kernel level is not all that concerns OTG included. For example, the line from the config: # CONFIG_USB_OTG is not set. Something like this.
vvevvevve
Message#13
25.11.15, 10:52
Guru
*********
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 0 Members:
Date: 02.12.08

Reputation:-936+

Chujoi13 @ 11.25.2015, 05:36*
Yet we have the second mikruha is not smb137c and mp2617 most likely found a mention of it in several demons

Yes, there is a mention - in the form of / dev / mp2617 and virtual device in sysfs / sys / devices / virtual / mp2617. And these elements do exist in a working system. Although there is no driver for this explicitly in the kernel, the term "mp2617" occurs twice in the kernel code - until it looked in what context.

But the microchip is not physically in our modification of the MF910. There are, however, on the circuit board and wiring, which, at first glance, are suitable for MP2617:
Posted image

But neither the chip itself, nor the strapping (including the elements of the voltage converter) has really been established.

However, it still does not mean anything. It is possible that the board has a universal wiring, which allows the use of both the BQ24xxx and this MP2617. And in our case, the first option is chosen. Of course, the layout for one more converter attracts attention - to the right (from the photo) of the proposed MP2617. What kind of converter it should be, whether it is necessary for the realization of some function, or we are observing the above-mentioned "universality" of the board in all its glory - it’s hard to say: there isn’t any installed element there. It is clear only that the control chip is in a 6-pin package.
And there are places for some two keys, apparently connected with this converter. In general, the specific "filling the components" of the board for this node of the device is quite "weak": there are more missing parts than those available.
May be interesting

OK, I'll look in the evening. A cursory look at platform_bq24192.c, however, did not reveal the existence of procedures that are in the kernel. And bq24192_charger, as you remember, I collected and downloaded, with no apparent effect. Maybe in your archive is another version - you can try it. But it still seems to me that without the driver of the converter (regulator) for BQ24xxx nothing will work, even if we assume that the available "hardware" is enough to perform the required function.
And OTG apparently does not get it

What do you mean "will not work"? At us after all all after all works, only the food is not present.
There at the kernel level, not everything that concerns OTG is included. For example, the line from the config: # CONFIG_USB_OTG is not set

This driver is easy to assemble and load as a module. But the fact that it is necessary is not a fact. For example, it is also missing from the core used in the Y900, but it does not interfere with the full OTG performance.
quick31
Message#14
25.11.15, 11:52
Local
*****
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 196
Date: 17.03.12
Xiaomi Redmi 3S

Reputation:-11+

vvevvevve
Any manipulations with alternative modules BQ24296 do not make sense, there is a module BQ24192 in the kernel, it occupied the i2c bus at 0x6b, any attempts of conversion show the bus is busy. It is necessary either to somehow block the module in the kernel, or to disassemble it and through it to address the address of the chip. The main task is to read the data of the chip registers and to be able to change them, how it does not matter. I do not have time now, a lot of work, you can connect and remove the analyzer dump on i2c. It will be possible to find out the state of the control register of interest to us. But unfortunately, there is no time for it.
Root @ mdm9625: ~ # i2c / i2cdetect -r -y 3
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
70: -- -- -- -- -- -- -- --
Root @ mdm9625: ~ # i2c / i2cget -y 3 0x6b
Error: Could not set address to 0x6b: Device or resource busy


The router console has not been physically connected yet? The pinout did not come across Jtag, uart? On the screen side of the board, there are two pins, maybe it's i2c.

Noinitrd root = / dev / mtdblock17 rw rootfstype = yaffs2 console = ttyHSL0,115200, n8 androidboot.hardware = qcom ehci-hcd.park = 3 androidboot.serialno = MDM9625 androidboot.baseband = msm



Mp2617 if I'm not mistaken at all analog, without digital control on the data bus.
Here you can see the ADC data on the pins of this chip:
Root @ mdm9625: ~ # head / sys / class / mp2617 / mp2617 / *
==> / sys / class / mp2617 / mp2617 / address <==
0x00

==> / sys / class / mp2617 / mp2617 / boot <==
Boot_reason is 0xaa

==> / sys / class / mp2617 / mp2617 / charger <==
Over temperature

==> / sys / class / mp2617 / mp2617 / charger_state <==
Charger_state is 0

==> / sys / class / mp2617 / mp2617 / data <==
0x42

==> / sys / class / mp2617 / mp2617 / dbmode <==
In_debug_mode is 0

==> / sys / class / mp2617 / mp2617 / default <==

==> / sys / class / mp2617 / mp2617 / dev <==
245:0

==> / sys / class / mp2617 / mp2617 / disable <==
Enable

==> / sys / class / mp2617 / mp2617 / factory <==
Is_factory_mode is 0

==> / sys / class / mp2617 / mp2617 / gpiofree <==

==> / sys / class / mp2617 / mp2617 / gpioset <==

==> / sys / class / mp2617 / mp2617 / gpioshow <==

==> / sys / class / mp2617 / mp2617 / percent <==
62

==> / sys / class / mp2617 / mp2617 / power <==
Head: / sys / class / mp2617 / mp2617 / power: Input / output error

==> / sys / class / mp2617 / mp2617 / pump <==
Pump not exist

==> / sys / class / mp2617 / mp2617 / shutdown <==
no

==> / sys / class / mp2617 / mp2617 / subsystem <==
Head: / sys / class / mp2617 / mp2617 / subsystem: Input / output error

==> / sys / class / mp2617 / mp2617 / trig_vbat_adc <==
Channel 33 is 3834

==> / sys / class / mp2617 / mp2617 / trig_vsys_adc <==
Channel 7 is 3807

==> / sys / class / mp2617 / mp2617 / trig_vtemp_adc <==
Channel 16 is 579

==> / sys / class / mp2617 / mp2617 / trig_vusb_adc <==
Channel 22 is 772

==> / sys / class / mp2617 / mp2617 / trigmonitor <==

==> / sys / class / mp2617 / mp2617 / uevent <==
MAJOR = 245
MINOR = 0
DEVNAME = mp2617

==> / sys / class / mp2617 / mp2617 / voltage <==
3836

==> / sys / class / mp2617 / mp2617 / waittime <==

==> / sys / class / mp2617 / mp2617 / wakeup <==
0


Posted on 11/25/2015, 11:52:

* Chujoi13,

CONFIG_USB_OTG is not set

OTG Module for MDM9225 chipMsm_otg

Post has been editedquick31 - 25.11.15, 12:36


--------------------
vvevvevve
Message#15
25.11.15, 23:46
Guru
*********
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 0 Members:
Date: 02.12.08

Reputation:-936+

Chujoi13 @ 25.11.2015, 23:33*
I meant to start without unnecessary hemorrhoids, if you collect all the necessary modules, then of course ...

No, because you were talking about the functionality of OTG. And I meant that she is still working "out of the box". Only this "reverse power" is not present.
Of course, here is the question of terminology: we can assume that the host-mode without this power supply is not OTG. And you can not count ...
Somewhere here on the forum in which one of the topics I saw information that ZTE can get the firmware on their devices

And why do we need one more firmware? Is not available enough?
Chujoi13
Message#16
26.11.15, 18:07
Local
*****
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 320
Date: 04.02.12
Sony Xperia T2 Ultra

Reputation:-52+

And why do we need one more firmware?

I wrote why, so that they included in it the necessary functionality. In this case, to include in it the support of the active OTG (we now understand the passive mode), to insert a flash drive and work with it without additional. Power supply. Yes, and to understand all the same already, where this password is on Wi-Fi is, I would have corrected it and put out the firmware of Megafonovskaya.
vvevvevve
Message#17
27.11.15, 00:58
Guru
*********
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 0 Members:
Date: 02.12.08

Reputation:-936+

For what in a router to insert a flash drive and what prevents to work with a flash card on other device

A memory card in this class of device is a very useful and necessary thing. The possibility of using it provides a number of new interesting usage scenarios.
First, it becomes possible to run applications that require a significant amount of disk space to store their data - for example, some tor client, various proxy servers. Such applications, by the way, by themselves, complete with all configuration and auxiliary files (even if you don’t even consider “external” data — for example, caches that you want to store in the course of their work) usually take dozens of megabytes, and their placement An internal flash drive is an uneasy task, requiring non-standard approaches.

Secondly, it becomes possible to use DLNA functionality, exchange data using SMB resources, and other similar opportunities for "adult" routers. The script "came to visit, showed on the TV with DLNA pictures / rollers" directly from the router in the pocket, nowhere without connecting anything with cables, doing nothing by copying and without using any additional equipment is very curious and invariably evokes interest of all who saw it with their own eyes .

Well, of course, when researching the platform and debugging applications without a map - nowhere, the space on the internal flash drive is not enough catastrophically. I'm not without reason that as the first successful application of the discovered functionality of USB OTG (host mode) I connected an external USB flash drive to the MF910, and only then any Ethernet adapters.

So I consider the lack of the possibility of using an SD card, perhaps the most unpleasant disadvantage of the MF910. The more offensive that the necessary support for working with cards is in the hardware and software of the device. There is also a sufficient amount of space inside the hull of the router, on its card for placing the card holder. Unfortunately, this holder is not provided for ...
vvevvevve
Message#18
27.11.15, 10:27
Guru
*********
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 0 Members:
Date: 02.12.08

Reputation:-936+

It's much easier to stick a flash with photos directly to the TV

Easier. Only on it first you need to write these pictures somehow. The usual initial source of photos in this scenario is a mobile device - a phone or a tablet, and the pictures are "just taken off the street." Of course, if you have an OTG cable and the phone / tablet supports OTG, then the issue is solved. But is it easier?
And still cases when the TV is so installed (hung) are not uncommon, that physical access to its USB-port is difficult.
Than stick it into the router

I, in general, when describing the scenario, I mean the micro SD card, which is once inserted into the router and is constantly in it. So "stick" it is not necessary.
But since there is no such possibility in the discussed device, then there is no sense to spend much time discussing this subject.
On the other hand, it is completely wrong to deny the utility of having such an opportunity. It's doubly wrong - it's in the subject devoted to the device without such an opportunity. Because it turns out an unworthy conversation from the series "I do not have - then it's not necessary."
The rest - cheap ponty for blondes (WOW !!!)

But this is just a clear example of such a conversation ...

Posted on 11/27/2015, 10:27:

Well, share your complete dump. Did the same for sure immediately after purchase)

Explain - why do you need it? You are here, in the subject, recently. And, probably, not yet fully realized the seriousness of the problems that arise after the recording of someone else's dump. You will now write it down, and then we will repair your device for three days ...
Why is this necessary? Describe the problem. Surely, it can be solved somehow more quickly and safely.
quick31
Message#19
28.11.15, 21:06
Local
*****
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 196
Date: 17.03.12
Xiaomi Redmi 3S

Reputation:-11+

I watched the i2c_qup module through the dynamic debug, there is no exchange for i2c at all in the power connection state or otg.
I can only assume that the bq24192 module configures the chip only when the kernel is being loaded and always takes the bus at the address 0x6b.
The bq24192 module itself does not have debugging information at all through the dynamic debug.
There are suggestions how to block the module bq24192 or release the address 0x6b or sample code how to access the functions of the bq24192 module?


--------------------
vvevvevve
Message#20
05.12.15, 17:58
Guru
*********
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 0 Members:
Date: 02.12.08

Reputation:-936+

00: 42 0c 60 00 d6 80 93 40 44 00 20 ff ff ff ff ff

Actually, no useful information. Except for the fact that the registers set at the initialization are stored.
Well, also confirmation that the chip is in host mode, but not OTG, which is explicitly disabled in REG01.
quick31
Message#21
05.12.15, 22:12
Local
*****
[Offline]

Group:Friends w3bsit3-dns.com
Posts: 196
Date: 17.03.12
Xiaomi Redmi 3S

Reputation:-11+

The first experiment showed the possibility of powering an external device in OTG mode :)
What was the result of the research, even after releasing the bus by making unbind on the bq24x9x module, some process constantly writes data to the chip registers, any attempt to write any values ​​in REG00-07, instantly overwrites them to the original state. But there is one thing ... if you do this:
1. pull out the OTG cable
2. insert OTG cable with flash drive
3. Record in REG01 [5: 4] = 10
I2cset -y 3 0x6b 0x01 0x2c

4. We get this:
[3257.150018] msm_hsusb_host msm_hsusb_host: remove, state 4
[3257.150060] usb usb2: USB disconnect, device number 1
[3257.156107] msm_hsusb_host msm_hsusb_host: USB bus 2 deregistered
[3272.185816] msm_hsusb_host msm_hsusb_host: Qualcomm On-Chip EHCI Host Controller
[3272.185872] msm_hsusb_host msm_hsusb_host: new USB bus registered, assigned bus number 2
[3272.211435] msm_hsusb_host msm_hsusb_host: irq 166, io mem 0xf9a55000
[3272.231384] msm_hsusb_host msm_hsusb_host: USB 2.0 started, EHCI 1.00
[3272.231511] usb usb2: New USB device found, idVendor = 1d6b, idProduct = 0002
[3272.231525] usb usb2: New USB device strings: Mfr = 3, Product = 2, SerialNumber = 1
[3272.231538] usb usb2: Product: Qualcomm On-Chip EHCI Host Controller
[3272.231548] usb usb2: Manufacturer: Linux 3.4.0+ ehci_hcd
[3272.231558] usb usb2: SerialNumber: msm_hsusb_host
[3272.235330] hub 2-0: 1.0: USB hub found
[3272.235365] hub 2-0: 1.0: 1 port detected
[3315.821430] usb 2-1: new high-speed USB device number 2 using msm_hsusb_host
[3316.071414] hub 2-0: 1.0: unable to enumerate USB device on port 1
[3337.000854] usb 2-1: new high-speed USB device number 3 using msm_hsusb_host
[3337.158280] usb 2-1: New USB device found, idVendor = 0951, idProduct = 1625
[3337.158301] usb 2-1: New USB device strings: Mfr = 1, Product = 2, SerialNumber = 3
[3337.158314] usb 2-1: Product: DT 101 II
[3337.158322] usb 2-1: Manufacturer: Kingston
[3337.158332] usb 2-1: SerialNumber: 0019E06B70F9A9207779060D
[3337.162052] usb-storage: USB Mass Storage device detected
[3337.162196] usb-storage: - associate_dev
[3337.162207] usb-storage: Vendor: 0x0951, Product: 0x1625, Revision: 0x0200
[3337.162218] usb-storage: Interface Subclass: 0x06, Protocol: 0x50
[3337.162331] usb-storage: Transport: Bulk
[3337.162339] usb-storage: Protocol: Transparent SCSI
[3337.162421] scsi1: usb-storage 2-1: 1.0
[3337.162635] usb-storage: *** thread sleeping.
[3337.167966] usb-storage 2-1: 1.0: waiting for device to settle before scanning
[3337.270179] usb 2-1: USB disconnect, device number 3
[3337.270364] usb-storage: storage_disconnect () is called
[3337.273666] usb-storage: - usb_stor_release_resources
[3337.273678] usb-storage: - sending exit command to thread
[3337.273701] usb-storage: *** thread awakened.
[3337.273709] usb-storage: - exiting
[3337.273758] usb-storage: - dissociate_dev

If it did not work, repeat from 1 point.
Values ​​in REG01:
0x0c - power off
0x1s - charging mode from an external source
0x2c - external power supply mode

Post has been editedquick31 - 05.12.15, 22:20


--------------------

4 pagesV1234>


mobile versionNow: 04.10.18, 06:35