發表文章

目前顯示的是 2月, 2025的文章

Meshtastic MQTT to HiveMQ

圖片
 The target is to make a meshtastic sensor or geodata can be view or shared through internet on some where else. HW: I still use my unknow version of lilygo 32lora. Device A: Client,work as device to sent lora data to MQTT Device B: Tracker,with GPS, work as tracker Device C: Client,with rotary encoder configed for canned message. SW: all three are loaded on meshtastic 2.5.15 Lora/frequency is overide to avoid too much trafic.channel/PSK is also set to non-default. upto here, all 3 devices can communicated through message no problem. MQTT server:  as 2025, it seems meshtastic has set some "rules", and I saw a video about using MQTT explorer to "see" if data is on meshtastic's MQTT server. I did the same, it does connect, but I only saw some strange topic, not the msh/topic we set in SW. So, I decided to work on other MQTT, I created an account on HiveMQ  create a cluster, it will give you a set of URL and the port is 8883, later I found out that without TLS enab...

Meshtastic LilyGo lora32 pins? which can be used, which is used on meshtastic

圖片
 The story of ESP32 pin are old, Andreas made few videos on it: 2017 esp32 review  with first table of pins. 2020  #363  Which ESP32 pins are safe to use? with another table esp32 lora heltec and lilygo pins are so so confusing: https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436 base on my ttgo lora32, I want to know what are lead out, what are used, and what left for me. I wish to add: GPS, serial button ( or if possible rotary encoder, need 3 GPIO), SD is not necessary. The closest data to my board is this one  it's called TTGO lora V2 Check pin used, I used TloraV2.1-1.6 with web flasher, check define on git variants/tlora_v2_1_16/variant.h it seems 35 is used as battery pin 21/22 are IIC SDA/SCL some are not clear, when checkin schematic , beside these questionale pins, it leave me few pins to use, seems fine, What I tested: 1. Add rotary: pin are connected as rotary A on GPIO15, rotary B on GOIP2 and rotary push on GPIO14, But th...

Meshtastic xx serial to arduino decode portobuf

 meshtastic has a arduino lib for decoding it's protobuf protocol. https://github.com/meshtastic/Meshtastic-arduino I tried 3.3V pro min 328, complier says no enough memory for variable Sketch uses 25106 bytes (81%) of program storage space. Maximum is 30720 bytes. Global variables use 13368 bytes (652%) of dynamic memory, leaving -11320 bytes for local variables. Maximum is 2048 bytes. need another 3.3V board, I still have some esp8266 as D1Mini, it has enough memory bu tthe pin define took me some time. I noted the pins of D1 mini here. I set as below with GND to GND GPIO5 =RX=D1 marking on D1 mini<--- D6 marking on Xiao= GPIO43 = TX GPIO4 =TX=D2 marking on D1 mini---> D7 marking on Xiao= GPIO44 =RX the lib comes with 2 examples, one to get node info, and the other one to receive message and send message. in both case, you have to set the serial in protobuf in your meshtastic node serial setting. I found that when you use serial, on mestastic device (in my case Xiao, a esp3...

Wemos D1 mini pin out

圖片
 as 2025 I still have lot of D1mini, old but still good. But the pin labeling is terrible. Here is the exact GPIO Nr from here the yellow pins are to avoid since it's used on start up. So, only the green ones are super safe to use: example: for softseial should define GPIO5(D1) with GPIO4(D2) if you use softserial example, most of them use 2 and 3, which will not work

Meshtastic xx TTGO with rotary encoder for canned message

圖片
 In the canned meaage sector, there is an example using ttgo with rotary encoder It's a 5 pin device, define as following B o --- o PRESS GND o | | A o --- o GND In the example, it use 3 GPIO to read out encoder and the push button TTGO LoRa V1: A - GPIO-22 B - GPIO-23 PRESS - GPIO-21 for the SW setting, it seems clear, but when I try to config, it's alittle confusing.  1. I have a TTGO lora32 V2 (I guess, it's an old board, not much doc remain on their site), it works with Lilygo T-lora 1.3-2.0. I first tried to pins on 22/23/21, it did not work, since it's has been used by IIC OLED, I ended up suing  GPIO 13/15/4 as A/B and PRESS(but by accident, I plug into02 and 15, this work with this setting) For the SW setting, if you use web client, there is no place to set the canned message. 1st setting: enable both module enabled and Rotary encoder #1 enabled.(there are some setting below about rotary encode ) 2. config use pins to define what GPIO to connect, and then it...