Serial Module Question

Greetings. Has anyone had success using the Serial Module? I can’t seem to get mine to work. All I get is garbage on the screen. Any help would be greatly appreciated. Jim

Can you provide any details about your setup? What device are you connecting and how? I presume this is over UART serial. What are your settings between devices? The module calls out 38400 8N1 and I presume that you’ve set the sending device to these settings.

Thanks for the reply…

I’m using a USB to Serial converter (3.3v) connected to the T-Beam
exactly as described in the web documentation…I’m using PuTTY as the
terminal program with 38400, N, 8, 1 settings…It behaves like the
baud rate is incorrect…I get garbage on the terminal screen…I’ve
tried other baud rates to no avail…I’m wondering if anyone has made
this work and can tell me what I’m doing wrong…Thanks…Jim

Well, turns out the documentation might not be accurate. I found this when I got the same garbage after trying your setup:

Here’s my setup with an FT232 USB to FTDI module connected to the 16/17 pins and ground. Putty is set to 921600 81N.

serial

Of note, my device manager shows two COM ports with this module. The USB Serial doesn’t seem to work but the USB-Enhanced-Serial does.

If I set the baud to 115200 and reset I can see the boot messages (to verify COM works).

Thank you David…This was very helpful…I think my USB to Serial
converter may not be up to the task…It is a CH340…I will try a FTDI
in enhanced mode…I should also mentioned I tried this on both my
Raspberry Pi and a Windows 7 Pro machine with no difference…Jim

1 Like

Are you looking for accessing the debug messages or interfacing a separate device with Meshtastic? The serial module is for the latter.

If you’re intent is to connect another device to Meshtastic with the serial module, please share more of your setup and we can work it out.

I may be missing something but I don’t see any reason to run the serial
port at 921600 baud…It limits the converter hardware/software you can
use and seems excessive for 240 characters of text per transmission…I
would like to see it run slower…Jim

David…Can you run the same test on a T-Beam v1.1 board?..Jim

Hi. I’m just interested in monitoring RF traffic and maybe sending messages with a keyboard. I have Heltec v2.1 and T-Beam v1.1 radios with PuTTY running on a Raspberry Pi and Windows 7 Pro. Thanks Jim

Alas, I don’t have a T-Beam. And definitely share more about your setup. I realized that my test wasn’t using the serial module (I thought I was). I’m going to enable the serial module properly and connect it to a pico and try to send some data to the mesh node.

I’m using a TTGO LORA32 V1.0 and/or a Heltec V2.

Question for @mc-hamster : what’s the difference between these two documentation sources?
https://meshtastic.org/docs/software/modules/serial-module (references default baud rate and pins but also build options)
https://meshtastic.org/docs/settings/serial-module (does not give baud rate or baud settings, references cli commands but no default or recommended pins)

OK…We can keep our discussion to the Heltec v2.1 board.

Here is my configuration for firmware 1.2.59

phone_timeout_secs: 900
ls_secs: 300
region: US
serialplugin_enabled: ‘true’
serialplugin_echo: ‘true’
serialplugin_rxd: 16
serialplugin_txd: 17
serialplugin_timeout: 15
environmental_measurement_plugin_screen_enabled: ‘true’
environmental_measurement_plugin_read_error_count_threshold: 5
environmental_measurement_plugin_update_interval: 15
environmental_measurement_plugin_recovery_interval: 60
environmental_measurement_plugin_display_farenheit: ‘true’
environmental_measurement_plugin_sensor_pin: 13

Well, this is bizarre.

I just reinitialized my Heltec board with these settings. Same as I did the last several attempts. Now it’s working. Baud is 921600 using the CH340 USB to Serial adapter. I don’t understand but I’m glad it works. Jim

3 Things.

  1. Performance is intermittent. I think it may have to do with boot order of devices.
  2. It does not work at all (yet) with the T-Beam v1.1 board.
  3. I think a review of the MODULES performance and documentation may be in order.

I am NOT an expert in any of this. I know enough to be dangerous. I appreciate all the work that has been put into this very attractive project. Thanks again. Jim

I have had no success with the serial plugin on the T-Beam v1.1 with this configuration.

location:
lat: 44.7695024
lon: -85.77247919999999
alt: 286

user_prefs:
phone_timeout_secs: 900
ls_secs: 300
region: US
serialplugin_enabled: ‘true’
serialplugin_echo: ‘true’
serialplugin_rxd: 35
serialplugin_txd: 15
serialplugin_timeout: 15
environmental_measurement_plugin_measurement_enabled: ‘true’
environmental_measurement_plugin_read_error_count_threshold: 5
environmental_measurement_plugin_update_interval: 15
environmental_measurement_plugin_recovery_interval: 60
environmental_measurement_plugin_display_farenheit: ‘true’
environmental_measurement_plugin_sensor_pin: 4

I’m also getting intermittent readings with the environmental plugin on the Heltec board. First reading is always good. Subsequent readings are always bad or “nan”. Tried moving sensor pin from 13 to 4 with no difference. Thanks Jim

These two modules are changing a lot from 1.2 to 1.3 and have not been tested much on anything other than a tbeam, wish I had a better answer but they are both going to be alpha quality for a few more months and there will probably never be complete 1.2 functionality or docs.

Understood…Again, a lot of this is not in my wheelhouse…

Now for some good news…Using the T-Beam v1.1 schematic, I identified
the correct values for the TXD and RXD pins…Use TXD 41 and RXD
40…They work perfectly…These are the only assignments you should
use…

I have not had the same success with the Heltec v2.1 board…While pins
16 and 17 are the correct assignments for the RX and TX pins
respectively, pin 16 (RXD) is also used as the OLED RST so I detect a
conflict here and the corresponding unpredictable results…

So, in short, I can verify proper results from the environmental plugin
and serial plugin modules in v1.2.59 software…I hope this helps…Jim

Clarification. I can verify proper operation and results for the T-Beam v1.1 only…Jim

I’m such an idiot. OF COURSE it’s going to be the same on the Heltec board. RXD 40, TXD 41. Clearly indicated on the board too. Works great now. Jim

I saw the same behavior when trying to use 16 and 17 as well then verified
it in code:
heltec variant.h

#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller

Regarding this:

Isn’t this the serial debug? I’m using that to read serial messages at the moment. How did you reconfigure to get those pins onto the Serial Module?

Again, this shows my ignorance on the subject and knowing enough
to be dangerous…Pins 40 and 41 connect to the UART on the ESP32
chip…Are you saying this is the serial debug and there is another one
in play?

1 Like