Not sure how to connect to tuner studio

It's all about the code!
Post Reply
aut0m4tic1
Posts: 9
Joined: Fri Jan 10, 2014 5:18 am

Not sure how to connect to tuner studio

Post by aut0m4tic1 »

Hi all:
I went through all the steps and compiled the code using ChibiStudio and downloaded the hex file using stm32 st-link. I can tell the firmware is there because I get data out using Hyperterminal and tss command tells me that it is talking on PD8 and PD9. There is mention of editing features.h to change where the serial stream is sent. I made a few changes but when I do I only get a compile error about multiple targets and have to download a new copy of the firmware for it to work again.
I am totally new to C++ and embedded programming. My only experience is with Arduino and Picaxe uC's so I'm not very familiar with toolchains and compiling multiple files at once.
What exactly do I edit in features.h to allow rusefi to talk to Tunerstudio over the micro usb? I have installed the serial usb drivers and got the ST Demo that came pre-loaded working using the accelerometer to work as a mouse.
I've ordered the ttl to usb adapter mentioned in the Tachometer projects but it hasn't got here yet.
Thanks for your help
Cory
User avatar
AndreyB
Site Admin
Posts: 14752
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Not sure how to connect to tuner studio

Post by AndreyB »

So, we have two comminication channels - our own java dev console (have you tried it yet) and Tuner Studio (TS). By default, plain text protocol used by dev console is on the micro-USB (not mini-USB) and the TS protocol is on the UART pins

Code: Select all

#define EFI_CONSOLE_PORT GPIOD
#define EFI_CONSOLE_TX_PIN 8
#define EFI_CONSOLE_RX_PIN 9
#define EFI_CONSOLE_AF 7
In order to use the UART pins, you need to have a 'USB TTL' dongle - that's a separate tiny $5 device you get on eBay. So, in order to connect TunerStudio with default source codes you need a 'USB TTL' dongle.

If you want to change the default mapping and swap which protocol uses which communication port, you should change TWO lines in features.h:
You should comment

Code: Select all

//#define EFI_SERIAL_OVER_USB TRUE
and you should UN-comment

Code: Select all

#define EFI_TUNER_STUDIO_OVER_USB TRUE
If you apply this code change, you would get TunerStudio in the microUSB wire as soon as you install the driver and assuming you apply the rusefi.ini and assuming rusefi.ini is in sycn with the source code, that's something I can double-check a bit later.

One day this would be simpler, but right now that's the way this works. Still working for a developer to improve this :)
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
aut0m4tic1
Posts: 9
Joined: Fri Jan 10, 2014 5:18 am

Re: Not sure how to connect to tuner studio

Post by aut0m4tic1 »

I cant get it to compile with those changes. At any rate, my USB-TTL was in the mailbox when I got home, and it connects just fine. Thanks for the help!
User avatar
AndreyB
Site Admin
Posts: 14752
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Not sure how to connect to tuner studio

Post by AndreyB »

if you would install teamviewer and pm me you contact details we can work out the compilation issue
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14752
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Not sure how to connect to tuner studio

Post by AndreyB »

aut0m4tic1 wrote:Hi all:
I went through all the steps and compiled the code using ChibiStudio and downloaded the hex file using stm32 st-link. I can tell the firmware is there because I get data out using Hyperterminal and tsinfo command tells me that it is talking on PD8 and PD9. There is mention of editing features.h to change where the serial stream is sent. I made a few changes but when I do I only get a compile error about multiple targets and have to download a new copy of the firmware for it to work again.
I am totally new to C++ and embedded programming. My only experience is with Arduino and Picaxe uC's so I'm not very familiar with toolchains and compiling multiple files at once.
What exactly do I edit in features.h to allow rusefi to talk to Tunerstudio over the micro usb? I have installed the serial usb drivers and got the ST Demo that came pre-loaded working using the accelerometer to work as a mouse.
I've ordered the ttl to usb adapter mentioned in the Tachometer projects but it hasn't got here yet.
Thanks for your help
Cory
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14752
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Not sure how to connect to tuner studio

Post by AndreyB »

Status update: if you use the Frankenstein board, you simply plug the miniUSB cable and you've got TS.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Post Reply