Jump to content

Recommended Posts

Posted

Hi there, this might be a dumb question but I've done some searching and haven't gotten any closer to a solution, so, my apologies.

 

I need to connect to my NanoPi M4 over the serial UART because I've made the eMMC unbootable, and I need to tell the board to boot from microSD so I can fix it.

 

I've attempted to do this in both 'minicom' and 'screen' at 1500000 8N1 and the result is the same either way. I can see output from the NanoPi just fine, but when I attempt to send characters, it only displays a question mark imprinted on a square for each character, similar to what I'd expect if e.g. the character was not in my terminal font. It's not just a display problem either - I can pause the boot sequence by mashing keys, but blindly typing commands does nothing. So I don't think the characters are making it intact to the NanoPi.

 

My serial interface is a USB to serial device which was known working properly before my friend mailed it to me. Currently I'm suspicious that I have something configured wrong and that the USB dongle is probably fine. But that's just my best guess.

 

Apologies if this is something very basic, I've been thru the docs and search on the forum but haven't found the answer.

Posted

Also I feel like this is a configuration error on my part because behavior seems consistent.. at the "hit any key to stop autoboot" prompt, if I hit the esc key it prints two squares, if I hit enter or a letter it prints one. This doesn't vary.

Posted
Also I feel like this is a configuration error on my part because behavior seems consistent.. at the "hit any key to stop autoboot" prompt, if I hit the esc key it prints two squares, if I hit enter or a letter it prints one. This doesn't vary.
Are you using a terminal emulator to connect to the serial port? Some of them let you change settings on the fly

Sent from my moto g(7) power using Tapatalk

Posted
17 hours ago, broodwich82 said:

when I attempt to send characters, it only displays a question mark imprinted on a square for each character,

What kind of chip is used on that USB-TTL ?

Did you tried to plug it as loopback wire to see if echos are doing the same or becomes clear ?

Posted
On 3/15/2020 at 5:28 PM, a16bitsysop said:

Are you using a terminal emulator to connect to the serial port? Some of them let you change settings on the fly
 

 

minicom is a full blown terminal emulator. I had it set to 1500000bps, 8N1.

 

I should actually correct myself about the behavior I mentioned, actually sometimes one square and sometimes two squares are printed when I press a key.

Posted
 
minicom is a full blown terminal emulator. I had it set to 1500000bps, 8N1.
 
I should actually correct myself about the behavior I mentioned, actually sometimes one square and sometimes two squares are printed when I press a key.
Was just a suggestion, I used to use 'screen' alot but haven't connected via the serial port in a long time.

Sent from my moto g(7) power using Tapatalk

Posted
On 3/16/2020 at 8:25 AM, martinayotte said:

What kind of chip is used on that USB-TTL ?

Did you tried to plug it as loopback wire to see if echos are doing the same or becomes clear ?

 

It's USB 1a86:7523 - USB device database says that's a HL-340 / CH340 from QinHeng electronics. 

 

I do note that FriendlyElec sells a USB-serial adapter which claims to be based on the "CH340T" but the one I've got isn't the exact same PCB. My PCB looks a little different and is selectable for 3.3V or 5V logic levels and I have it selected for 3.3V.

 

I'm not sure I completely understand about hooking it up as loopback. I don't actually have a second serial adapter or anything else with an external serial port in the house.

 

I guess I wouldn't be all that surprised if the hardware wasn't managing the weird 1500000 bps rate.

Posted

Note to self: found a description of how to test on loopback at https://raspberrypi.stackexchange.com/questions/36938/garbled-text-using-serial-to-usb-connection

Posted
43 minutes ago, broodwich82 said:

I do note that FriendlyElec sells a USB-serial adapter which claims to be based on the "CH340T" but the one I've got isn't the exact same PCB.


Those are the best I have around and they do work fine. I have a few of others and they do behave on 1500000 like this sometimes:

 

Spoiler

[15807.315362] pl2303 ttyUSB4: pl2303 converter now disconnected from ttyUSB4
[15807.315373] pl2303 1-2.4.4.3:1.0: device disconnected
[15823.450316] usb 1-6.4.3: new full-speed USB device number 23 using xhci_hcd
[15823.676040] usb 1-6.4.3: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 4.00
[15823.676043] usb 1-6.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[15823.676044] usb 1-6.4.3: Product: USB-Serial Controller
[15823.676045] usb 1-6.4.3: Manufacturer: Prolific Technology Inc.
[15823.723094] pl2303 1-6.4.3:1.0: pl2303 converter detected
[15823.779329] usb 1-6.4.3: pl2303 converter now attached to ttyUSB4
[15829.254706] pl2303 ttyUSB3: error sending break = -32
[15829.757763] pl2303 ttyUSB3: pl2303_get_line_request - failed: -32
[15829.906777] pl2303 ttyUSB4: pl2303_get_line_request - failed: -32
[15829.936767] pl2303 ttyUSB4: pl2303_get_line_request - failed: -32
[15845.725557] usb 1-6.4.3: USB disconnect, device number 23
[15845.726068] pl2303 ttyUSB4: error sending break = -19
[15845.726210] pl2303 ttyUSB4: pl2303 converter now disconnected from ttyUSB4
[15845.726221] pl2303 1-6.4.3:1.0: device disconnected
[15848.622353] usb 1-6.4.3: new full-speed USB device number 24 using xhci_hcd
[15848.851939] usb 1-6.4.3: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 4.00
[15848.851941] usb 1-6.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[15848.851943] usb 1-6.4.3: Product: USB-Serial Controller
[15848.851944] usb 1-6.4.3: Manufacturer: Prolific Technology Inc.
[15848.899994] pl2303 1-6.4.3:1.0: pl2303 converter detected
[15848.956026] usb 1-6.4.3: pl2303 converter now attached to ttyUSB4
[15861.174369] pl2303 ttyUSB3: error sending break = -32
[15861.705433] pl2303 ttyUSB3: pl2303_get_line_request - failed: -32
[15861.876430] pl2303 ttyUSB4: pl2303_get_line_request - failed: -32
[15861.906431] pl2303 ttyUSB4: pl2303_get_line_request - failed: -32

 

 

Posted
1 hour ago, Igor said:

Those are the best I have around and they do work fine.

 

I'm going to try to order one through the current coronavirus situation and we'll see if it gets here. I'll probably test my existing one in a loopback config sooner or later, too.

Posted
On 3/15/2020 at 11:25 AM, broodwich82 said:

My serial interface is a USB to serial device which was known working properly before my friend mailed it to me. Currently I'm suspicious that I have something configured wrong and that the USB dongle is probably fine. But that's just my best guess.

 

Counter intuitive - don't use flow control...

 

With Windows and USB-UART connectors - I've found that true FTDI is best, Prolific chips - there's a lot of clones out there that don't work well.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines