發表文章

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...

Meshtastic 04 changing Lora frequency slot

圖片
 Idea is to set up a private network. I first update all 3 devices to version 2.5.x, since I was not able to connect all 3 on USB port with 2.4.x. only changing frequency slot: with web client, all three are connected through USB, can see each other under node and sending message. Message can be send from web client, and viewed from OLED. But the received messge seems can't be seen form web client The config of freqnency slot is very different form what you are using as interface. if you use web it will let you select a channel nr. but in android app, it will be changed as a "frequency over ride" with exact Mhz number. but how do you know the exact frequency mapped as frequency Nr? every default frequency in supported country https://meshtastic.org/docs/configuration/tips/#default-primary-frequency-slots-by-region for example in TW, the default is Nr.16 Frequency slot calculator:  https://meshtastic.org/docs/overview/radio-settings/#frequency-slot-calculator it would tell...

Meshtastic 03 adding GPS on TTGO lora32 V2

圖片
 I wish to add GPS on my running meshtastic client on TTGO lora32. I have a GPS module outputs with nema at 9600bps. In the config app, in the position sector, you  can find the redefine of PGS pins. I firstly use IO00 as GPS_RX_pin. But it does not work. I guess the web config use 0 as none-config default. Then I want to know what is the default pin for GPS in meshtastic for TTGO Lora 32, I use the 2.4.x firmware for V2.1-1.6. Checked the git, there is no default gps pin for this hardware, so I changed the gps to mcu pin to 34, leave other pins stuff as 0 and do the config .  And it works. there is a new flasher, which still has LILYGO T-Lora V2.1-1.6 as board selection, with latest 2.5.xx firmware maintain 34,0,0 setting is no longer working. after few try, I decided to set to 34/32/25, where 32/25 are free pin on my board. I also reference to  LILYGO Meshtastic T-Beam V1.2 ESP32 LoRaGPS WiFi , it has a gps on 34/12 with 34/12/0 the setting is still working