firmware icon indicating copy to clipboard operation
firmware copied to clipboard

Feature request: Add ability to change speed/payload type via CLI for serial plugin

Open D4rk4 opened this issue 3 years ago • 9 comments

Please add the ability to change speed via meshtastic CLI. It's needed for example to connect the Brother EP-44 typewriter as a messenger device to a meshtastic network. Old serial printers like this EP typewriter can operate at 110,300,1200 baud rate (common is 300 bps). So we need an easy way to change the baud rate without rebuilding firmware. Also will be fine to have the ability to reconfigure port payload type (set PortNum_TEXT_MESSAGE_APP).

D4rk4 avatar Feb 20 '22 18:02 D4rk4

Good idea.

Note: The speed should be selectable as an enum.

mc-hamster avatar Feb 20 '22 18:02 mc-hamster

I went ahead and assigned this to myself to work on since I'm already eyes deep in the serial plugin. This should be achievable by release of the 1.3.x breaking release.

RicInNewMexico avatar Mar 01 '22 04:03 RicInNewMexico

Any progress?

D4rk4 avatar Apr 12 '22 15:04 D4rk4

Any progress?

It’s much more configurable now in 1.3 and will be available when it’s in public alpha.

mc-hamster avatar Apr 12 '22 16:04 mc-hamster

@mc-hamster related to your pull (#1329), it's not possible to set the speed to 300 or 1200, the minimum supported speed by firmware, for now, is 2400...

D4rk4 avatar Apr 19 '22 00:04 D4rk4

@D4rk4 Feel free to raise a PR adding the additional enum values

sachaw avatar Apr 19 '22 01:04 sachaw

baud rates for serial module in 1.3

case baudDefault = 0
case baud110 = 1
case baud300 = 2
case baud600 = 3
case baud1200 = 4
case baud2400 = 5
case baud4800 = 6
case baud9600 = 7
case baud19200 = 8
case baud38400 = 9
case baud57600 = 10
case baud115200 = 11
case baud230400 = 12
case baud460800 = 13
case baud576000 = 14
case baud921600 = 15

garthvh avatar Sep 11 '22 13:09 garthvh

While we're at it, can we hook the second part of the request (Also will be fine to have the ability to reconfigure port payload type (set PortNum_TEXT_MESSAGE_APP).) to the serial plugin mode settings? Right now we only have simple, default (the same) and proto (not wired yet). That would be low hanging fruit and a good first issue, though it requires a proto change / addition.

caveman99 avatar Sep 12 '22 06:09 caveman99

While we're at it, can we hook the second part of the request (Also will be fine to have the ability to reconfigure port payload type (set PortNum_TEXT_MESSAGE_APP).) to the serial plugin mode settings? Right now we only have simple, default (the same) and proto (not wired yet). That would be low hanging fruit and a good first issue, though it requires a proto change / addition.

We should get the protos in, as we need to freeze them for real with the release of 1.3.41

garthvh avatar Sep 12 '22 13:09 garthvh