Example: when I plug my nodeMCU ESP-12E with this code or other USB serial devices I can’t communicate even with /dev/ttyUSB0 open. (Google translator)
[ 4119.374661] usb 1-2.1.2: new full-speed USB device number 9 using tegra-xusb
[ 4119.395922] usb 1-2.1.2: New USB device found, idVendor=1a86, idProduct=7523
[ 4119.395927] usb 1-2.1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 4119.395931] usb 1-2.1.2: Product: USB2.0-Ser!
[ 4119.397730] ch341 1-2.1.2:1.0: ch341-uart converter detected
[ 4119.399323] usb 1-2.1.2: ch341-uart converter now attached to ttyUSB0
#include <Arduino.h>
#define LED_PIN 2
#define INPUT_PIN 4
#define OUTPUT_PIN 5
int state = 0;
void setup() {
// put your setup code here, to run once:
pinMode(LED_PIN,OUTPUT);
pinMode(INPUT_PIN,INPUT);
pinMode(OUTPUT_PIN,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
state = digitalRead(INPUT_PIN);
digitalWrite(LED_PIN,!state);
digitalWrite(OUTPUT_PIN,state);
delay(300);
}
No USB module rebuild should be required. So far as the USB side goes, this part is guaranteed to be working:
[ 4119.374661] usb 1-2.1.2: new full-speed USB device number 9 using tegra-xusb
[ 4119.395922] usb 1-2.1.2: New USB device found, idVendor=1a86, idProduct=7523
[ 4119.395927] usb 1-2.1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 4119.395931] usb 1-2.1.2: Product: USB2.0-Ser!
Next, you know the driver is working via this (USB announced the device and the driver which can work with it not only attached, it generated the device special file):
[ 4119.397730] ch341 1-2.1.2:1.0: ch341-uart converter detected
[ 4119.399323] usb 1-2.1.2: ch341-uart converter now attached to ttyUSB0
If you have changed USB, then probably you should either reflash or revert those changes. I am not a Python guy, but problems at this point are probably with the software. As something to test, is there a particular command you can send to the Arduino which would simply echo back what you sent? Loopback modes (such as echo back) are quite useful for this. Any text you could send which has a known expected response would help. The goal would be to take that content and bypass the Python program and simply use a terminal emulator. The output as a reply would be visible to see if the UART itself is working as expected.
I already reinstalled the system, even with the SDK manager, but I have the same problem of not being able to send or receive information, the drive really seems to be working, but without transmitting the data.
On my computer it works, but when i test on jetson it doesn’t
I don’t have one of these to test with, but does the communication use pins on the nodeMCU ESP-12E? Or does it use USB directly? If it uses pins, do you have an oscilloscope? I suggest this because it is easy to tell if communications exist even if the nodeMCU ESP-12E does not reply as expected.
As far as power goes, sometimes it is correct that external devices receiving power from the Jetson might fail. Power supplies have to be well regulated, and additionally, if the Jetson itself is powered over USB, then there might not be enough power for the Jetson’s own USB to power another USB device. External power to the nodeMCU ESP-12E would be best, but if the unit is not shutting down, then probably power is ok. It would be worth describing how power is supplied to both the Jetson and the nodeMCU ESP-12E.
Provided that this setup works on another Linux system I am thinking that the issue is probably with the software itself. For example, perhaps a different version of Python is used on the desktop PC compared to the Jetson. It is hard to check that out though before verifying the above hardware questions.