發表文章

目前顯示的是 5月, 2023的文章

esp32/8266 as station and TCP or UDP server for multiple connections

圖片
 I have been working on esp32 for serial to udp or tcp server, the idea was to get serial data like GPS or NMEA to be shared over local net work. I did this before, and found out that if your run softAP and TCP server on same core, it could "core 0 panic" I separated then into 2 core, but still failed when 2-3 connected after a while of working. from this post , it seems 8266 is more stable than esp32 on wifi handling?! As broadcasting data, a UDP is more suitable than TCP, Bidirectional communication is not available for the UDP/broadcast protocol. this seems to be a good start:  1 Wifi communication between ESP8266 and PC using TCP/IP or UDP/broadcast protocol I tested it with apmode and udp, but it shows ip unset if I do it in station mode, it does not show "connected to wifi" This one is 3 TCP to serial ports on esp32 2  https://github.com/AlphaLima/ESP32-Serial-Bridge 3  https://github.com/yuri-rage/ESP-Serial-Bridge This fork allow UDP and 8266, but it says:&

Frsky D port decode

圖片
 https://github.com/gke/FrSkyDJTTelemetry work with an OLED, but using serial port of pro mini, so you need a invertor on the serial. it seems mcu can't keep if we use interrupt to make invert signal as next example. I get a 3.3V non-inverted signal from DJT module(it use a 3232EE chip to convert the signal, I found the datasheet and get the original TX signal from MCU.) I get a pro mini 3.3V 8Mhz, hook up with IIC OLED, down load the code, and put the tx from DJT at serial RX, it works fine.   #define NO_INVERTER // uncomment for direct connection of DJT using ~100K resistor   Here is a project to decode D port: using pro mini ,  Decoder for "D" receiver telemetry emitted typically from an early FrSky DJT Tx Module. Code is intended for an Arduino uno or similar. DJT modules uses +/-6V signaling and so an   inverter is required. or using softserial to do the invert job, but need a 100K resistor https://ceptimus.co.uk/index.php/2017/04/21/decoding-frsky-telemetry-data-wit

comver Mavlink to passthrough

圖片
 This can do translation from mavlink to passthru https://github.com/zs6buj/MavlinkToPassthru/wiki it works in 3 modes, as I understand it's useful: 1. if your FC does not support s.port ot passthru 2. you can get mavlink through external telemetry, and want to feed into your radio. 3. relay mode, some how complicated for me as a setup. The passthru is at 57600bps, and quite efficient as it use bit map: For telemetry, there were esp dronebridge  using wifi, and this one using espNow for better range:  https://discuss.ardupilot.org/t/simple-esp-telemetry-serial-bridges/75536/32?page=2 https://github.com/yuri-rage/ESP-Now-Serial-Bridge also this one: https://discuss.ardupilot.org/t/espnow-telemetry-rc/90672 https://github.com/Vabe7/ESPnow-Telemetry-RC combine mav2passthu and espnow as tx module.

Frsky D4R-II 8 channels receiver with telemetry part 3: testing

圖片
 I still have a set of DR4II with invert circuit and pixhawk, I pair it up with my jumper T18, and start some testing. D port is set at serial 2 with 9600 and 3 for serial protocol. OpenTX has decoded these sensors: Tmp2 =93, means 9 sat in view, 3D fix, temp1 should be flight mode https://github.com/moschotto/OpenTX_GPS_Telemetry does what it should do. Inav lua deocde, gps correctly, and Hdg, but the RSSI bar seems not correct, and it talks alot, I will setup pixhawk fully and try again. after setup pixhawk, the flight mode does match inav setting. the rssi is related to my elevator stick but the battery voltage and fuel is the same as mission planner Here is the flight mode for inav: https://github.com/iNavFlight/inav/blob/master/docs/INAV_Modes.pdf -- Modes: t=text / f=flags for text / w=wave file local modes = { { t = " ! TELEM ! " , f = 3 }, { t = " HORIZON " , f = 0 , w = " hrznmd " }, { t = " ANGLE " , f = 0 , w = &