Cleric-K / vJoySerialFeeder

Feed Virtual Joystick driver with data from a serial port
GNU General Public License v3.0
260 stars 55 forks source link

l #66

Open Phi-2 opened 1 year ago

Phi-2 commented 1 year ago

Hi there,

I was hoping to be able to connect my Radiolink RC6GS to vJoy Serial Feeder through a Radiolink R8FM receiver and a FTDI dongle. Using the standard SBUS of vJoy Serial Feeder (and playing around a bit too) and configuring the R8FM in SBUS mode (tried also PPM) I never manage to get any reading at all. Is Radiolink using a specific SBUS or am I doing anything wrong ?

I was thinking about a STM32F103 with the Universal RC-Joystick but it might end up being the same issue if Radiolink has a different SBUS ?

At the moment my RC6GS works with a cable attached to a RC Simulator USB stick bought on ali or banggood but I'd like to get something wireless going.

Thanks a lot,

Cleric-K commented 1 year ago

Hi, you won't be able to use SBUS with FTDI. The reason is that the SBUS signal is inverted (uses opposite voltage to the one FTDI expects). Take at look at https://github.com/Cleric-K/vJoySerialFeeder/blob/master/Docs/Sbus.md for more information.

Phi-2 commented 1 year ago

Hi there, thanks for the quick reply :) Do you know of any other FTDI like dongle that would have an inverter ? If not I'll try the inverter with the FET transistor trick mentionned in the cite you gave me. But that means in any case that using the STM based board (Universal RC Joystick) will work with a Radiolink receiver ? With the price of the board I already bought one on aliexpress and see how it goes.

Thanks a lot,

Cleric-K commented 1 year ago

I don't know about a dongle with inverter but as you may have seen in the docs, you can use an Arduino if you happen to have one.

Universal RC Joystick works with SBUS, it does the signal inversion. You should be able to use your FTDI to flash it.

Phi-2 commented 1 year ago

Cool thanks again for the details.

I have ordered a STM board on AliExpress to flash the universal RC joystick.

For the sake of completeness I'm also thinking about a single XOR gate as a mere alternative to the fet and resistor.

Let's see how this goes :)

Thanks,

On Thu, 1 Dec 2022, 09:14 Cleric-K, @.***> wrote:

I don't know about a dongle with inverter but as you may have seen in the docs, you can use an Arduino if you happen to have one.

Universal RC Joystick works with SBUS, it does the signal inversion. You should be able to use your FTDI to flash it.

— Reply to this email directly, view it on GitHub https://github.com/Cleric-K/vJoySerialFeeder/issues/66#issuecomment-1333377702, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PNBZMEQF5D6HWIWZL2X6DWLBM5PANCNFSM6AAAAAASPACIHQ . You are receiving this because you authored the thread.Message ID: @.***>

Cleric-K commented 1 year ago

Yes, XOR should work too.

What model of the STM board did you buy?

Phi-2 commented 1 year ago

I bought the C8T6 something to remain on the safe side as you indicated it works with that one and you're not sure with the C6. Price difference really is peanuts :) And having a dev board around never hurts :)

I'd like the XOR / FTDI solution to work as the FTDI or UART are easier to come across than a dedicated board, then again with the price of the STM it isn't an issue. I bought a few of these on aliexpress too: https://www.ti.com/lit/ds/symlink/sn74ahc1g86.pdf?ts=1669763429743 should be fairly easy to put in the middle of a cable. Also coding on the side a terminal for FTDI chips and standard ports, might come handy to check what's happening at some point.

I was more a pic user than arduino so I don't have any arduino around.

Cheers,

On Thu, 1 Dec 2022 at 14:51, Cleric-K @.***> wrote:

Yes, XOR should work too.

What model of the STM board did you buy?

— Reply to this email directly, view it on GitHub https://github.com/Cleric-K/vJoySerialFeeder/issues/66#issuecomment-1333798581, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PNBZLZ67D4VVCBREWBEL3WLCUNLANCNFSM6AAAAAASPACIHQ . You are receiving this because you authored the thread.Message ID: @.***>

Phi-2 commented 1 year ago

Hi again,

I did not have time to check, but the FTDI datasheet ( https://ftdichip.com/wp-content/uploads/2020/08/DS_FT232R.pdf) on page 30 indicates that most signals can be inverted by programming an internal EEPROM with their software (https://ftdichip.com/utilities/#FT_PROG).

I haven't had time to check that but might be worth a check if it's as easy as programming an EEPROM to invert the RX signal ?

Cheers,

On Thu, 1 Dec 2022 at 19:46, Phi2 L @.***> wrote:

I bought the C8T6 something to remain on the safe side as you indicated it works with that one and you're not sure with the C6. Price difference really is peanuts :) And having a dev board around never hurts :)

I'd like the XOR / FTDI solution to work as the FTDI or UART are easier to come across than a dedicated board, then again with the price of the STM it isn't an issue. I bought a few of these on aliexpress too: https://www.ti.com/lit/ds/symlink/sn74ahc1g86.pdf?ts=1669763429743 should be fairly easy to put in the middle of a cable. Also coding on the side a terminal for FTDI chips and standard ports, might come handy to check what's happening at some point.

I was more a pic user than arduino so I don't have any arduino around.

Cheers,

On Thu, 1 Dec 2022 at 14:51, Cleric-K @.***> wrote:

Yes, XOR should work too.

What model of the STM board did you buy?

— Reply to this email directly, view it on GitHub https://github.com/Cleric-K/vJoySerialFeeder/issues/66#issuecomment-1333798581, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PNBZLZ67D4VVCBREWBEL3WLCUNLANCNFSM6AAAAAASPACIHQ . You are receiving this because you authored the thread.Message ID: @.***>

Cleric-K commented 1 year ago

Hi, this looks like a good find. I didn't know FTDIs can be reprogrammed in this way. If you have the FT232R model you can give it a try.

Phi-2 commented 1 year ago

Hi there,

just checked it quickly, the software proposes to invert some of the signals like in the datasheet, however it does not help in my case. the serial feeder still does not recognise anything.

I checked quickly with Radiolink and they claim they use a standard SBUS interface so I should have a standard SBUS signal out of my R8FM ...

I'll have to dig further there has to be something I do wrong, I do not see why this would not work :) SBUS signal in the FTDI with inverted RX signal, ... I might have to find a terminal software and check (I guess SBUS is documented somewhere) what I receive or the FTDI chip does not get setup properly for whatever reason but I doubt it since it really emulates a COM port with its driver.

Cheers,

On Mon, 5 Dec 2022 at 10:43, Cleric-K @.***> wrote:

Hi, this looks like a good find. I didn't know FTDIs can be reprogrammed in this way. If you have the FT232R model you can give it a try.

— Reply to this email directly, view it on GitHub https://github.com/Cleric-K/vJoySerialFeeder/issues/66#issuecomment-1337038661, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PNBZPOB6RWIK3OAGP6WTTWLW2L5ANCNFSM6AAAAAASPACIHQ . You are receiving this because you authored the thread.Message ID: @.***>

Cleric-K commented 1 year ago

Check out this: https://github.com/Cleric-K/vJoySerialFeeder/issues/3#issuecomment-379047569

Phi-2 commented 1 year ago

Hi there,

not sure what I did wrong before but it now works :D

Where do you store the configurations I might send my RC6GSv3 profile to Radiolink if it helps other user, even though it's not that hard to configure properly.

I should also mark which FTDI has an inverted input since I did buy a few on ali and they tend to just be around ready for fun ...

Conclusion FTDI is even cooler than I thought :P Shouldn't prevent soldering a XOR gate or flashing a STM board though :)

Thanks a lot for your help,

On Mon, 5 Dec 2022 at 12:30, Cleric-K @.***> wrote:

Check out this: #3 (comment) https://github.com/Cleric-K/vJoySerialFeeder/issues/3#issuecomment-379047569

— Reply to this email directly, view it on GitHub https://github.com/Cleric-K/vJoySerialFeeder/issues/66#issuecomment-1337178384, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PNBZO5JRG6CVLB53GHWK3WLXG4VANCNFSM6AAAAAASPACIHQ . You are receiving this because you authored the thread.Message ID: @.***>

Cleric-K commented 1 year ago

Great, I'm glad it worked. You can export configurations as JSON files from the menu and they can be then imported at another machine.

I'll be happy to get feedback once you get the STM board. So far I don't know if anyone has tried it :)

Phi-2 commented 1 year ago

It must be stored somewhere because I comes back everytime I restart the soft, not sure where though, it'll pop up at some point.

I'll let you know as soon as I get the STM board up and running (or fail trying to) might be a little while since I bough it from aliexpress.

So you can tick Radiolink RC6GS + R8FM + FTDI FT232R works with your feeder with inverted Rx :) I guess that pretty much any Radiolink transmitter with a compatible receiver could the trick.

I also had it work with a RC dongle also from aliexpress or a nice audio ppm signal sampling software but I prefer my wireless remote to remain wireless ;)

I could not get from Radiolink however if the inverted SBUS signal is available somewhere on the chip like this oscarliang site does with FlySky receivers :)

On Mon, 5 Dec 2022 at 15:20, Cleric-K @.***> wrote:

Great, I'm glad it worked. You can export configurations as JSON files from the menu and they can be then imported at another machine.

I'll be happy to get feedback once you get the STM board. So far I don't know if anyone has tried it :)

— Reply to this email directly, view it on GitHub https://github.com/Cleric-K/vJoySerialFeeder/issues/66#issuecomment-1337452391, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PNBZO5G7KKDL3KNWH7BWDWLX24VANCNFSM6AAAAAASPACIHQ . You are receiving this because you authored the thread.Message ID: @.***>

Cleric-K commented 1 year ago

On a system level the storage is somewhere in User\AppData\Local\vJoySerialFeeder\... but that's not considered portable. The proper way to share profiles is to export them as JSON.

Phi-2 commented 1 year ago

oh yes found a user.config I always forget these directories :)

I'm surprised you don't have more ppl playing with the STM board, I believe most ppl would play Virtual RC Pro with a real RC remote and will end up struggling in the same way, or they stick to the easy aliexpress USB dongle :D

Cheers,

On Mon, 5 Dec 2022 at 16:07, Cleric-K @.***> wrote:

On a system level the storage is somewhere in User\AppData\Local\vJoySerialFeeder... but that's not considered portable. The proper way to share profiles is to export them as JSON.

— Reply to this email directly, view it on GitHub https://github.com/Cleric-K/vJoySerialFeeder/issues/66#issuecomment-1337539421, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PNBZONPEJVULOKIMJZGADWLYAKDANCNFSM6AAAAAASPACIHQ . You are receiving this because you authored the thread.Message ID: @.***>

Phi-2 commented 1 year ago

Hi again,

I was thinking, it should be possible to invert the data that your vJoy serial feeder receives directly out of the serial buffer in software ?

At least you can mark it as Radiolink compatible too ;)

Cheers,

On Mon, 5 Dec 2022 at 16:16, Phi2 L @.***> wrote:

oh yes found a user.config I always forget these directories :)

I'm surprised you don't have more ppl playing with the STM board, I believe most ppl would play Virtual RC Pro with a real RC remote and will end up struggling in the same way, or they stick to the easy aliexpress USB dongle :D

Cheers,

On Mon, 5 Dec 2022 at 16:07, Cleric-K @.***> wrote:

On a system level the storage is somewhere in User\AppData\Local\vJoySerialFeeder... but that's not considered portable. The proper way to share profiles is to export them as JSON.

— Reply to this email directly, view it on GitHub https://github.com/Cleric-K/vJoySerialFeeder/issues/66#issuecomment-1337539421, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PNBZONPEJVULOKIMJZGADWLYAKDANCNFSM6AAAAAASPACIHQ . You are receiving this because you authored the thread.Message ID: @.***>

Phi-2 commented 1 year ago

hi there,

just got the stm board so I'll have to figure out which pin to use for programming and see how it goes with my radiolink receiver ;)

Cheers,

On Wed, 7 Dec 2022 at 19:17, Phi2 L @.***> wrote:

Hi again,

I was thinking, it should be possible to invert the data that your vJoy serial feeder receives directly out of the serial buffer in software ?

At least you can mark it as Radiolink compatible too ;)

Cheers,

On Mon, 5 Dec 2022 at 16:16, Phi2 L @.***> wrote:

oh yes found a user.config I always forget these directories :)

I'm surprised you don't have more ppl playing with the STM board, I believe most ppl would play Virtual RC Pro with a real RC remote and will end up struggling in the same way, or they stick to the easy aliexpress USB dongle :D

Cheers,

On Mon, 5 Dec 2022 at 16:07, Cleric-K @.***> wrote:

On a system level the storage is somewhere in User\AppData\Local\vJoySerialFeeder... but that's not considered portable. The proper way to share profiles is to export them as JSON.

— Reply to this email directly, view it on GitHub https://github.com/Cleric-K/vJoySerialFeeder/issues/66#issuecomment-1337539421, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PNBZONPEJVULOKIMJZGADWLYAKDANCNFSM6AAAAAASPACIHQ . You are receiving this because you authored the thread.Message ID: @.***>

Phi-2 commented 1 year ago

Hi there,

the stm board works very fine too just could not flash it with the beta flight software so I used that one: https://sourceforge.net/p/stm32flash/wiki/Home/ with windows 11 stmflash32.exe -w firmware.hex -v COM4 to write and verify It apparently erases before automatically

the default speed (indicated by stmflash32) with my board is set to 57600 which might be why betaflight did not work forcing it to 19200 ?

I also had to use your trick of rebooting the board before it flashed correctly though

One advantage I see is that the board is recognised as a joystick right away (so it might be easier to plug and play at a friend's place for instance) One advantage for FTDI + vJoy + your feeder is that with your feeder one can exactly configure the channels with vJoy, i.e. axis, slider, button and the like.

I guess in most cases one will only need the two first channels for steering / acceleration (including using my RC6GS to play VRC Pro :D )

In my case I have did buy a while ago a few FTDIs so I might stick to FTDI

But going FTDI or STM32 works very fine with Radiolink in my case.

I'll see how courage I'll still have when receiving the XOR gates to solder one and see if it works :p

Cheers,

On Sat, 10 Dec 2022 at 15:09, Phi2 L @.***> wrote:

hi there,

just got the stm board so I'll have to figure out which pin to use for programming and see how it goes with my radiolink receiver ;)

Cheers,

On Wed, 7 Dec 2022 at 19:17, Phi2 L @.***> wrote:

Hi again,

I was thinking, it should be possible to invert the data that your vJoy serial feeder receives directly out of the serial buffer in software ?

At least you can mark it as Radiolink compatible too ;)

Cheers,

On Mon, 5 Dec 2022 at 16:16, Phi2 L @.***> wrote:

oh yes found a user.config I always forget these directories :)

I'm surprised you don't have more ppl playing with the STM board, I believe most ppl would play Virtual RC Pro with a real RC remote and will end up struggling in the same way, or they stick to the easy aliexpress USB dongle :D

Cheers,

On Mon, 5 Dec 2022 at 16:07, Cleric-K @.***> wrote:

On a system level the storage is somewhere in User\AppData\Local\vJoySerialFeeder... but that's not considered portable. The proper way to share profiles is to export them as JSON.

— Reply to this email directly, view it on GitHub https://github.com/Cleric-K/vJoySerialFeeder/issues/66#issuecomment-1337539421, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PNBZONPEJVULOKIMJZGADWLYAKDANCNFSM6AAAAAASPACIHQ . You are receiving this because you authored the thread.Message ID: @.***>

Cleric-K commented 1 year ago

Thank you for your feedback! I'm glad it all worked our for you.

About your question for software inversion - it is not possible because it is not simply that the bits are inverted but the whole voltage of the line. In normal TTL UARTs the idle level of the pin is 0V. Transition from 0 to 5V is a start bit and the UART chip begins to sample voltages at the appropriate intervals based on the baud rate. When the signal is inverted the idle voltage is 5V. This means that the UART chip will wait for whatever 0->5 transition can be seen, which is usually some zero bit of the inverted signal. From then onwards the whole sampling is misaligned, the parity check often fails and so on.

mmbertels commented 1 year ago

Hi, I have a new type Radiolink T8FB BT with micro usb port. I have downloaded and installed all Radiolink software and i can see everything via com9. In the Radiolink software i can see the controller levers actions and i can tune then. Wij does my vjoyserialfeeder not see my inputs from the Radiolink controller, while is does connect to com port 9. Thanks

Phi-2 commented 12 months ago

Hi there,

Not sure which remote you have, I used RC4GSv2 (with RC6GSv2 software and extra switches).

I now have an RC6GSv3.

But the USB as far as I know is only for firmware update for these models, there is a jack on the side to recover the signal (PPM is it ? Or something like that).

Your solutions are sampling this jack with your mic entry (there is a software somewhere doing this) or use an adapter costing a few € on Aliexpress.

The solution I now use and prefer is the blue pill programmed by Cleric-K and linked to an R8FM (because it's small but anythin outputting SBUS will do if you have a R7FG for instance lying around it has a SBUS output, others receivers might have it too I chose the R8FM for it's size and in the end I wanted something dedicated). This has the advantage of being seen as a real joystick by windows and keeps the wireless part of the remote. You can even store the R8FM in your remote.

In between I used the serial feeder of Cleric-K linked to a FTDI USB adaptor linked to a R8FM but since SBUS is inverted you have to configure the FTDI device to invert the corresponding signal. But it does work.

I have put the blue pill and the R8FM in a small plastic case and I find it very practical, connects as a joystickis recognised by virtual RC Pro Incqn even use one of the buttons as the space bar to put the car back on the track (which happens to me very seldom :D :D)

Have fun ;)

On Sun, 10 Sept 2023, 22:46 mmbertels, @.***> wrote:

Hi, I have a new type Radiolink with micro usb port. I have downloaded and installed al Radiolink software and i can see everything via com9. Wij does my vjoyserialfeeder not see my inputs from the controller, while is does connect to com port 9. Thanks

— Reply to this email directly, view it on GitHub https://github.com/Cleric-K/vJoySerialFeeder/issues/66#issuecomment-1712933042, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4PNBZI3SPI57IZHUUEXP2DXZYRLZANCNFSM6AAAAAASPACIHQ . You are receiving this because you authored the thread.Message ID: @.***>