Bushido news

chart_samplesimulation

The Big D and I have been working hard at coding an android app with Tacx Bushido support. The current state is that we have a working app (albeit with a few rough edges) that can simulate GPX courses. So it is with great pleasure that we release a preview (source code now up):

You will need:
– A Tacx Bushido Turbo Trainer and Headunit
– The app: http://cowboycoders.org/Cyclismo.apk
– ANT+ Radio Service: https://play.google.com/store/apps/details?id=com.dsi.ant.service.socket
– ANT+ USB Service and a USB host OTG cable (if you want to use a usb ant+ stick and your device isn’t listed on the ANT+ Radio Service page) : https://play.google.com/store/apps/details?id=com.dsi.ant.usbservice&hl=en

It is worth pointing out that you can run this in VirtualBox on windows/max/linux using android x86 (android-x86.org). I use android-x86-4.0-RC2-eeepc.iso for testing.

You will need to enable:

– Settings -> Location services -> allow GPS satellites
– Settings -> Developer options -> Allow mock locations (this was the easiest way of plotting your position on the google map)

Instructions:
– Upload a gpx you want to simulate some where on your android device
– Start the app
– Press Record
– Choose simulation mode
– Choose the Course (GPX import will appear)
– Select the GPX you uploaded earlier (takes you back to course setup screen)
– Turn on the bushido headunit
– Press Go
– After a few seconds ‘start cycling’ will appear on the headunit display
– Start cycling!

Caveats:

– Connects to the Bushido Head unit only
– Exceptions not really handled at the moment (this means the app will force close (‘stop responding’). This will happen if you don’t have the required packages (see above) or some other incompatability.
– Only tested on Android 4.03 (so your milage may vary on earlier versions)

Features:
– Shows power,cadence, speed and heart rate (in the chart view)
– Route is shown on a google map
– Export ride as tcx (to process in other bits of software)

Feature requests welcome.

In other news, BerryS has reversed a few more nuggets of the Bushido Headunit protocol (see the wiki). We now know about long/medium button presses, the device serial and the user’s weight. Cheers BerryS!

NO WARRANTY – PLEASE REGARD AS EXPERIMENTAL

BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

38 thoughts on “Bushido news”

    1. Hi,

      Quick question: how difficult would it be to create Windows or Android application that will:
      – get the power (optionally also speed cadence) measurements from bushido [this is already done in the present cyclismo application]
      – send/forward the power measurements (optionally also speed cadence) via real ANT+ protocol as a “power meter sensor” so that the ANT+ standard devices (e.g. garmin edge) would receive the measurements?

      Cheers

  1. Looks pretty neat. I’ll have to try it out, but need to pick up a usb host otg cable first. Will any ant+ dongle work (like a Garmin) or does it need to be the Tacx one?

  2. Any ANT+ dongle (idVendor=0fcf, idProduct=1008) should work (I’m using a suunto movestick mini). The older ANT dongles (idVendor=091e, idProduct=0003) with a serial interface don’t work (yet) unfortunately. I think most ANT+ dongles sold today are the newer variety.

  3. Any plan to make availeble a watt training?
    I would like program the ride on phone and not on headunit, it’s hard to program a train on it.
    Thanks

    1. Unfortunately not my friend. Tacx like to implement a new protocol for each trainer they release to keep us on our toes – At least that’s how I think it goes!

  4. Great work, I am about to open a multi-rider center. I have scored a great deal on the Bushido’s that’s very hard to pass up. Though I’m really struggling with the auto-pause feature that cannot be turned off! I’ll be mainly running time/slope sessions and ergo video’s. It’s really important that auto-pause can be turned off to ensure everyone stays in sync with the video, music and everyone else throughout the session! Any suggestions?

    1. The pause functionality is something that is implemented in the headunit. I am not aware of a way to disable it, but you could try communicating with the brake directly.

  5. Thanks Will. I’m not too bothered if the head unit pauses, it’s the TTS autopause that annoys me.
    I’m pretty sure the software auto-pause is separate from the head unit auto-pause and they could potentially be separated. So if the head unit pauses the ergovideo is not affected, the video will keep going until the person starts pedaling again.
    I need to have everyone start and finish at the same time so they can be in time with the music and video. Getting the Bushido to link directly to Ergvideo software would be ideal! What’s your email? I may be able to negotiate something if you can help out.

    1. I just checked out ergvideo and it seems to only support the computrainer and velotron trainers. Do you want to emulate one of these trainers and use that piece of software directly?

      You can contact me at the following address: will at cowboycoders.org

      Edit: just realised I was looking at the wrong piece of software. You could possibly proxy the bushidos so that they never sent back a zero speed (but this is a bit of a hack). You might be better off asking Tacx to add the feature!

    1. You can only record workouts initiated with Cyclismo. You can’t, for instance, record a workout you have initiated with Tacx Trainer Software.

  6. Hi,

    This looks really good so far – just ordered an ANT+ dongle to try out the software…

    Is this project particularly active? I just bought a Bushido, but I’m incredibly reluctant to fork out the additional fee for the TTS software (also pretty annoyed that I can’t update the firmware without the expensive software).

    Cyclismo looks like a great bit of kit to run on an Android tablet…

    1. Work has stalled recently… The library to control the turbo trainer is fairly complete, but the android side of things is fairly lacking.

  7. Tried out the app and it is really good (though my Bushido is obviously needing calibration – the resistance for a 1% gradient is just mental!)…

    I couldn’t work out how to get my heart rate monitored though – I’m using a standard Ant+ HRM strap that is paired to the Bushido. I don’t see a way of pairing it to Cyclismo (and the Tacx head unit didn’t show a heart rate count when Cyclismo was controlling the device)…

    So far, though, so very good! If I was much of a coder, I’d offer to help, but perl and unix scripts are my limit! :-/

    If you can keep the Bushido specific protocol implementation encapsulated away from the rest of the app so that dropping in a different Ant+ protocol is a doddle, it would be worth developing the main app further. The word is that Tacx, and other turbo manufacturers, are about to open up their Ant+ transmissions. In this case, you’ll be in a very strong position to have a selable app that will run with any Ant+ turbo running the new, open Trainer Device Profile…

    With some more polish and stability, this is the sort of app I’d spend a few quid on… ๐Ÿ˜‰

    1. Thanks for the feedback.

      Did you compile from source? The apk I have hosted is quite old now (I must get round to uploading a new one). In fact ,I have just remembered that I may have fixed that issue with the heart rate strap. At the moment you do have to pair it through the Bushido, but it should be fairly straight forward to allow pairing directly with cyclismo.

      The android side of things is a bit of hack at the moment (hence the need to allow mock locations), but it’s good to hear that some people are finding it semi useful – might give me the drive to get coding again!

      Will

      1. Hi Will,

        Very good of you to generate a quick build (I don’t really have the facility to compile it myself… )

        Installed and tried it this evening – I see quite a few changes.

        The two problems I have:
        1. The HRM is still not picked up (it works fine with the Bushido controlled by just the head unit).
        2. The track replay generates crazy resistances on the brake – not sure if this is a calibration issue on the brake or the app (I tried changing rider weight and turbo resistance factor (I forget the proper name for the variable) in the app, but without any impact).

        One aspect of the app that would make it immediately useful (at least to me!) would be simply to be able to record and graph all the data coming from the bushido (even better if it could be combined with other Ant+ sensors (speed/cadence for comparison, and HRM).

        If this were possible (particularly during a standard training session started by the head unit), along with output to a TCX file, I’d be a happy chap! ๐Ÿ™‚

        A possible second mode for the app?

  8. Hi, I’ve installed the app and made the changes in the settings. When I start the app everything seems to go ok. I set up a user and setup my bike, I imported a gpx file and everything seems to start fine but the bushido never says start cycling. Am I missing something? Is there some way to make sure my ANT stick is connected to the head unit? Any help is greatly appreciated. I am excited to get this working with my trainer.

    1. It may be that a firmware update has broken something? What firmware version is your bushido headunit running? If you could enable ant logging in settings and send the log file that is written to your SD card, I’d appreciate it.

      1. the software version for the Bushido computer is 0.5 . 013 and for the break it is 0.3 .008. How do I send you the logs? It looks like they are empty. When I hit go the head unit never say start cycling.

  9. Error enabling location provider – Samsung Note 2014ย 

    EXCEPTION: Requires ACCESS_MOCK_LOCATION Secure setting message…

    Not sure what the issue is here ๐Ÿ™

    Any help much appreciated,

    Steve

  10. Error enabling location provider – Samsung Note 2014 edition.

    EXCEPTION: Requires ACCESS_MOCK_LOCATION Secure setting message…

    Not sure what the issue is here ๐Ÿ™

    Any help much appreciated,

    Steve

    1. You have to enable mock locations (this may require you to enable the development features). One day I will get round to fixing the code, so you don’t need to this..

      Reports seem to suggest that the resistance settings aren’t working properly at the moment, so you might want to wait until I fix that as well.

  11. Are there plans to update it for android 4.4.x?
    Tried on Nexus 5 running 4.4.3/CM11 (with its integrated ant+ HW) and it isn’t working.
    It says connected to trainer, but bushido computer doesn’t go into PC mode.
    Then it shows a push notification like “trainer null” or something I forgot.

    All other ant+ apps work, so must be a cyclismo on 4.4.x related problem?

    If you need logs or something I can do to help, just email me. It would be good to have it working on 4.4!

  12. Hi Will, I wondered if this project is still active? Loks very promising

    Does the android app work with bushido’s connected to external power meters? ie not using brake calibration?

    thanks
    Stewart

  13. Hi,

    Quick question: how difficult would it be to create Windows or Android application that will:
    – get the power (optionally also speed cadence) measurements from bushido [this is already done in the present cyclismo application]
    – send/forward the power measurements (optionally also speed cadence) via real ANT+ protocol as a “power meter sensor” so that the ANT+ standard devices (e.g. garmin edge) would receive the measurements?

    Cheers

  14. Hi Willi

    I send this comment once a gain – cause I do not see the previous one in the comment list.

    I’ve got an older bushido tariner with hear unit. It unfortunately does not send the power data using ANT+ protocol. Therefore I cannot use it as as “pure powermeter” with my Garmin Edge device for training. Searching through the internet I have seen quite a lot of questions of such a feature i.e. to use bushido as the powermeter with ANT+ enabled receiver. The vendor of bushido obviously will not support this….

    Therefore my question:
    Would it be possible to create an application that will:
    1. Receive the power measurements from bushido (this can be easily done using your org.cowboycoders.turbotrainers library – looking at the code).
    2. Send the received data using ANT+ protocol to the receiver device. In orher words – pretend to be a Powermeter.

    Do you think it is possible to do this (especially point 2)?

    Thanks

    Martin

    1. I believe “normal” ant+ connections are one-to-one, so you won’t be able to establish a master-slave connection the bushido brake once it has paired with the bushido headunit. However, I think you can use continuous scanning mode to capture packets bound for other devices. Another option is to sit in the middle of the brake and the headunit and relay messages:

      brake < => power data extractor < => headunit

      This will enable you extract the power data.

      You can’t connect to the headunit as this will put it into pc-connection mode and you will have to take care of simulating the course etc.

      Once you have the power data, it should be trivial to spoof data packets from a power meter supported by your garmin (maybe cyclops powertap is easiest?).

  15. Hi Willi

    Many thanks for the reply.

    Just to make sure – does your turbotrainer library support to “to sit in the middle of the brake and the headunit”?

    Do you know where I could find some java examples of software emulated ANT+ power sensor so that I could forward the messages to Garmin?

    1. Q. does your turbotrainer library support to โ€œto sit in the middle of the brake and the headunitโ€?

      A. No, at present, we can either emulate the headunit, or tacx training software.

      Q. Do you know where I could find some java examples of software emulated ANT+ power sensor so that I could forward the messages to Garmin?

      A. I do not know of any such example, but you can check the source for Golden Cheetah to determine what the packets should look like.

      I think I may have misremembered yesterday; I think you can in fact have multiple slaves connect to a master. So it may well be possible just to make a passive listener, which doesn’t reply to packets, by means of a normal slave channel i.e you may just have to remove all lines that issue a reply from BushdioBrake.java.

      The latest JTurbo can be found here (we haven’t merged back for while)

    1. Hi Willi

      An update: I’ve been trying to run your code under windows. I used one of the test functions from BushdoBreakTest.java as a starting point.

      Firstly I’ve been struggling with connecting to the correct device. I think that under android the structure of USB devices is a bit different – cause your code was trying to connect to one of the usb hubs on my pc instead of the Garmin m-Ant stick. But with a bit of tweaking I managed to resolve this.

      Now the code hangs on the function LibUsb.claimInterface. Hangs – means: no exception, it is waiting endlessly on this call.

      Do you know if this is again something Android specific and I should use another function instead?

      Cheers

      Martin

Leave a Reply

Your email address will not be published. Required fields are marked *