M5Paper suggestion for multiple serial capture



  • Im trying to think of the best way for the M5Paper to have 4 serial connections/ports to send text commands and receive responses to/from 4 TTL debug headers on some HW I am developing.

    Woiuld it be easier to wire the rx/tx/gnd rom each to GPIO (and ground) on the M5Paper (how would you use these as 8bit serial input - is there a library to bit bang serial bytes?)

    Or could I use 4 Atom Lites or something, one for each header, and open 4 bluetooth connections from the M5Paper to them and use those bluetooth connections as com ports (is this possible?)

    Or are there grove modules that would work as a virual serial port?

    Just brain-storming here. The goal is to have 4 two-way serial connections for commands/responses at 115.2Kbaud, and to record the responses on the e-paper display.

    Any suggestions/advice would be welcome.

    PS: Also, if it would be easier to do this on a CoreS3, ideas how to do that would be welcome too



  • @mtylerjr

    0_1688348448165_4a685c0c-f94a-48fc-8868-0b35778a7d54-image.png

    According to this block diagram, Paper provides three ports for use, but it should be noted that PortA has internal pull-up resistors, esp32 itself provides three hardware serial ports, serial port 0 is commonly used for downloading and log printing, if you need to use serial port 0 as a normal serial port, it is better to disable all log output, UART1 and UART2 can be used for PortB and PortC, the rest can be done using ble serial or software serial? Just for reference :-)



  • @iamliubo Thanks for that info!

    Ive verified that the 4 pin debug headers on my HW actually provide enough current to power up an Atom S3 Lite via VCC/Gnd.

    No my question is (although now maybe this is in the wrong area...) can the Atom S3Lite be configured as a bluetooth slave and wait for other devices to connect to it?

    Ideally I would like it to sit there advertising itself once it powers up, and then manually connect to it from another bluetooth device. And hopefully when the S3lite detects a BT connection has been made to it, it will begin to pass through serial data from the other two pins as RX/TX,

    Is that possible, do you know?



  • @mtylerjr

    can the Atom S3Lite be configured as a bluetooth slave and wait for other devices to connect to it?

    ESP32-S3 not support BT but BLE, and I think it's not slave, you can init AtomS3Lite to BLE server, and here has a example BLE UART

    Which method do you want use?
    0_1688353628141_15f51df0-e40a-4071-b0fb-54ce387a0763-image.png



  • @iamliubo The first scenario



  • Did you ever think about multiplexing? One Header as Serial I/O and one as 2-Bit control for an external 1:4/4:1 MUX. The SN74LV4052A for example provide two1:4 paths. You can use one for the RX, one for the TX signals.
    Your program need to select the channel by two bits and then do the normal UART stuff as usual.



  • @holofloh I thought about it. The devices are not always that near near each other. Having them isolated is a bonus, also.

    I am trying with my Atom S3 (not the lite) because I think I blew up my s3-lite.

    UIFLOW2 has some bugs in the existing BLE code, on the AtomS3 - basic things like 'there is no "is_connected"...'

    Im not sure if there is enough implemented in UIFlow2 yet for actual BLE use with an Atom S3