Serial out for LRS boxes

More
27 Mar 2018 09:27 #68369 by Fernandez
Replied by Fernandez on topic Serial out for LRS boxes
Indeed would be nice serial outs, sbus/pxx/crsf

But the future would be a direct control of lora module by deviation, than question is which protocols to support, topic is already open....
www.deviationtx.com/forum/7-development/...-sx1278-sx1276#64547

Please Log in or Create an account to join the conversation.

More
28 Mar 2018 09:39 #68382 by xfapv
Replied by xfapv on topic Serial out for LRS boxes
I am running crossfire module (the full version) on the trainer port of my devo 12S via 8ch PPM, which works well for me (I'm not racing the corners by hard right now, so I don't notice a "lag" of the "slow" PPM protocol). However if CRSF protocol is availible I would appreciate.

I also tried running crossfire on my Spektrum DX6i (also on trainer port). This didn't work. In particular it established a connection (6ch PPM), it flew for some time, but after a few minutes I randomly had failsaves. I assume that the connection between DX6i and the crossfire module was not stable. The quad disarmed like it has lost some PPM packages. With the devo 12S this problem is solved.

Please Log in or Create an account to join the conversation.

More
12 Apr 2018 18:10 #68626 by Fernandez
Replied by Fernandez on topic Serial out for LRS boxes
Do we have any developers, who may be able to implement, Sbus output over the trainer ppm port ?

Please Log in or Create an account to join the conversation.

More
12 Apr 2018 18:15 - 12 Apr 2018 18:16 #68627 by Elmtree
Replied by Elmtree on topic Serial out for LRS boxes
I got caught up in school and hardware development, but sbus would not be particularly difficult. Openlrsng has sbus output in its code already so it could be as simple as transferring that and giving credit. Opening the serial port itself was very simple.

I unfortunately don't have the hardware to test it though.
Last edit: 12 Apr 2018 18:16 by Elmtree.

Please Log in or Create an account to join the conversation.

More
12 Apr 2018 21:07 #68628 by Fernandez
Replied by Fernandez on topic Serial out for LRS boxes
I am happy to help testing, I own Ultimate 7E, f.i. by connect a betaflight controller sbus input.

Please Log in or Create an account to join the conversation.

More
13 Apr 2018 02:02 #68632 by Elmtree
Replied by Elmtree on topic Serial out for LRS boxes
Not sure why I didn't think of that! I'm going to look at the code again to get used to it and see what I can bang out tonight.

Please Log in or Create an account to join the conversation.

More
13 Apr 2018 06:09 #68635 by Elmtree
Replied by Elmtree on topic Serial out for LRS boxes
Well it took me until now to get deviation compiling again and getting my git repo up to date because I'm still learning all that stuff. So code will have to happen this weekend.

Please Log in or Create an account to join the conversation.

More
13 Apr 2018 18:15 #68643 by xfapv
Replied by xfapv on topic Serial out for LRS boxes
I can run some tests too (Devo 12S with Crossfire module which can handle several protocols including SBUS (inverted and non-inverted).

I will try to compile your repo tonight.

If I can contribute anything concerning programming let me know (though I have only basic to medium coding skills)

Please Log in or Create an account to join the conversation.

More
13 Apr 2018 22:06 #68644 by xfapv
Replied by xfapv on topic Serial out for LRS boxes
I just managed to checkout and compile your repository Elmeerkat. I can now select SUMD protocol.

Waiting for new stuff...

Please Log in or Create an account to join the conversation.

More
13 Apr 2018 22:19 #68645 by Elmtree
Replied by Elmtree on topic Serial out for LRS boxes
Awesome. I'm on a 4hr bus ride now, but there's wifi. I'll take a crack at SBUS. I'll tell you when/if it's up

Please Log in or Create an account to join the conversation.

More
14 Apr 2018 00:40 #68648 by Elmtree
Replied by Elmtree on topic Serial out for LRS boxes
So when I compile and upload my TX shows a blank screen. I tried the most up to date branch on my repo with the serialout branch.

You're saying that you can compile and flash it?

Please Log in or Create an account to join the conversation.

More
15 Apr 2018 11:56 - 15 Apr 2018 11:58 #68665 by xfapv
Replied by xfapv on topic Serial out for LRS boxes

Elmtree wrote: So when I compile and upload my TX shows a blank screen. I tried the most up to date branch on my repo with the serialout branch.

You're saying that you can compile and flash it?


Here´s what I did (most of it is obvious, but I write it down here):

I used the docker container as decribed here:
www.deviationtx.com/wiki/development/docker

git checkout (bash command):
git clone -b serialout https://github.com/Elmeerkat/deviation.git

in PowerShell
docker create -it -v ./devo_builds:/release -v C:\... .... ...\deviation-elmeerkat-git:/git --name deviation_build_serialout_git deviationtx/deviation-docker
docker start -i deviation_build_serialout_git

Then in the dialog box: disabled all but Transmiiter builds: devo12, disabled Update Git

and then build it.

I flashed it on my transmitter using the jar file (DeviationUpload-0.8.0.jar).

Then everything works for me. I can select SUMD in the Setup menu, but I cannot test it, as I dont have a compatible receiver. My crossfire module doesn`t recognize SUMD as input.
Attachments:
Last edit: 15 Apr 2018 11:58 by xfapv.

Please Log in or Create an account to join the conversation.

More
15 Apr 2018 12:01 #68666 by xfapv
Replied by xfapv on topic Serial out for LRS boxes
I´ve attached my compiled firmware file in the previous post. What transmitter do you use? Perhaps I can try to compile it and then send it to you?

Please Log in or Create an account to join the conversation.

More
15 Apr 2018 18:52 #68671 by Elmtree
Replied by Elmtree on topic Serial out for LRS boxes
I'll have to try this later tn. I'm running the devo6s. If you could upload a compiled version that'd be great. Also I'll try docker later after work

Please Log in or Create an account to join the conversation.

More
16 Apr 2018 21:49 #68677 by xfapv
Replied by xfapv on topic Serial out for LRS boxes
compiled for devo6

File Attachment:

File Name: deviation-...348c.zip
File Size:858 KB
for flashing with jar tool

File Attachment:

File Name: devo6_supp...iles.zip
File Size:1,431 KB
don`t what this is for??
Attachments:

Please Log in or Create an account to join the conversation.

More
17 Apr 2018 16:02 #68693 by Elmtree
Replied by Elmtree on topic Serial out for LRS boxes

xfapv wrote: compiled for devo6

File Attachment:

File Name: deviation-...348c.zip
File Size:858 KB
for flashing with jar tool

File Attachment:

File Name: devo6_supp...iles.zip
File Size:1,431 KB
don`t what this is for??



Thanks so much, it worked. I'll try to set up the docker environment you did. I hadn't hat luck with it before. I have the SBUS code written I think, but there's a part of the spec that I'm unclear on so I'll need to compare to a real signal and whatnot. I'm working on it though :)

Please Log in or Create an account to join the conversation.

More
17 Apr 2018 18:08 #68696 by hexfet
Replied by hexfet on topic Serial out for LRS boxes
Played around with the sbus code a bit last night. Fixed some issues and the changes are here . The output now looks okay on logic analyzer, but my sbus test jig isn't picking it up. Will look into that tonight.

The data encoding for the channel values doesn't look correct. At least the values are bit-reversed and there may be other differences. Haven't looked into the correct encoding code.

Please change the filenames to lower-case before making a pull request. Just keeps things easier when working with both Windows and Linux.

Please Log in or Create an account to join the conversation.

More
17 Apr 2018 19:31 - 17 Apr 2018 19:32 #68699 by Elmtree
Replied by Elmtree on topic Serial out for LRS boxes
Shoot, I didn't mean to upload the code I had written for sbus. It's definitely not finished! Once I get compiling working I'll be able to test with real devices for sure. And I'll definitely change the filenames, thanks for the heads up.

Thanks for the changes, I'll be sure to implement them.
Last edit: 17 Apr 2018 19:32 by Elmtree.

Please Log in or Create an account to join the conversation.

More
18 Apr 2018 02:15 #68707 by Elmtree
Replied by Elmtree on topic Serial out for LRS boxes
Got docker working finally. Can now actually locate the output files. Building an sbus test to see what it output.

Please Log in or Create an account to join the conversation.

More
18 Apr 2018 04:38 #68709 by Elmtree
Replied by Elmtree on topic Serial out for LRS boxes
So I tried a bit more. Found a document explaining sbus. Basically each channel is stored in 11bits. But serial is in packets of 1 byte. So the packets are split non-uniformaly repeating every 8 channels. So like 8 bits of the first channel in packet 1, then 3 bits of channel 1 and 5 of channel 2 and so on. Currently I have it just hard coded with bit shifts, but I'm sure there's a more elegant way to do it. Also it doesn't work yet, but I have the ground work there, just need to finish it.

Any suggestions for the weird packet arrangements would be great though

Please Log in or Create an account to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum