Unable to read data from rx & tx, plus permissions issue.

AdamMiltonBarkerAdamMiltonBarker New Member Posts: 20

I been trying to receive data from rx and tx, something I have never had any issues with on any other board. First of all I had permissions issue to connect to ttyS4 (due to NCS2/OpenVINO not able to be run with sudo) so I added my user to dialout group, this issue was resolved.

I have an ESP8266 12f connected to 5v (also tried 3.3) of the board and rx tx. When the ESP receives data from an MQTT broker it prints the data to serial. I am unable to receive this data on the UP2.

After trying to resolve myself I have followed:

https://forum.up-community.org/discussion/comment/9795
https://forum.up-community.org/discussion/1883/i-installed-ubuntu-16-04-2-desktop-amd64-iso-still-no-serial-port-working
https://forum.up-community.org/discussion/3649/input-output-error-accessing-dev-ttys1-on-ubuntu-18-04

Now I have permissions issues again, the changes here changed the group from dialout to tty and owner root, I have added my user to both root and tty and I still get permissions issues.

When I run the program as root (sudo) the NCS2 and OpenVINO will not work, but I can access serial (it seems) however, I am back to the beginning, when data is sent to the ESP8266, nothing comes through to the UP2. All I receive is empty bytes b''.

Please could someone suggest a quick fix for this. Thanks in advance.

Tagged:

Comments

  • AdamMiltonBarkerAdamMiltonBarker New Member Posts: 20
    edited June 26

    Hi sorry to bump, can anyone suggest why this is not working ? To clarify RX of ESP to TX of UP2, TX of ESP to RX of UP2. UP2 never receives the data. This is pretty basic stuff not sure why it would not be receiving the data.

  • AdamMiltonBarkerAdamMiltonBarker New Member Posts: 20

    Bump. Anyone ?

  • DCleriDCleri Administrator, AAEON Posts: 1,058 admin
    edited June 30

    We are currently investigating an issue related to UART on UP Board and Kernel 5.0.

    Can you confirm your system setup both hardware and software?

    • Diagram or drawing of the UART connection to the ESP
    • Ubuntu version: 16.04 or 18.04?
    • Kernel installed on UP Squared: uname -a
  • AdamMiltonBarkerAdamMiltonBarker New Member Posts: 20
    edited July 3

    @DCleri said:
    We are currently investigating an issue related to UART on UP Board and Kernel 5.0.

    Can you confirm your system setup both hardware and software?

    • Diagram or drawing of the UART connection to the ESP
    • Ubuntu version: 16.04 or 18.04?
    • Kernel installed on UP Squared: uname -a

    Sorry I did not receive a notification you had replied.

    • Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-37-generic x86_64)
    • Linux emar 4.15.0-37-generic #40~upboard06-Ubuntu SMP Wed Nov 27 11:29:44 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

    Is a diagram needed the connections are simple?

    ESP VCC -> UP2 5v (pin 2) also tried 3.3v (pin 1)
    ESP ground -> ESP ground (pin 6)
    ESP RX -> UP2 TX (pin 8)
    ESP TX -> UP2 RX (pin 10)

    Thank you for the response. Let me know if a diagram is really needed.

  • AdamMiltonBarkerAdamMiltonBarker New Member Posts: 20

    ESP ground -> ESP ground (pin 6) was obviously ESP ground -> UP2 ground (pin 6) :)

  • AdamMiltonBarkerAdamMiltonBarker New Member Posts: 20

    @DCleri hi mate is there any update to this ?

  • DCleriDCleri Administrator, AAEON Posts: 1,058 admin

    Is the ESP8266 powered by battery or USB?
    The V+ shouldn't be needed if the ESP board is already powered: just rx, tx, ground.
    If not of course all the 4 pins must be connected and V+ should go to 5V.

    About the serial configuration:
    Please try to use minicom on UP Squared and
    Press Ctrl+A > O > Serial port setup
    A - Serial Device : /dev/ttyS4
    B - Lockfile Location : /var/lock
    C - Callin Program :
    D - Callout Program :
    E - Bps/Par/Bits : 115200 8N1
    F - Hardware Flow Control : No
    G - Software Flow Control : No

    Also on ESP the UART would need the same setting and make sure hardware flow control is disabled.

  • AdamMiltonBarkerAdamMiltonBarker New Member Posts: 20

    It is an ESP8266 12f, it is powered directly from the 5v of the UP2, I use this method on many of my projects I have a lot of experience with ESP and never had issues before with serial, it normally just works out of the box.

    Thanks I will try your suggestions for Minicom and will keep you posted, we actually completed the project on a Raspberry Pi as Tensorflow 2 is not supported on UP2 either so this is not a priority at the moment, but I will let you know when I have tested.

    Thanks for the reply.

  • GMNGMN New Member Posts: 9

    Has this been resolved? I have a similar issue where I cannot write to the UART0 via port address 0x3F8. As an architecturally defined COM port, I have not had this issue with any other x86 box. I have wired up the 10-pin connector (RX,TX,GND) to a FTDI serial to USB converter. This works fine while in UEFI, but when my OS takes control, I cannot access the port via 0x3F8. No luck so far with ideas from the forum, so I wonder if your serial port issue was solved?

  • DCleriDCleri Administrator, AAEON Posts: 1,058 admin

    I am not sure it is a similar issue and, as I haven't heard any reply I guess the issue above was solved.

    In order to provide you support, please open a new topic and explain your issue in detail with the system setup (kernel, bios, hardware, software), steps followed and issues encountered

  • AdamMiltonBarkerAdamMiltonBarker New Member Posts: 20

    No the issue wasn't resolved. I did reply: " we actually completed the project on a Raspberry Pi as Tensorflow 2 is not supported on UP2 either so this is not a priority at the moment, but I will let you know when I have tested."

  • DCleriDCleri Administrator, AAEON Posts: 1,058 admin
    edited August 28

    That is correct with the pre-built binaries, but it can be sorted building tensorflow 2.0 from source and disabling certain CPU extensions not present on Atom/Pentium/Celeron processors, also replied on the relevant thread for this topic: https://forum.up-community.org/discussion/4383/up-squared-supports-tensorflow-2-0#latest

Sign In or Register to comment.