USB connection-disconnection problem on iMX6SoloX

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB connection-disconnection problem on iMX6SoloX

Jump to solution
1,764 Views
m4l490n
Contributor V

Hello, everybody.

First of all a little bit of context. I have a device that has just one USB port with a micro USB connector. This port is used for serial flashing and when the device is operating normally nothing is connected to this micro USB connector except for the power supply of the device.

We recently discovered that we need to connect an RTL-SDR dongle to this device but we can't perform any modifications to the already existing hardware, therefore I thought that I could just provide power to this device through the USB power pins and provide the RTL-SDR dongle data trough the D+ and D- pins of that same connector.

This is not a standard setup because normally, the USB HOST is the one providing power to the USB device when it is connected to the HOST in an OTG configuration.  But in this scenario, it has to be the other way around and I don't know if this is causing the problem in the first place. I assume that this is not the problem because it is transparent to both devices, or is it?

Since there is no device that provides power to the host I had to hardware-hack a little bit and I have the following:

hardwareHack.jpg

That way I can provide power to both HOST and DEVICE and also I can remove the power from the DEVICE if needed.

The problem is that it doesn't matter if I power both at the same time or if I power the HOST first and then the RTL-SDR dongle once the HOST is ready, I get this:

usb 1-1: new high-speed USB device number 2 using ci_hdrc
usb 1-1: USB disconnect, device number 2
usb 1-1: new high-speed USB device number 3 using ci_hdrc
usb 1-1: USB disconnect, device number 3
usb 1-1: new high-speed USB device number 4 using ci_hdrc
usb 1-1: USB disconnect, device number 4
usb 1-1: new high-speed USB device number 5 using ci_hdrc
usb 1-1: USB disconnect, device number 5
usb 1-1: new high-speed USB device number 6 using ci_hdrc
usb 1-1: USB disconnect, device number 6
usb 1-1: new high-speed USB device number 7 using ci_hdrc
usb 1-1: USB disconnect, device number 7
usb 1-1: new high-speed USB device number 8 using ci_hdrc
usb 1-1: USB disconnect, device number 8
usb 1-1: new high-speed USB device number 9 using ci_hdrc
usb 1-1: USB disconnect, device number 9
usb 1-1: new high-speed USB device number 10 using ci_hdrc
usb 1-1: USB disconnect, device number 10
usb 1-1: new high-speed USB device number 11 using ci_hdrc
usb 1-1: USB disconnect, device number 11
usb 1-1: new high-speed USB device number 12 using ci_hdrc
usb 1-1: USB disconnect, device number 12
usb 1-1: new high-speed USB device number 13 using ci_hdrc
usb 1-1: USB disconnect, device number 13
usb 1-1: new high-speed USB device number 14 using ci_hdrc
usb 1-1: USB disconnect, device number 14
usb 1-1: new high-speed USB device number 15 using ci_hdrc
usb 1-1: USB disconnect, device number 15

And it continues until reaching 127 and then it starts again.

Then if I SSH into the board and I run the rtl_tcp utility I get:

Found 1 device(s):
0: , , SN:

Using device 0: Generic RTL2832U OEM
rtlsdr_demod_read_reg failed with -1
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_read_reg failed with -4
rtlsdr_write_reg failed with -4
rtlsdr_read_reg failed with -4
rtlsdr_write_reg failed with -4
rtlsdr_read_reg failed with -4
rtlsdr_write_reg failed with -4
rtlsdr_read_reg failed with -4
rtlsdr_write_reg failed with -4
No supported tuner found
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
Enabled direct sampling mode, input 1
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
WARNING: Failed to set sample rate.
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
WARNING: Failed to set center freq.
rtlsdr_write_reg failed with -4
rtlsdr_write_reg failed with -4
listening...
Use the device argument 'rtl_tcp=127.0.0.1:1234' in OsmoSDR (gr-osmosdr) source
to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...).

So, does anybody know what is going on?

Thanks!!

Labels (2)
0 Kudos
1 Solution
1,061 Views
igorpadykov
NXP Employee
NXP Employee

Hi Manuel

one can set mode is software using sect.39.3.8 Changing the Controller Operation Mode

attached Linux Manual, from hardware check processor USB_OTG_VBUS, USB_OTG_ID

(should be low in host mode).

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
1,062 Views
igorpadykov
NXP Employee
NXP Employee

Hi Manuel

one can set mode is software using sect.39.3.8 Changing the Controller Operation Mode

attached Linux Manual, from hardware check processor USB_OTG_VBUS, USB_OTG_ID

(should be low in host mode).

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,061 Views
m4l490n
Contributor V

Thanks! that helped.

I just added dr_mode = "host"; to my device tree and that solved the problem.

0 Kudos