Virtual Device Serial0 Will Start Disconnected

192 views
Skip to first unread message

Hildegard Mccauley

unread,
Aug 3, 2024, 2:44:01 PM8/3/24
to contvagicon

如图报错The virtual printing feature is globally disabled on this system, and will not be enabled for...
Virtual device 'serial0' will start disconnected.

When you start Unix/Linux on a PC, the default input device is the attached keyboard (PS/2 or USB), and the default output device is the available VGA /HDMI / Display port of the PC. This is called in Unix-speak the default console, or system console.During boot, the kernel sends its boot messages, like device detection, to this default console, and at the end of the boot processes, fires a "login: " prompt on this console. (Actually it spawns multiple login prompts, you can switch between them with Ctrl-alt-F1, Ctrl-alt-F2, etc ... )

Now it is perfectly fine to send the boot messages and start a login prompt on something else. For instance the Linux Kernel has a netconsole feature, to send the boot messages over the network to another Linux computer. It is also possible to send a copy of the boot messages, and start a login prompt on the serial port of the PC. We get then what is called a serial consoleIf you connect to this serial port any computing device with a terminal emulation program, it will be possible to work on the Linux PC as if you were using the PC locally in text mode. The requirements of the terminal emulation are quite low, so you could use HyperTerminal on a Windows PC, Minicom on Linux or even an old Atari ST with the appropriate program.

In proxmox things work exactly the same, but with emulated devices. NoVNC/ VNC Applet connects to your VM keyboard and VM VGA display and displays the stuff you would expect from a real PC on a VGA display with a locally attached keyboard.Now we can also configure our VM to have an emulated serial port, and instruct the OS, to send a copy of the boot messages / start a login prompt on the emulated serial port.Once this is configured it will be possible to connect from the host (ie the server running pve) using a terminal emulation program, which is handily builtin in the Proxmox Qemu Manager.

I originally started developing with the LPC2368 beta unit on a Windows XP machine. All was working fine with the Windows serial port driver. When the new (current) driver was released, I started using that and it wored fine. I then added a Vista machine to my office. I then loaded the new drivers onto the Vista machine and all worked fine.

I then tried to run the LPC1768 on my XP machine, and again found I had to re-load the Windows Serial Port Driver. When I did, Windows reported that there was a problem and could not start the serial port driver. I tried re-installing it several times, both from the website as well as from a local drive copy. Finally, I went back to my LPC2368 mbed. Re-installed drivers, and everything works fine. Going back to the LPC1768, it fails. It always says the driver could not start. I have uninstalled, re-installed, etc., but to no avail.

I wonder if this is some hangover from the old driver getting picked up when you put in a new device. However, we tested this all very thoroughly, including re-installing and upgrading, so it feels like a strange interaction/history thing.

If all looks in order, I'd then try un-installing both of these drivers (serial/composite), selecting to remove the software. But then also check if you disconnect/reconnect, that an old serial driver is not recognised. If it is, remove that too using the same process. Do this for both boards and you'll be basically back to scratch. Probably worth a reboot to ensure windows is not holding anything, then try re-installing.

Please note down every step you do if possible. We haven't seen a problem yet (apart from a problem downloading the driver mentioned in ), so capturing the process may help if anyone else gets a similar result.

Phil suggested it could be that windows is trying to allocate it to a COM port that is already in use. That would cause it to fail with Code 10. It seems sometimes Windows gets an inconsistency in it's registration of what has already been allocated.

I then tried to run a program that writes out to the port. This program works on the Vista machine (with either the LPC1768 or the LPC2368, as well as on the XP machine (but only with the LPC2368). SO, while I don't get the Windows error, the serial coms doesn't work on the XP machine with the LPC1768.

Sounds like the LPC1768 on XP is still coming in on some low numbered port, and I'm worried there may be a clash still if windows is confused. With the LPC1768 plugged in to XP, try changing the COM port to e.g. COM25 or some other higher one. Then unplug-replug and check it comes in OK (i.e. on COM25, and not code 10). Then (re)start teraterm and see if you get life!

For sanity, it might also be worth ensuring the program on the mbed really is running - e.g. flashing an LED at the same time. This would confirm e.g. the wrong image hadn't ended up on the wrong board!?! But as you have had the board working with Vista, it is unlikely to be this. And checking teraterm is restarted.

The good news is...I have it working. I had moved the port to many places, but had to keep it between COM1 and COM16, as Terraterm only goes up to port 16. I finally chose COM9, and it works fine now. I am not sure why. The LPC2368 works fine on COM3, but when the LPC1768 was on that one, it didn't.

I have a problem with Windows not recognizing one of my 3 mbed units as a serial device. It works okay otherwise (CAN functions, SPI functions, analog in functions, pwmout functions, lED's flash...). Tried all the changing of ports, swapping over of usb leads, rebooting of machine, running just one mbed, or two (my normal configuration as I'm working on CAN bus controlled lighttubes for an art installation) or three even, but one of them (always the same one) just is never recognized - is there anything more I can try (other than what's on this page) or do I have a faulty unit?

Dave, try this method. It's probably not your case since you do have mass storage working but just in case...
Also, open Device Manager, choose View-Devices by connection, and check whether you have this kind of picture:

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.

Can anyone provide me some basic Serial config and write/read samples for developing a custom intgeration? I would like to communicate via Serial port with an Arduino based board. I really would like to know how I can simply write and read to serial port from my custom integration.

This will be connected to my Raspberry Pi and shows up as a virtual com port. To communicate with this USB dongle, I need to implement serial read and write commands. I would like to make my own custom HA integration for this. I already looked at: Link. But I think here it is not clear how to write to serial port?

Hi Marcelh,
could you tell me, how you reach the sending and receiving data on the Serial port?
I have exactly the same issue like you - I want my own integration for my own device, which communicates with UART.
I have started with this example integraion
detailed_hello_world_push
and try now to customize this for me with serial communication.
I would be very happy, if you (or someone) could help me!

And do nothing.
I've also tried to enter in programming mode with AT command. I've used SoftwareSerial library to define another pins for RX and TX, then send commands from SerialMonitor to Arduino -->bluetooth and vice versa. Not "ok" at serial monitor.

Also I tried to connect the TX pin of the bluetooth to my pc microphone jack, and common GND. Is silence till I press a key on android, then begin a sound like a PWM for one second then stops. I'am a beginner but serial data of only one char should be transmitted under a second. (1/9600)*8 sec. Why keep beep so long? maybe the bluetooth is faulty.

First thing I tried was that tutorial and yes, the usb cable was disconnected. I used an external power supply on arduino vcc pin.
Work with serial monitor, not work with android monitor at any baudrate I test it.

What I don't know is if you have stuffed something up by sending an AT command. Clearly, the steady LED means there is no password problem and, if you check all speeds, I guess there isn't much else to go wrong there.

The power supply is the last obvious villain. Disconnect bluetooth and check the code is OK with serial monitor. Then connect bluetooth with power from USB cable. Turn on serial monitor, just to make sure there is no stumble at the Arduino end.

If I connect bluetooth to rx and tx at arduino, then I plug the usb cable and start the SerialMonitor on the pc, the data from bluetooth is send directly to pc.without any code needed on arduino? just like arduino will play as a convertor from serial to usb
I've tried this thing with all baudrate I could find in serial monitor list and nothing again.
Also I connected the bluetooth to Arduino Leonardo this time. Same story with no glory.

I had problems with my HC-06 working with my phone but not my tablet, but I'm not keen to blame the HC-06 as I don't think mine would pair, while I understand yours does. My tablet was fine with an HC-05

You're not alone. Literally the same problem. Well, originally, it was working just fine and handling little LEDs and buzzers, etc. Sample project. Then without changing any code or wiring it soon would not accept commands... That was a week ago. Took a break with some LCDs and servos and such, cane back and now I'm where you are. My HC-06 is not connecting with my Android or rarely if it does will not accept commands. It may be a cheap module, but I'm still wondering. Wiring and the Arduino code is all the samples provided by the guy who wrote the android-Bluetooth app for the Arduino, TechBitar (?).

c80f0f1006
Reply all
Reply to author
Forward
0 new messages