-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change baud rade in embedded-serial service (RDT-227) #95
Comments
Thanks for the fast response! I will check this out One more question, I'm using Windows 10 with FT232 and CP210x UART-USB converter. At first I tried to use one serial converter with RX and TX shorted.
This didn't work, Next just to make sure that it is not fault on the hardware side I prepared following setup:
The software side is the same. In both cases all I get is:
However, in COM7 I can see Any ideas what I might try to make the dut.expect (the RX side) work? |
Unaware of why the first try failed, but for your second example, This is a multi dut case, you may try this code block import pytest
@pytest.mark.parametrize(
'count, port',
[(2, 'COM7|COM12')],
indirect=True,
)
def test_echo_tcp(dut):
com7 = dut[0]
com12 = dut[1]
com7.write('aaa')
com12.expect('aaa') # will decode automatically related docs: https://docs.espressif.com/projects/pytest-embedded/en/latest/key_concepts/#multi-duts |
Good to know that the framework supports multiple duts! About the second test. I'm writing using I'm just trying to figure out why I can't receive anyting using Just to be on the same side: My problem is that I can write to the COM portbut I'm unable to receive anything (may be I should open another issue about that) PS. I made small mistake in my last comment, I'm using dut.write (b'aaa') not dut.write ('aaa') |
dut.write (b'aaa') and dut.write ('aaa') should be the same.
sure. that would be better. In the new issue, you may also attach a few additional info, like:
and back to this issue, does the |
The ESPBAUD workaround does not work. I'm using Windows 10 and set the environmental variable in System variables (I also tried to set the env variable using I created new issue about the problem with dut.expect() - #97 |
@hfudev i think that's probably because ESPBAUD is only taken into account in pytest-embedded-serial-esp for flashing, but not used in pytest-embedded-serial for the actual data exchange over serial (not that it's supposed to be used there...) |
Maybe patching the value in Serial class can be a workaround for the time being. For example, in conftest.py: from pytest_embedded_serial.serial import Serial as ESerial
ESerial.DEFAULT_PORT_CONFIG['baudrate']=921600 |
@igrr Thanks, this workaround works! |
Hi,
Cool project, especially for integration testing on embedded systems.
I'm just checking it out but I'm not that familiar with python. How do I configure the baud rate for embedded-serial service?
The text was updated successfully, but these errors were encountered: