Page 1 of 1

RusEfi Simulator Depreciated?

Posted: Sat Dec 03, 2016 3:05 am
by RustyGargoyle
Was wondering whats the deal with the RUSefi simulator.
seems a tad bit out of date, and I cant get it to work for the life of me.

I continue to get this error

Tried it on two separate windows 7 Machines.

Code: Select all

java.lang.IllegalStateException: Failed to connect to simulator
	at com.rusefi.io.tcp.TcpConnector.connect(TcpConnector.java:93)
	at com.rusefi.io.LinkManager.open(LinkManager.java:98)
	at com.rusefi.Launcher.windowOpenedHandler(Launcher.java:204)
	at com.rusefi.Launcher.access$100(Launcher.java:40)
	at com.rusefi.Launcher$2.onWindowOpened(Launcher.java:95)
	at com.rusefi.ui.util.FrameHelper$1.windowOpened(FrameHelper.java:36)
	at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
	at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
	at java.awt.Window.processWindowEvent(Unknown Source)
	at javax.swing.JFrame.processWindowEvent(Unknown Source)
	at java.awt.Window.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$400(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
	at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
	at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
	at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at com.rusefi.io.tcp.TcpConnector.connect(TcpConnector.java:88)
	... 32 more
If i launch the simulator bin by itself it "runs" but causes a lot of lag.

And then trying to connect to tunerstudio is a completely separate ordeal. With the latest version it connects then disconnects once per second.
When downgrading to ~v2.6.01 it corrupts the project files before they are made. :|

Hopefully someone on here will show me the way.

Re: RusEfi Simulator Depreciated?

Posted: Sat Dec 03, 2016 4:43 am
by AndreyB
Bad news yes, seems like the "simulator" button of the rusEfi console is broken.

Good news is looks like there is a workaround
step 1: start rusefi_simulator.exe
step 2: start the console, on top it would detect activity on port on 29001 and if you hit connect it would connect to the simulator started on step 1.

Looks like simulator button does start the process but for whatever reason it's impossible to connect to that process. I am testing on Windows 7 now, will try older and newer windows tomorrow.

Re: RusEfi Simulator Depreciated?

Posted: Sat Dec 03, 2016 5:13 am
by RustyGargoyle
russian wrote:Bad news yes, seems like the "simulator" button of the rusEfi console is broken.

Good news is looks like there is a workaround
step 1: start rusefi_simulator.exe
step 2: start the console, on top it would detect activity on port on 29001 and if you hit connect it would connect to the simulator started on step 1.

Looks like simulator button does start the process but for whatever reason it's impossible to connect to that process. I am testing on Windows 7 now, will try older and newer windows tomorrow.

Thank you for your words of wisdom :)

Any advice on tunerstudio? just run the latest version and load the included ini file with the latest snapshot?

Re: RusEfi Simulator Depreciated?

Posted: Sat Dec 03, 2016 5:16 am
by AndreyB
Yes, and use the "wifi" (?) option to connect to localhost on port 29001 or 29002

Not much wisdom on this forum, we are mostly having fun I guess.

Re: RusEfi Simulator Depreciated?

Posted: Sat Dec 03, 2016 5:20 am
by RustyGargoyle
russian wrote:Yes, and use the "wifi" (?) option to connect to localhost on port 29001 or 29002

Not much wisdom on this forum, we are mostly having fun I guess.
:lol:

Unfortunately, I haven't taken the JMP and registered my copy of tunerstudio so am limited to the basic functionality.
Am trying the Virtual Serial Port method using the HW Virtual Serial Port software. Could this be the reason for tunerstudio being flaky on the connections?

And whats the difference between port 29001 and 29002 I thought one was for tunerstudio and the other dedicated for the dev console



edit:
Tunerstudio v3.0.14.02 is working much better but after browning out about 4-5 times it says " Could not process CommInstruction. "

Re: RusEfi Simulator Depreciated?

Posted: Sat Dec 03, 2016 6:06 am
by RustyGargoyle
OK, so I figured out why ts kept disconnecting, had to do with the VSP software.

thats all sorted.

So I guess am all set to play with TS, dev console, and the simulator.

is there a concrete source of information for the abilities of the simulator. IS it possible to change AFR, MAF, MAP, TPS all dynamically?

Basically how much does the simulator simulate?
Can it load maps straight from ts?

edit:
Ok found the set_mock_XXX_voltage function
sooo cool.

for some reason it doesnt let me change the map values from the GUI's gauges. And tps seems to be locked at 100%?
Is it simulating it as a CAN bus pedal?

Re: RusEfi Simulator Depreciated?

Posted: Sat Dec 03, 2016 11:37 am
by AndreyB
Simulator UI is limited since the main reason simulator exists is for functional automatic testing - see https://svn.code.sf.net/p/rusefi/code/trunk/java_console/autotest/src/com/rusefi/AutoTest.java

No dynamic voltage control for same reason - I am using external test suite for dynamic control. There is no support for CAN pedal, there is pretty experimental support of DBW in rusEfi

Re: RusEfi Simulator Depreciated?

Posted: Sat Dec 03, 2016 7:33 pm
by RustyGargoyle
russian wrote:Simulator UI is limited since the main reason simulator exists is for functional automatic testing - see https://svn.code.sf.net/p/rusefi/code/trunk/java_console/autotest/src/com/rusefi/AutoTest.java

No dynamic voltage control for same reason - I am using external test suite for dynamic control. There is no support for CAN pedal, there is pretty experimental support of DBW in rusEfi
How can the tps value be modified?

Also does the simulator some how use the micro controllers source files for simulation? Or is it a completely separate animal?

Re: RusEfi Simulator Depreciated?

Posted: Sat Dec 03, 2016 9:54 pm
by AndreyB
set_mock_tps_voltage also other ones - note that all these accept voltage as parameter, whatever encoding logic is applied
addConsoleActionF("set_mock_clt_voltage", setCltVoltage);
addConsoleActionF("set_mock_iat_voltage", setIatVoltage);
addConsoleActionF("set_mock_maf_voltage", setMafVoltage);
addConsoleActionF("set_mock_afr_voltage", setAfrVoltage);
addConsoleActionF("set_mock_tps_voltage", setTpsVoltage);
addConsoleActionF("set_mock_map_voltage", setMapVoltage);
addConsoleActionF("set_mock_vbatt_voltage", setVBattVoltage);


90% the same source code, that's because ChiboOS and kind of cross-platform code base.

Re: RusEfi Simulator Depreciated?

Posted: Sat Dec 03, 2016 10:47 pm
by RustyGargoyle
russian wrote:set_mock_tps_voltage also other ones - note that all these accept voltage as parameter, whatever encoding logic is applied
addConsoleActionF("set_mock_clt_voltage", setCltVoltage);
addConsoleActionF("set_mock_iat_voltage", setIatVoltage);
addConsoleActionF("set_mock_maf_voltage", setMafVoltage);
addConsoleActionF("set_mock_afr_voltage", setAfrVoltage);
addConsoleActionF("set_mock_tps_voltage", setTpsVoltage);
addConsoleActionF("set_mock_map_voltage", setMapVoltage);
addConsoleActionF("set_mock_vbatt_voltage", setVBattVoltage);


90% the same source code, that's because ChiboOS and kind of cross-platform code base.

TPS seems to be locked at 100% regardless of the mock voltage applied. both from the gui gauges and running the set_mock_tps_voltage command.

But I guess its not critical for simulation. everything else seems fine :)