Skip to content

Navigation Menu

Sign in
Sign up

ser2net: Setting break failed #1439

abeezarburhan started this conversation in General
Discussion options

Hi

I have an odroindN2 board. I have flashed the sd card using the sd mux - ubuntu 22.-4 ( Login/password: root/ubuntu).
I have the serial port connector.
I am able to connect to serial port using minicom however I have a failure when wheing labgrid-client -p <PLACE> console

Error Message:

labgrid-exporter:

ser2net[1009910]: serialdev: Setting break failed on /dev/ttyUSB0, try adding the nobreak option

labgrid-client:

(labgrid-venv) dir_labgrid$ labgrid-client -p <PLACE> console
connecting to NetworkSerialPort(target=Target(name='example-place-1', env=None), name='USBSerialPort', state=<BindingState.bound: 1>, avail=True, host='myhost', port=45173, speed=115200, protocol='rfc2217') calling microcom -s 115200 -t myhost:45173
connected to 127.0.1.1 (port 45173)
Escape character: Ctrl-\
Type the escape character to get to the prompt.
exiting
(labgrid-venv) dir_labgrid$

conf.yaml:

example-group-1:
 location: "my_desk_1"
 USBSerialPort:
 match:
 ID_PATH: pci-.&checktime(0000,00,14,':').0-usb-0:3:1.0
 speed: 115200
 USBSDWireDevice:
 match:
 ID_PATH: pci-.&checktime(0000,00,14,':').0-usb-0:4.2

I am not sure if I need to update the Shell driver to be able to match the prompt/login/password.

Any pointers appreciated

You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

Hi,
we discovered the same issue with one of our devices after upgrading to the new version (we stick a long time with v0.3.3 and old ser2net). With the old version the device console was just working. With the new version (v24.0.0 with ser2net 4.3.4) we got the same error message.

Our solution for now was the following hardcoded patch which adds the suggested nobreak option in the commandline.
I'm not sure if nobreak should really just be set always or if there should be some resource parameter to set custom options for ser2net?

diff --git a/labgrid/remote/exporter.py b/labgrid/remote/exporter.py
index ce173514..f30d9ee5 100755
--- a/[labgrid/remote/exporter.py](https://git.missinglinkelectronics.com/missinglinkelectronics/labgrid.git/tree/labgrid/remote/exporter.py?h=mle/tb/serial-nobreak&id=73f7fd797b47c6dc19dfb075ec726352abc596d9)
+++ b/[labgrid/remote/exporter.py](https://git.missinglinkelectronics.com/missinglinkelectronics/labgrid.git/tree/labgrid/remote/exporter.py?h=mle/tb/serial-nobreak&id=f8edf0c52ec07c051e90febf81f44d1b51f0f4c9)
@@ -253,7 +253,7 @@ class SerialPortExport(ResourceExport):
 "-Y",
 f"connection: &con01# accepter: telnet(rfc2217,mode=server),tcp,{self.port}",
 "-Y",
- f' connector: serialdev(nouucplock=true),{start_params["path"]},{self.local.speed}n81,local', # pylint: disable=line-too-long
+ f' connector: serialdev(nouucplock=true),{start_params["path"]},{self.local.speed}n81,local,nobreak', # pylint: disable=line-too-long
 "-Y",
 " options:",
 "-Y",
You must be logged in to vote
3 replies
Comment options

Sending breaks is an important use-case (e.g. to trigger the "magic sysqr"), so we shouldn't disable it. Some time back, there was a fix in ser2net related to this: cminyard/gensio#39

Perhaps this is a regression in ser2net/gensio?

Comment options

True. As I understand it the option just disables the automatic enable of break at startup. So yes as in the linked bug it should just not error out. I will check also if there is some newer version of ser2net available in which this works.

Shall this be moved to a Issue?

Comment options

My idea would be a modification like this one (we likely will use this internally for now to use the equipment), however untested for now, just an idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /