Simulator Problem

It's all about the code!
Old Grey
contributor
contributor
Posts: 85
Joined: Thu Apr 07, 2016 10:20 pm
Location: AUS Sydney 2200

Re: Simulator Problem

Post by Old Grey »

I haven't had much luck with typing "T" by it'self, because it says it's not a command, but I just tried :-

1 - I started the console,
2 - typed "telnet localhost 29002" in terminal, and got the blank terminal with cursor.
3 - typed "T", and now I'm getting "simulator 6037 1 uptime=0s ts_p_alive".

Is that what you meant.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Simulator Problem

Post by AndreyB »

yes!
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
Old Grey
contributor
contributor
Posts: 85
Joined: Thu Apr 07, 2016 10:20 pm
Location: AUS Sydney 2200

Re: Simulator Problem

Post by Old Grey »

I was looking at some old clips and TS used to load to 26% even before I installed telnet in my Win7. Do we still actually need telnet at all, because it seams to do the same thing with and without telnet.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Simulator Problem

Post by kb1gtt »

Telnet is a fairly basic tool, which allows really basic serial communications. I think telnet was noted as most windows PC's can have it with out doing a different download. The telnet step is simply to verify some very basic communications. AKA it allows you to check that your firewall is not blocking the virtual com port side of things. Most virtual com port programs will relay traffic to something known as "localhost" which is also commonly known as this ip address 127.0.0.1 Basically the virtual com port will have a two parts. One part will get the information from the com port and send it to this localhost IP address. Then another part will take the information from this IP address and send it out the virtual com port. When it goes to this IP address, there is a chance the firewall or similar routing related issues can arise. So it can be handy to simply your over all setup by using a more basic tool which was provided by Microsoft. Once you verify the virtual com port is communicating and is not being blocked by IP routing magic, then you can start to look at TS for problems. Basically TS will connect the same way telnet connects. TS will send a send commands to the com port similar to what you did when you hit "T". Of course TS will send then faster, and will send many more commands. If you can get an echo telnet, then presumably TS can do the same. Also note that the virtual com port typically only allows one connection, so if you get it to echo on telnet, then it is a good idea if you close telnet before trying with TS. Also note that if you attempt to open two programs on the same com port, it is common that the com port program will go wonky, and a PC reboot might be in order. So best to try only one com port connection at a time. Only try TS or only try telnet, do not try both at the same time.

Telnet is technically not required, and you could do the same with programs like putty or hyper-terminal. Also if your virtual com port is working and if the simulator is working as expected, then it should work. Telnet is just a diagnostics step to see if you have communications with the simulator and with the virtual com port.
Welcome to the friendlier side of internet crazy :)
Old Grey
contributor
contributor
Posts: 85
Joined: Thu Apr 07, 2016 10:20 pm
Location: AUS Sydney 2200

Re: Simulator Problem

Post by Old Grey »

DOH!

Here I am turning firewalls off, disabling anti-viruses, and rebooting left right and centre, and all this time telnet was telling me I didn't need to worry about that. Oh well at least I got to see an ASCII version of Star Wars through telnet. :roll:
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Simulator Problem

Post by AndreyB »

Old Grey wrote:
Wed May 08, 2019 9:10 am
Do we still actually need telnet at all, because it seams to do the same thing with and without telnet.
No, we do not need telnet - telnet is only a diagnostics tool. telnet has zero function here, only while trying to confirm that at least something works.
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: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Simulator Problem

Post by AndreyB »

And I've got news :)

While we still do not know why "blockingFactor = 400" gives us error at 26% while "blockingFactor = 200" seem to load the tune, I got a word from Tuner Studio people that they will adjust Tuner Studio so that our gauges would load with our "blockingFactor = 200" workaround. Right now TunerStudioMS Beta is v3.0.60.54 - sounds like we need to wait for the NEXT beta and try again.
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
Old Grey
contributor
contributor
Posts: 85
Joined: Thu Apr 07, 2016 10:20 pm
Location: AUS Sydney 2200

Re: Simulator Problem

Post by Old Grey »

If TS is the problem this vid is going to be weird, because you need a TS beta. I wonder why it was working before, because TS 3.0.28 has been around a long time and you would think it would still be ok.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Simulator Problem

Post by AndreyB »

Old Grey wrote:
Wed May 08, 2019 10:22 pm
If TS is the problem this vid is going to be weird, because you need a TS beta. I wonder why it was working before, because TS 3.0.28 has been around a long time and you would think it would still be ok.
I guess it was working many years ago when rusEfi was pumping less data and ochBlockSize and/or blockingFactor were smaller. It could also be that we have broken something - again, blockingFactor reduction from 400 to 200 is a work around, not a real fix. I have no idea what is the root cause of this issue.

Theoretically we have an archive of bundles at https://svn.code.sf.net/p/rusefi/code/firmware_archive/

You would not believe it - https://svn.code.sf.net/p/rusefi/code/firmware_archive/rusefi_bundle_20150131.zip actually works :) But that version has blockingFactor = 256 and ochBlockSize = 116 in rusefi.ini file
So it could be that back in 2015 we were simply not hitting whatever is the problem, whatever is the layer where the problem happens. I would not have motivation to go over historical versions to find at which date it got broken at which blockingFactor / ochBlockSize since it would not get us closer :(

Unfortunately the work around is to buy TunerStudio license since without HW VCP it works via (not free) TCP/IP connector of Tuner Studio. The fact that it works without HW VCP makes me wonder if there is some magic setting in HW VCP or around HW VCP which control serial port buffer size or something like that?
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
jonieboy
Posts: 2
Joined: Sat Nov 02, 2019 11:57 am

Re: Simulator Problem

Post by jonieboy »

Hey guys!
I just wanted to start learning ECU Programming.
Thats why i wanted to simulat with the rusefi simulator. I did as shown in the youtube tutorial!
The error i get is shown in the picture.
Image
In the other picture you can see, that tunerstudio gets the infos from the rusefi simlulator cause it has rpm set to 1200.
Image
The virtual serial port looks like that
Image
Thanks guys!
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Simulator Problem

Post by AndreyB »

@jonieboy I believe you are experiencing the same problem. I believe the problem is with serial port simulation software - it does not handle packets above 256 bytes properly.

Secondary problem is that TS does not allow us to use smaller packets, while we have new TS beta to try the fix, official TS version is still the same .28.

So, you have four options
1) see if you can find other TCP to serial emulator and try it
2) buy real hardware maybe stm32f4discovery $20
3) buy TS license to use TCP connector $65
4) try TS beta while lowering relevant block sizes and maybe changing message formats, see more info in tickets in this thread https://github.com/rusefi/rusefi/issues/794
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
jonieboy
Posts: 2
Joined: Sat Nov 02, 2019 11:57 am

Re: Simulator Problem

Post by jonieboy »

russian wrote:
Sat Nov 02, 2019 1:08 pm
@jonieboy I believe you are experiencing the same problem. I believe the problem is with serial port simulation software - it does not handle packets above 256 bytes properly.

Secondary problem is that TS does not allow us to use smaller packets, while we have new TS beta to try the fix, official TS version is still the same .28.

So, you have four options
1) see if you can find other TCP to serial emulator and try it
2) buy real hardware maybe stm32f4discovery $20
3) buy TS license to use TCP connector $65
4) try TS beta while lowering relevant block sizes and maybe changing message formats, see more info in tickets in this thread https://github.com/rusefi/rusefi/issues/794
Hey, thank you for your answer!

I got a rasperry pi 3 b+.
Can it help me somehow ?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Simulator Problem

Post by AndreyB »

sell pi 3 pi, buy stm32f4discovery or one of supported nucleo boards
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: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Simulator Problem

Post by AndreyB »

Latest TunerStudio 3.1.01 has the fix we needed for https://github.com/rusefi/rusefi/issues/794

In the rusefi.ini file change from

Code: Select all

blockingFactor = 400 ; max chunk size
to

Code: Select all

blockingFactor = 256 ; max chunk size
and simulator would be working with HW Virtual Serial!

I will wait a month to give everyone a chance to upgrade their TunerStudio before I push the change into official rusEfi.
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