Steve J

  • *
  • 12
CC3D & Spektrum 4649T
« on: March 06, 2017, 10:01:40 am »
Hi everybody.

I am trying to get a CC3D to work with a Spektrum SPM4649T. I have no problems with either a plain Spektrum remote or an AR7700. With the 4649T the channels seem to be garbled on power up. If I leave the power on and reboot the CC3D, it starts working.

I get the same result with LibrePilot 16.09 and OpenPilot 15.02. The 4649T is powered at 5V (it requires 3.5-7.4V) from the servo power rail, the signal is connected to the flex port.

Any suggestions?

Steve

Steve J

  • *
  • 12
Re: CC3D & Spektrum 4649T
« Reply #1 on: March 06, 2017, 05:43:47 pm »
A bit more on this.

I've had a look at the data being transmitted by the 4649T, it appears to be in accordance with Spektrum's Specification for Remote Receiver Interfacing. The message structure is for an internal remote with 0xb2 in the system field.

My feeling is that the CC3D is seeing something in the first messages from the 4649T that is making it think that the 4649T is sending 10 bit resolution data rather than 11 bit data.

Steve

Steve J

  • *
  • 12
Re: CC3D & Spektrum 4649T
« Reply #2 on: March 07, 2017, 05:30:57 pm »
The problem appears to be in pios_dms.c. It was written before Spektrum released their remote receiver specification and the way that it decides between 10 and 11 bit data doesn't work for the 4649T.

Steve

f5soh

  • *****
  • 4572
    • LibrePilot
Re: CC3D & Spektrum 4649T
« Reply #3 on: March 07, 2017, 05:59:08 pm »
Hi,

You can do code modifications and submit a pull request, please take a look here how to do:
https://librepilot.atlassian.net/wiki/display/LPDOC/Git+Workflow

Tell me if you need a Jira issue opened first.



Steve J

  • *
  • 12
Re: CC3D & Spektrum 4649T
« Reply #4 on: March 07, 2017, 06:19:20 pm »
I have started to setup a LibrePilot development environment on my Linux box. Unfortunately, it is Debian Jessie and it looks like it will be a pain to get the right version of Qt on it.

The change to pios_dms.c looks very straightforward. The code needs to look at the second byte in the message to determine 10 or 11 bit data rather than what it does now.

Steve

f5soh

  • *****
  • 4572
    • LibrePilot
Re: CC3D & Spektrum 4649T
« Reply #5 on: March 07, 2017, 06:48:20 pm »
If you install the Qt version locally you should be able to compile GCS: make qt_sdk_install (install in ./tools)

You may need to compile also your own osg libraries

Code: [Select]
make all_osg
cp -R build/3rdparty/install/osg*[.0-9][0-9] tools/
echo "override GCS_EXTRA_CONF=osg osgearth copy_osg" > config
make clean
make -j2 fw_resource && make -j2 gcs  ./build/librepilot-gcs_release/bin/librepilot-gcs

f5soh

  • *****
  • 4572
    • LibrePilot
Re: CC3D & Spektrum 4649T
« Reply #6 on: March 07, 2017, 09:46:06 pm »
Tested under Jessie, works fine.

You can download the osglib archive from here : https://share.orange.fr/#sfzkvSnz5K105f39b1d4
Extract the archive into the ./tools dir (osg-3.5.3-linux-x64-qt-5.6.2 and osgearth-2.7-linux-x64-qt-5.6.2 dirs created)

Code: [Select]
make clean
make -j2 fw_resource && make -j2 gcs
mkdir ./build/librepilot-gcs_release/lib/librepilot-gcs/osg
cp -R ./tools/osg*5.6.2/lib64/* ./build/librepilot-gcs_release/lib/librepilot-gcs/osg
./build/librepilot-gcs_release/bin/librepilot-gcs

For some reason the manual copy of osg libs into ./build/librepilot-gcs_release/lib/librepilot-gcs/osg  is needed.


Steve J

  • *
  • 12
Re: CC3D & Spektrum 4649T
« Reply #7 on: March 09, 2017, 12:39:36 pm »
1) In my opinion dms 1024 and dms 2048 need to be user configuration options (as they are in cleanflight). Trying to autodetect in the code is going to be a problem because you can't guarantee that the user is using an A (or internal) remote. In fact I suspect that it is most likely that they are not. The only other option is to just support dsm 2048.

2) I have tried to get a Debian stretch development environment going, but it doesn't seem to like my graphics card. With Debian jessie, I am getting include errors for files that I know are present. I am therefore giving up on this for the present.

Steve

Steve J

  • *
  • 12
Re: CC3D & Spektrum 4649T
« Reply #8 on: March 11, 2017, 01:04:38 pm »
I got Debian stretch going (by changing from Gnome to lightdm?) and built fw_coptercontrol with pios_dsm.c modified for 11 bit data only and the 4649T now works.

For what it is worth, my pios_dsm.c is attached.

Next I may look at modifying pios_srxl to work with Spektrum SRXL.

Steve


Re: CC3D & Spektrum 4649T
« Reply #9 on: August 24, 2017, 04:59:52 pm »
Hi Steve,

I want to connect with 4649T as well, having the same issues. I saw you provided an updated pios_dsm.c file, but as a rookie I have no idea how to get it onto CC3D. Could you please drop few bullets how to do ?

Many thanks

Re: CC3D & Spektrum 4649T
« Reply #10 on: September 19, 2017, 08:10:40 pm »
Hello,
I'm curious if you ever got the SPM4649T receiver working.  Would you be able to use the telemetry features?
Thanks,
Adam

ernade

  • *
  • 2
Re: CC3D & Spektrum 4649T
« Reply #11 on: October 02, 2017, 04:29:31 pm »
Is there any solution?

Steve J

  • *
  • 12
Re: CC3D & Spektrum 4649T
« Reply #12 on: October 05, 2017, 08:13:52 pm »
Sorry for the delay in replying. I haven't been on here in ages.

Could you please drop few bullets how to do ?

You need to setup a development system and replace the standard pios_dsm.c with the one that I supply above.

I'm curious if you ever got the SPM4649T receiver working.  Would you be able to use the telemetry features?

I have a custom build that works fine. The problem is the 1024/2048 bit autosensing code in the standard version of pios_dsm.c. For some reason, the SPM4649T confuses it.

Telemetry would require the CC3D to send Spektrum SRXL packets to the SPM4649T after receiving data from it.

Steve

mr_w

  • *
  • 207
    • LibrePilot
Re: CC3D & Spektrum 4649T
« Reply #13 on: October 07, 2017, 09:42:49 am »

Telemetry would require the CC3D to send Spektrum SRXL packets to the SPM4649T after receiving data from it.


Over the same wire (half duplex) or dedicated telemetry tx line?

Steve J

  • *
  • 12
Re: CC3D & Spektrum 4649T
« Reply #14 on: October 07, 2017, 11:21:16 am »
The same wire. Spektrum SRXL is bidirectional.

https://www.spektrumrc.com/ProdInfo/Files/SPM4649T_Bi-Directional_SRXL_specifications.pdf

Note that signal quality and pack voltage are already available from the 4649T.

Steve