Power & Source of Big Ideas

NanoPC-T4 android 7.1 usb 3.0 driver issue adb

Moderators: chensy, FATechsupport

I have a windows 10 machine and I installed the rock chip drivers but when I connect to the board using a USB 3 C cable windows cannot recognize the driver and it says that the driver cannot be initialized.
I was wondering if someone had any luck using the same configuration
Darkcast wrote:
I have a windows 10 machine and I installed the rock chip drivers but when I connect to the board using a USB 3 C cable windows cannot recognize the driver and it says that the driver cannot be initialized.
I was wondering if someone had any luck using the same configuration


To my knowledge the T4 doesn't have OTG.
You also do not need to install drivers to work with OTG.
This would have worked with the M4.
M4 usb-c : USB Type-C: Supports USB2.0 OTG and Power input
T4 usb-c : USB Type-C: Supports USB3.0 Type-C and DisplayPort 1.2 Alt Mode on USB Type-C
The T4 uses 12V. So the 5V of your computer can not power this. I suspect that's why there's no OTG.
NicoD wrote:
The T4 uses 12V. So the 5V of your computer can not power this. I suspect that's why there's no OTG.

I am using the usb port located next to the reset button ttps://www.friendlyarm.com/image/catalo ... _en_03.jpg
if I cant use the usb c to adb into the board how else could I ?
Thanks
Darkcast wrote:
if I cant use the usb c to adb into the board how else could I ?


"adb usually communicates with the device over USB, but you can also use adb over Wi-Fi after some initial setup over USB, as described below. If you're developing for Wear OS, however, you should instead see the guide to debugging an Wear OS app, which has special instructions for using adb with Wi-Fi and Bluetooth.

Connect your Android device and adb host computer to a common Wi-Fi network accessible to both. Beware that not all access points are suitable; you might need to use an access point whose firewall is configured properly to support adb.
If you are connecting to an Wear OS device, turn off Bluetooth on the phone that's paired with the device.
Connect the device to the host computer with a USB cable.
Set the target device to listen for a TCP/IP connection on port 5555.

adb tcpip 5555

Disconnect the USB cable from the target device.
Find the IP address of the Android device. For example, on a Nexus device, you can find the IP address at Settings > About tablet (or About phone) > Status > IP address. Or, on an Wear OS device, you can find the IP address at Settings > Wi-Fi Settings > Advanced > IP address.
Connect to the device by its IP address.

adb connect device_ip_address

Confirm that your host computer is connected to the target device:

$ adb devices
List of devices attached
device_ip_address:5555 device

You're now good to go! "

https://developer.android.com/studio/command-line/adb

I hope that works.
Or can this be done with uart? I don't use Android, only Linux.
When debugging Linux I use uart.
Here the discription in the wiki. It's all in Chinese, but you can use google Chrome and translate it.

"6 RK3399 platform Android hardware resources program access
6.1 Serial Port
Currently, the serial port that can be directly used is UART4, and the device name is /dev/ttyS4. Other serial port resources have been assigned to other functions. As shown in the following table, you can also use USB to serial port to expand:

Serial device Serial port resource usage
UART0 Already occupied by Bluetooth
UART1 Has been occupied by Gigabit Ethernet
UART2 Has been used as a debug serial port
UART3 Has been occupied by Gigabit Ethernet
UART4 Idle, the device name is /dev/ttyS4 (Note: ROM after 20180618 is required)
6.1.1 Interface Description for Serial Port Reading and Writing
HardwareControler. openSerialPortEx //Open the serial device
HardwareControler. select // Poll the serial port for data to be writable or readable
. HardwareControler. read //Read the serial port data
HardwareControler. write //Write data to the serial port
HardwareControler. close //Close the device
For interface description please refer to: FriendlyThings APIs

"
Here
http://wiki.friendlyarm.com/wiki/index. ... hings_APIs
And here
http://wiki.friendlyarm.com/wiki/index. ... for_RK3399

You find more info on how to connect via uart.
NicoD wrote:
Darkcast wrote:
if I cant use the usb c to adb into the board how else could I ?


"adb usually communicates with the device over USB, but you can also use adb over Wi-Fi after some initial setup over USB, as described below. If you're developing for Wear OS, however, you should instead see the guide to debugging an Wear OS app, which has special instructions for using adb with Wi-Fi and Bluetooth.

Connect your Android device and adb host computer to a common Wi-Fi network accessible to both. Beware that not all access points are suitable; you might need to use an access point whose firewall is configured properly to support adb.
If you are connecting to an Wear OS device, turn off Bluetooth on the phone that's paired with the device.
Connect the device to the host computer with a USB cable.
Set the target device to listen for a TCP/IP connection on port 5555.

adb tcpip 5555

Disconnect the USB cable from the target device.
Find the IP address of the Android device. For example, on a Nexus device, you can find the IP address at Settings > About tablet (or About phone) > Status > IP address. Or, on an Wear OS device, you can find the IP address at Settings > Wi-Fi Settings > Advanced > IP address.
Connect to the device by its IP address.

adb connect device_ip_address

Confirm that your host computer is connected to the target device:

$ adb devices
List of devices attached
device_ip_address:5555 device

You're now good to go! "

https://developer.android.com/studio/command-line/adb

I hope that works.



well I have tried via ethernet and wifi and the board never respond, I can see the device using adb devices but it never connects and I have enable usb debugging so its kind of wierd
NicoD wrote:
Or can this be done with uart? I don't use Android, only Linux.
When debugging Linux I use uart.
Here the discription in the wiki. It's all in Chinese, but you can use google Chrome and translate it.

"6 RK3399 platform Android hardware resources program access
6.1 Serial Port
Currently, the serial port that can be directly used is UART4, and the device name is /dev/ttyS4. Other serial port resources have been assigned to other functions. As shown in the following table, you can also use USB to serial port to expand:

Serial device Serial port resource usage
UART0 Already occupied by Bluetooth
UART1 Has been occupied by Gigabit Ethernet
UART2 Has been used as a debug serial port
UART3 Has been occupied by Gigabit Ethernet
UART4 Idle, the device name is /dev/ttyS4 (Note: ROM after 20180618 is required)
6.1.1 Interface Description for Serial Port Reading and Writing
HardwareControler. openSerialPortEx //Open the serial device
HardwareControler. select // Poll the serial port for data to be writable or readable
. HardwareControler. read //Read the serial port data
HardwareControler. write //Write data to the serial port
HardwareControler. close //Close the device
For interface description please refer to: FriendlyThings APIs

"
Here
http://wiki.friendlyarm.com/wiki/index. ... hings_APIs
And here
http://wiki.friendlyarm.com/wiki/index. ... for_RK3399

You find more info on how to connect via uart.


Thanks, but I dont have a serial device to connect via the uart port. thanks for the idea :)
NicoD wrote:
Darkcast wrote:
I have a windows 10 machine and I installed the rock chip drivers but when I connect to the board using a USB 3 C cable windows cannot recognize the driver and it says that the driver cannot be initialized.
I was wondering if someone had any luck using the same configuration


To my knowledge the T4 doesn't have OTG.
You also do not need to install drivers to work with OTG.
This would have worked with the M4.
M4 usb-c : USB Type-C: Supports USB2.0 OTG and Power input
T4 usb-c : USB Type-C: Supports USB3.0 Type-C and DisplayPort 1.2 Alt Mode on USB Type-C

I don't think I have entered yet, Because I'm going through this problem and this post of yours seems to solve my problem

Who is online

In total there are 8 users online :: 0 registered, 0 hidden and 8 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 8 guests