No response in Serial Config Tool

I am attempting to change the sampling interval.

I understand that this can be done using the configuration commands at Configuration — OpenEnergyMonitor 0.0.1 documentation and that these should be sent via the Serial Config Tool in my local EmonPi(v1) EmonCMS.

I am running the CM firmware, which I have just re-flashed. The flashing process worked and confirmed that the following are correct to communicate with the Atmel MCU:
Using Port : /dev/ttyAMA0
Overriding Baud Rate : 115200

When I set the device and baud rate to match in the Serial Config Tool and start the serial monitor, I get “Waiting for configuration from device…” and the log window shows nothing beyond “Loading configuration, list (l) command sent:”.

I am bamboozled and a search of the forum and the ‘net suggests this should just work!

Help!!

Flashing is always performed at 115200 baud, whereas “normal” serial communication may be at a different baud rate chosen by the writer of the sketch. The correct value will be either 9600 or more likely 38400.

If you download and look at the “C” source file for the software you downloaded, the baud rate is in there.

When emonhub is running, what baud rate does that use?

[edit]
A quick test - I was on very old firmware and have just updated to the latest CM firmware.

Before update, I could connect via serial at 38400, after update it connected at 115200.

To connect from the command line/SSH you can do this (stop emonhub first from the UI). Install picocom

sudo apt install picocom
picocom /dev/ttyACM0 --echo --baud 115200 --omap crcrlf,crlf

But I think the data format is different with the CM firmware so you need to update the emonhub configuration for it to work.

[edit2]
The serial config tool isn’t working for me either :frowning:

@Robert.Wall Sorry - I am a numpty, I knew that the AVR setup worked like that. Lost in my own confusion!

@borpin Yeah I had 115200 set for the interfacer since I updated to CM some time ago so I thought the config tool should have been straight-forward with the same port/baud. Then I got lost in the rabbit hole! In a sense it is pleasing that you can’t get the config tool to work either.

I can confirm the config commands work for me using picocom for as recommended by Brian, except with /dev/ttyAMA0

Thanks for your help!

1 Like

Also, at some point (undocumented as far as I’m aware), Trystan has changed the age-old convention of cr+lf to terminate the line to just one of those, and I cannot remember which it is.
And like Brian, I have never got the Serial Config Tool to work.

1 Like