Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for other elink versions #20

Closed
tpbryant opened this issue Apr 25, 2020 · 7 comments · Fixed by #22
Closed

Add support for other elink versions #20

tpbryant opened this issue Apr 25, 2020 · 7 comments · Fixed by #22
Milestone

Comments

@tpbryant
Copy link

thanks for sharing your code,
I have tried running this on an elink R8311 but receive the following errors:

2020-04-25T04:13:59.437Z:ERROR:Application: CommandStationError: Unsupported eLink version encountered, version=105
at ELinkCommandStation.
(/home/pi/Itokawa/Itokawa/dist/devices/commandStations/elink.js:347:23)

and also this error keeps scrolling through, is this a pi configuration issue?

2020-04-25T04:14:10.896Z:ERROR:Application: Command station error
2020-04-25T04:14:10.898Z:ERROR:Application: Error: Error Resource temporarily unavailable Cannot lock port

@tpbryant
Copy link
Author

ok errors are gone after I edited Itokawa/dist/devices/commandStations/elink.js,
and made the following change:
const SUPPORTED_VERSIONS = new Set([
0x69 // 1.05
]);

checking in the webpage it also shows as:
Version: 0.2.0
Command Station: eLink 1.05
Git Revision: e9b4886

@elpollouk
Copy link
Owner

Thanks very much for trying this out, I'll get on this tomorrow.

I'm guessing you're eLink firmware is at version 1.05 which is something I'm unable to test which is why I have the version check. Just for my own curiosity, is there a reason why you haven't updated to firmware 1.07?

@elpollouk
Copy link
Owner

For the errors, my only guess is that the older version of the firmware behaves slightly differently so some more debugging may be required if you're willing to help me run some tests?

@tpbryant
Copy link
Author

actually there was no errors once i edited the firmware check to be the same as my version, the webpage then appears to connect to elink and send commands ok (although I do not have it hooked up to a track or trains at present).
I did not realise the firmware could be updated, is there a site somewhere to get newer firmware? (hadn't used the elink since I bought it a couple of years ago, its just sat in a box until i found the time to set it up)
happy to help run further tests if you want further dumps etc. for this version... otherwise we can look at updating it?

@elpollouk
Copy link
Owner

The firmware updates ship with the latest versions of Rail Master which can be found here:
https://www.hornby.com/uk-en/forum/hornby-railmaster/?p=1

However, if 1.05 appears to be working for you, you might be ok sticking on the current version.

@elpollouk elpollouk linked a pull request Apr 26, 2020 that will close this issue
elpollouk added a commit that referenced this issue Apr 26, 2020
* Added firmware 1.05 to the list of supported eLink versions.
* Made applyChecksum an exported function and made it usable inline.
@elpollouk
Copy link
Owner

elpollouk commented Apr 26, 2020

I've pushed out the latest changes to enable firmware 1.05, so I'd be interested to hear how you get on. The version with the fix in should be 0.2.2, revision 8172bc2.

If you intend to update using the built in update feature, you will need to undo your local changes to enable your eLink otherwise the update will fail with a merge conflict.

Thanks very much for taking the time to report the issue and investigate the fix, it's very much appreciated by me.

@tpbryant
Copy link
Author

tpbryant commented May 5, 2020

many thanks, updated the binaries and it successfully launches for the 1.05 elink version
Will now investigate updating the firmware to a newer version

About screen is as follows:
Version: 0.2.3
Command Station: eLink 1.05
Git Revision: 3b1b756

@elpollouk elpollouk added this to the Release 0.2 milestone Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants