We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Serial output is not working properly



  • I tried that to see if it will work, but the same problem happens where it only reads as \xff for every byte when the baud rates match.



  • @leviathan33
    Can you show your Python code part for reading data?



  • instance = Serial()
    serial_port = instance.get_serial232_path()
    mySerial = serial.Serial(port = serial_port,
    baudrate = 9600,
    parity = serial.PARITY_NONE,
    stopbits = serial.STOPBITS_ONE,
    bytesize = serial.EIGHTBITS
    )
    while True:
    pby_read_byte=mySerial.read(10)
    #print(bytes(b^255 for b in pby_read_byte))
    print(pby_read_byte)

    The instance and serial port parts are based on the actual device it's on. I have tested this code and it can print serial outputs. Also I have tried changing the baudrate of both this and the omega2lte, and when they match it only outputs \x00 (I also printed the inverse when debugging and I mixed up what order I printed them in, so I was wrong when I said it was \xff). I tried testing the board by using screen and it worked when communicating with itself, but when I tried using it to communicate with another device it still only output \x00. Does this not use RS232 or something?



  • root@OpenWrt:~# python3
    Python 3.10.7 (main, Nov 17 2022, 16:38:42) [GCC 11.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import serial
    >>> s = serial.Serial()
    >>> s.get
    s.getCD()            s.getCTS()           s.getDSR()           s.getRI()            s.getSettingsDict()  s.get_settings()
    >>> 
    

    On my OpenWrt 22.03 on Omega2S+, the serial port default instance has onle these methods with get_ prefix.
    That means, the sthandard PySerial installation on Python3 doesn't have the method.
    What OpenWrt distribution are you using?
    Can you explain



  • The device I'm reading it from isn't an Onion device, that's why I clarified that function was for that device specifically, and I have tested that read method when attached to other non-onion devices, and it can read RS232 input. I did check the onion device I have, and those are the methods it has for serial that start with get too. It is worth noting that if the onion board is communicating with itself, it can read just fine.



  • I think this forum is for Onion Omega2 devices.
    For your issue, it's more related to that specific device.
    There are other places that you can post the issue.



  • I don't think the problem is with the other device, considering I have tested it with other serial devices and it works fine. Similarly, I have another device that can take serial input which does not work properly with my omega2lte board (that device doesn't display input data that isn't in the correct format, which is why I have to use the other thing to troubleshoot). Is there some reason why it might have trouble sending to other devices in general? The only thing I can think of is if it isn't using RS232, and if that's the problem, is there a way to get it to transfer with that protocol?



  • So, what is the OpenWrt version on your Omega Lte?



  • I don't know exactly. I looked up how to find out, and it said to run
    cat /etc/banner
    which just shows the startup banner. The banner says Ω-ware: 0.3.3 b251 but I'm not sure what part of that, if any, is the version



  • Post the result of uname -a.



  • Linux Omega-81DD 4.14.81 #0 Fri Jun 4 20:35:27 2021 mips GNU/Linux



  • Can you test the 232 port with OpenWrt 22.03 latest release?



  • @leviathan33 @DumTux

    For the version information: cat /etc/openwrt_release
    For Onion firmware version: onion os version



  • The OpneWRT version is 18.06-snapshot

    The Onion firmware version is v0.3.3 b251
    And the onion os version is 1.0.6-1



  • I have tested the serial output with the echo command with the most recent version of OpenWRT, and it has the same problem, so the problem doesn't seem to be a problem with the LTE OS



  • In that case, it is the Hardware issue.
    You can go back to LTE os image.

    I saw no RS232 port on LTE board.
    How did you add the 232 transceiver?
    Do you have sketch or schematics to show here?



  • Well that would be the problem, I was using the serial port. However, the device I was originally trying to use doesn't need RS232 (it can be connected directly to an arduino uno). I'll convert the signal to RS232 for the purposes of debugging, and hopefully that will illustrate how to solve the problem. Will installing the OpenWRT 18.06 let me get the LTE OS back, or do I have to find it specifically some other way?



  • I am using the UART1 of Omega2 - /dev/ttyS1 for GPS module communication with 115200bps.
    It is 24/7 running for more than 3 weeks constantly.
    Working with no error.
    So I cannot guess what will be your issue on LTE board.



Looks like your connection to Community was lost, please wait while we try to reconnect.