Canned message not working on TBean

Hello,

I am trying the Meshtastic, and I am very impressed. I am using a T-Bean, and the only thing I was unable to make work is the Canned-Message module.

I followed the webpage (Canned Message Module Configuration | Meshtastic) and this forum messages (Standalone device utilized with rotary encoder as input - #48), but with no success.

I tried version 1.3.41, and now I am testing with 1.3.44, but the problem continues.

When I move the encoder, nothing happens (and a few times it restarts). This is the configuration I am using:

meshtastic --set canned_message.enabled true
meshtastic --set canned_message.send_bell true
meshtastic --set-canned-message “Message 1|Message 2|Message 3|Message 4|”
meshtastic --set canned_message.allow_input_source “rotEnc1”
meshtastic --set canned_message.inputbroker_pin_a 33
meshtastic --set canned_message.inputbroker_pin_b 32
meshtastic --set canned_message.inputbroker_pin_press 15
meshtastic --set canned_message.inputbroker_event_cw UP
meshtastic --set canned_message.inputbroker_event_ccw DOWN
meshtastic --set canned_message.inputbroker_event_press SELECT
meshtastic --set canned_message.rotary1_enabled True

I also tried with there pins:
meshtastic --set canned_message.inputbroker_pin_a 14
meshtastic --set canned_message.inputbroker_pin_b 15
meshtastic --set canned_message.inputbroker_pin_press 13

On the main website it says the event press should be configured as KEY_UP, KEY_DOWN, and KEY_SELECT, but an error message appears:
Connected to radio
canned_message.inputbroker_event_press does not have an enum called KEY_SELECT, so you can not set it.
Choices in sorted order are:
BACK
CANCEL
DOWN
LEFT
NONE
RIGHT
SELECT
UP
LocalConfig and LocalModuleConfig do not have attribute canned_message.inputbroker_event_press.

What I am missing? Is there a new configuration name?

Thanks,

Eduardo Mendes

your configuration should work. Can you provide a serial debug log when you turn and/or press the rotary encoder.

Hi @caveman99, how do I get it?

Thanks

This is a few lines result of “meshtastic --debug”:

DEBUG file:mesh_interface.py _handleFromRadio line:490 in mesh_interface.py _handleFromRadio() fromRadioBytes: b’J\x17:\x15\x08\x01\x10\x0e\x18\x0f \rH\x01R\x07rotEnc1X\x01’
DEBUG file:mesh_interface.py _handleFromRadio line:492 Received from radio: moduleConfig {
canned_message {
rotary1_enabled: true
inputbroker_pin_a: 14
inputbroker_pin_b: 15
inputbroker_pin_press: 13
enabled: true
allow_input_source: “rotEnc1”
send_bell: true
}
}

All other lines do not appear to have a relation with Canned Message.

run meshtastic --noproto and reboot the device. there should be a substantial debug log.

Nice command!

I did it, and most of the time I press or rotate, nothing happens. Once this below appeared on the terminal, but still nothing happened (no message appeared on the screen or was sent):

??:??:?? 8 [Screen] Finished building frames. numframes: 2
??:??:?? 18 Rotary action
??:??:?? 18 [rotEnc1] Rotary event CW
??:??:?? 18 Rotary action
??:??:?? 18 [rotEnc1] Rotary event CCW
??:??:?? 20 Rotary action
??:??:?? 20 [rotEnc1] Rotary event CCW
??:??:?? 20 Rotary action
??:??:?? 20 [rotEnc1] Rotary event CCW
??:??:?? 20 Rotary action
??:??:?? 20 [rotEnc1] Rotary event CW
??:??:?? 20 Rotary action
??:??:?? 20 [rotEnc1] Rotary event CW
??:??:?? 21 Rotary action
??:??:?? 21 [rotEnc1] Rotary event CCW
??:??:?? 22 [Power] Battery: usbPower=1, isCharging=0, batMv=0, batPct=0
??:??:?? 30 [rotEnc1] Rotary event Press
??:??:?? 32 [rotEnc1] Rotary event Press
??:??:?? 32 [NodeInfoModule] Sending our nodeinfo to mesh (wantReplies=1)

Any idea?

@caveman99 I think it may have a relation with this:
meshtastic --set canned_message.inputbroker_event_press KEY_SELECT
Result:
LocalConfig and LocalModuleConfig do not have attribute canned_message.inputbroker_event_press

Did the configuration name change on the CLI?
When I set it to SELECT (meshtastic --set canned_message.inputbroker_event_press SELECT), and the press would act as the normal “user button” and change screens. That is the proto result:

??:??:?? 14 [rotEnc1] Rotary event Press
??:??:?? 15 [rotEnc1] Canned message event Select
??:??:?? 15 [rotEnc1] Enter state: POWER
??:??:?? 15 [Screen] Screen: Unpowered…
??:??:?? 15 [Screen] Screen: Powered…
??:??:?? 16 [rotEnc1] Rotary event Press
??:??:?? 16 [rotEnc1] Canned message event Select
??:??:?? 16 [rotEnc1] Enter state: POWER
??:??:?? 16 [Screen] Screen: Unpowered…
??:??:?? 16 [Screen] Screen: Powered…
??:??:?? 18 [rotEnc1] Rotary event Press
??:??:?? 18 [rotEnc1] Canned message event Select
??:??:?? 18 [rotEnc1] Enter state: POWER
??:??:?? 18 [Screen] Screen: Unpowered…
??:??:?? 18 [Screen] Screen: Powered…