#Trying to send raw CRSF packets to the TX via 5 pin JR mount. Getting no data

13 messages · Page 1 of 1 (latest)

copper radish
#

Trying to send raw CRSF packets to the TX via 5 pin JR mount but getting no data

PC -> (USB UART dongle) -> TX (5pin JR) <- OTA -> RX -> FC

I have this pinout

TX - Radiomaster Ranger (powered via xt30)
USB Dongle - FT232RL (rx and tx pins set to inverted with MPROG)

    TX Radio        USB Dongle
PPM/SBUS (RX)    -> TX
HB   <not connected>
+BAT <not connected>
GND              -> GND
S.PORT TELEM (TX) -> RX

I'm able to read from the handset with this configuration but dont get anything when connected to the radio. I'm thinking the reason I cant read/write to the radio is:

- Something is inverted incorrectly
- The display says 'NO HANDSET' which is preventing the radio from listening for packets

Any feedback on my thinking and getting packets to the radio via JR mount would be appreciated!

twilit heart
#

With the JR module. The only pin used is the S.PORT pin (and it is inverted). it is a bidirectional pin. i.e. you send data then flip to receive mode then back to transmit mode. The timing is also very important i.e. there is a sync packet sent from the module which tells the handset to adjust it's timing offset.

#

You would be better of editing the hardware layout via the hardware.html page and set the serial_rx and serial_tx pins to 3 and 1 respectively and uncheck the inverted in the options page and set the baud rate to something better suited for the PC then you can just use the USB port on the module.

copper radish
#

Ok, now Im starting to get the picture. I just checked /hardware.html and like you said rx and tx are on the same pin (13). From what I gather its like this:
pin 13 is the S.PORT pin on the JR module
pin 3 is the rx pin on the usb port
pin 1 is tx is the tx pin on the usb port

The USB approach is the absolute ideal so I'm trying that route now. I've taken the steps below but am still stuck at the 'NO HANDSET' notice and no going data in or out. I've been using the hex string EE 04 28 00 EA 54 to test which is a device ping but no response.

Set crsf rx pin to 3 and tx pin to 1 in /hardware.html
On the main options tab:

  • Unchecked 'UART Inverted'
  • Unchecked 'Use as airport serial device'
  • Set UART baud to 57600

Maybe its not pins 1 and 3? I'll check to see if I can find a pinout diagram for the Ranger. Any other ideas I might try? Thanks for your help!

twilit heart
#

It is definitely pins 3 (rx) and 1 (tx) as thats what we use to flash the device.

copper radish
#

Ok, so should I be getting packets even with the radio in 'NO HANDSET' mode?
Also, I'm using a regular USB cable connecting the radio to the PC. Do I need to use the TTL dongle with the radio to pc connection?

twilit heart
#

Once the device sees a valid packet it should flip out of "No Handset" mode. I don't think it will send anything to the PC until it sees a valid packet. You might want to use a faster baud rate that 57600. Try 115200. I steered you a bit wrong before, as the module only supports the baud rates that are used in the radio, to 115200, 400000, 921k, 1.87m, 3.75m and 5.25m baud.

copper radish
#

I reflashed the radio with configurator. The only pertinent option in configurator was to uncheck 'uart inverted'. After the flash, the options tab on wifi is missing the uart baud field and the 'use as airport' checkbox. The 'uart inverted' checkbox is present and unchecked as expected. The passphrase and the pins1,3 setting in /hardware.html both persisted through the flash.
Since the uart baud field is missing I'm going to try building from source and set those in user_defines.txt.

Do you know if this is a good hex string to send the radio to wake it out of 'NO HANDSET' ? It would be crazy to do all this testing and be using the wrong string lol
I'm using EE042800EA54
I got that string from this doc under 'Device Ping' https://github.com/ExpressLRS/ExpressLRS/wiki/CRSF-Protocol

Thanks again

GitHub

STM32/ESP32/ESP8285-based High-Performance Radio Link for RC applications - ExpressLRS/ExpressLRS

twilit heart
#

Make sure you are not sending it as hex!

#

It needs to be binary

#

The module detects the baudrate based on the high-low switching time and chooses the closest baud rate in the list I sent you.

copper radish
#

Cool, I'm setting it to 115200 and I'll try sending the bytes programatically instead of with moserial which ive been using

copper radish
#

I haven't had luck getting response from the tx yet. I'd like to add some code to the firmware to do a test serial write every second or so. This way I can see if I'm at least connected to the radio via USB.
Is there an area of the code you recommend I start looking at to add the serial.write()?
Also, I enabled debugging in user_defines but haven't found much documentation on the feature and wonder how can I read these debug logs?

Thanks again for helping me along here. I'm surprised this hasn't been done publicly before.