No announcement yet.

Can't communicate with Bafang Controller, please help.

  • Filter
  • Time
  • Show
Clear All
new posts

    Can't communicate with Bafang Controller, please help.

    EDIT: Partially Solved....

    Here's the driver I used, that worked ONCE only for me:


    I tried to look at the settings on my Luna provided BBSHD today, using the Luna USB programming cable. But, I was unsuccessful.

    I was able to get the PC to recognize the cable as a COM port, but only after installing drivers I found for it at EMPoweredcycles: My PC initially disabled the device as 'invalid device error' or something like that, but un-installing and re-installing both the device and driver resolved that. I did a restart for luck.

    So, cable plugged into Windows 8 PC and recognized as COM4, check.

    Next, launch the Bafang software. Type COM4 into the window. Check.

    Press connect button in software. Program connected to the cable OK. At least, the program status changes from showing the 'close' button as greyed out, to normal, like this:

    I can disconnect and reconnect the program to the cable reliably this way. But when I connect the cable to the bike and plug in the battery, nothing changes. The 'Controller Info' never shows up in the software. And all the read/write buttons stay greyed out. As in the above screenshot.

    This is a problem regardless of what order I connect the various items.

    I have followed the instructions on that EMP link above, and I also tried Karl's (slightly different) instructions at Electric Fatbike:

    But, I am losing my sanity. No matter what I try, I can't talk to this thing. The Bafang 961 controller can talk to it just fine, and change settings, so I think the controller and it's cable are fine.

    I tried running in Win7 compatibility mode, as I read that the Bafang software definitely works on that OS. And I tried XP mode. No dice.

    I set the COM port settings to 1200 baud, to match the 1200 'bandrate' listed in the software.

    What should I try next? Any help will be greatly appreciated.
    Last edited by JPLabs; 02-25-2016, 05:43 PM.
    Fabrication is fun! Build something today. Show someone. Let them help. Inspire and share. Spread the desire.

    Do you have the latest prolific drivers installed?
    These are the correct drivers in my experience.
    Prolific Technology is a IC design house company and ASIC design service provider for USB Smart I/O (USB to UART, Card Readers, External USB Drive), Intelligent Green Energy Saving, and Mixed-Mode Hall Sensor solutions.
    Last edited by Louis; 02-24-2016, 11:09 PM.


      Thanks Louis. I do not have those installed, and wasn't aware they were needed - thanks, I'll try it.

      It's so nice to have a dedicated support forum from you guys!!!
      Fabrication is fun! Build something today. Show someone. Let them help. Inspire and share. Spread the desire.


        OK, I uninstalled the drivers I'd gotten from the EMPcycles link, and installed these. But now the device returns Error 10 - according to the Prolific instructions, an old or counterfeit chip is suspected. Left side of screenshot is my Device Manager window, with Device Properties showing Error 10 below that. Right side of screenshot is showing the documentation from Prolific:

        When plugged into a Linux machine, the chip is identified as a Qinheng HL-340, not a Prolific chip.

        Thoughts? Do I perhaps have a counterfeit chip? From you comment, it sounds like the Prolific Chip is the intended hardware for a Bafang programming cable. Is this HL-340 another legitimate chip which is supposed to work with the Bafang programming, too?

        The prior drivers I had installed caused the device to be identified as CH-340. That setup didn't return this error, but it wouldn't talk to the bike, either.

        I'll look for drivers specific to HL-340, next. Since that's what Linux identified as the hardware name.

        EDIT: Update - I couldn't find HL-340 drivers, but I did find CH-340 drivers newer than I had before, and is supposed to be verified on Win8.1. So, I'm off to the shop to see if they work. Fingers crossed. These appear to be the same driver family I had from EMPcycles, but not sure if newer version.

        I'm not a PC expert by any means, mostly fumbling around here with help from a smart high schooler....but if this works, I'll post the driver link for others to use.
        Last edited by JPLabs; 02-25-2016, 01:42 PM.
        Fabrication is fun! Build something today. Show someone. Let them help. Inspire and share. Spread the desire.


          EDIT: It worked, once. Only once. Rats, still trying. Some kind of PC issue here I think.

          Here's the driver I used:

          I think my problem was that I'm on WIN8.1 and simply needed specific drivers for the non-Prolific chip, with that OK.

          Louis, it might be nice to post a link to this driver on the cable sales page on Luna Cycles, if you can pass the word along.
          Last edited by JPLabs; 02-25-2016, 03:52 PM. Reason: Corrected 'solved' as it only worked once.
          Fabrication is fun! Build something today. Show someone. Let them help. Inspire and share. Spread the desire.


            Well, 3.5 more hours of trying everything I can think of, and I am out of ideas. I even resorted to a system restore, to a point earlier today before I installed the new drivers. Then started over. Nope, no luck.

            For reference, the driver which worked once was CH340 3.4.2014.8 Its from the source I linked above, but the version number might be helpful. Does anybody else use this version successfully with WIN 8.1? If not, what do you use?

            I guess I could try a different kind of cable if possible, does anybody know if there is an alternative I can try? If I order from EMPcycles, for example, would I just get another exactly like this one? I'd love to know of one which definitely uses a legit Prolific chip in it.

            Or, I can borrow a laptop with a different OS and try that.

            Please note that I do not hold Luna Cycles in any way accountable for my difficulties. I know this is a DIY situation and I'm extremely pleased that the Luna Cycles team will sell us the hardware, and even attempt to help us along the way. I know that there is no guarantee on their part that any individual will be successful.

            But I need to figure this out. More suggestions are welcome! I'll try about anything at this point.
            Last edited by JPLabs; 02-25-2016, 05:48 PM.
            Fabrication is fun! Build something today. Show someone. Let them help. Inspire and share. Spread the desire.


              I should probably not comment, but I will. I think programming is over rated. I have cables, I can link. but i've been running the same parameters we ship controllers with for 2 years. On 6 different motors. BBS01's, BBS02, BBS02 clone, and now two BBSHD. It works. Me? I'm in the if it ain't broke why fix it group. All this thunder and blather about programing when for a vast majority of users the programming provided, just works. I cringe every time a customer insists on a cable after reading Karl's great missives. I get why Karl programs. He's got more motors than Bafang. But for the average user? I think it's an invitation to a fried controller. As always, YMMV VBG!


                After getting to know the motor better, I have a specific goal for the programming. I want to allocate one more, lower cadence, PAS level that's appropriate for slower cruise where minimal power is required. Like in a subdivision, on a flat road. Something like 33% speed instead of the 44% minimum that it shipped with. With the shipped settings, the lowest PAS (PAS1 44%) is still a fairly high cadence. It's hard to be stealthy when I need to spin like crazy even at 10 mph in PAS. I'll limit the current further for that slow PAS setting to keep motor stress low. It's not intended for hills, but for slow rolling.

                Additionally, I want to reduce the PAS power cut time below 250 mS. PAS stays on a touch longer than I would like. But in general, I agree, the shipped settings are pretty great. It's evident that a lot of thought and testing went into them. I don't have any complaints, just slightly different preferences.

                I understand you are satisfied with the settings. But I want to be able to tweak them to be perfect for ME and my usage situation. I've learned to program 2 of my cars to do the same, and purchased the needed hardware. One includes a fairly drastically modified engine, and I have I think 52 iterations and counting of tune, test, repeat. Some folks place high value in being able to customize our powertrain controls. It's definitely part of the appeal of the BBSHD, for me.

                Thanks again for sharing your thoughts on it, I really do appreciate all your help!
                Fabrication is fun! Build something today. Show someone. Let them help. Inspire and share. Spread the desire.


                  My biggest objection is the rush to program by those who read the missives, when most would likely be happy with the great parameters already programmed. I see a lot of struggles, and have read about a lot of failures as a result of idle curiosity. You seem to have specific goals. But there are inherent dangers in stepping outside the parameters Karl outlines. More than one expert has killed a controller. To date no one has cracked Bafang engineers code, including some very talented coders and engineers on ES, over 3 years. I just hate to see new users buy new controllers. Eric stands behind his customers, but EM3ev quit selling controllers to non customers after an early rash of warranty claims by experimenters. Me? I'll hand back and wait for proven methods to be published. The bleeding edge, bleeds my wallet! VBG

                  Not to be snarky, or rude, but if I couldn't get the cable to work, I'd be even more cautious. But remember, I'm an old fart living on a pension. Riding a bike at 30mph overrides my pacemaker.
                  Last edited by Louis; 02-25-2016, 09:21 PM.


                    BTW thanks for the great back and forth. I really appreciate your insights!


                      Today I dried the cable on a Win7 machine, with drivers Windows picked ( CH340 3.1.2009.6). It worked, but only if I run Bafang program 'as administrator'.

                      And, it works on my Win8.1 machine now, too, recognizing the COM port automatically. I'm using the HL-340 3.3.2011.11 driver there. I had tried same yesterday with no luck on WIN8.1

                      This is crazy. At least it's working now. Yay.

                      I ordered another cable from a different source, which is supposedly direct from Bafang, to try also. In case this one keeps giving me trouble.

                      I know I don't have a clear solution to post, and I'm sorry for that. But I hope someone can either find useful info here, or better yet, explain a more robust method. At least, be encouraged that it finally worked.
                      Last edited by JPLabs; 02-27-2016, 10:18 AM.
                      Fabrication is fun! Build something today. Show someone. Let them help. Inspire and share. Spread the desire.


                      • markcycles
                        markcycles commented
                        Editing a comment
                        Yea having to run programs like that as administrator is standard. If you right click the program, click properties and then go to the compatibility tab there is a check box near the bottom "Run as administrator" that will make that automatic from then on

                      Great, thanks for the tip!

                      I like having the 33% speed PAS1, 45% current. PAS2 is the now the 44% minimum PAS speed it came with from Luna, which was previously PAS1. The rest are evenly spaced, just slightly adjusted to smooth out the steps. The low PAS1 is real nice for slow easy cruising.

                      I finally tried asphalt today. I can pedal up to PAS4 on road, maybe 16 mph in top gear, great 'normal' riding pace, albeit fast spinning.

                      Loving it still.
                      Fabrication is fun! Build something today. Show someone. Let them help. Inspire and share. Spread the desire.


                        I know that this is an old topic, but after struggling to connect with the Bafang software on 5 different computers and trying everything I could find as a fix, I finally solved my connection problem.
                        The Bafang software will only let you connect to Com ports 1-4.
                        If when you plug in the cable to the USB port, it designates it to com 15 for example, it will not connect. It will give you a report - Error opening serial port!
                        You have to look to see which of the ports 1-4 aren't being used, and then change the port number for the programming cable to that number.


                          Hey thanks for that info. Worth bumping the old thread, for sure!
                          Fabrication is fun! Build something today. Show someone. Let them help. Inspire and share. Spread the desire.


                            I ran into the same issue this week with a home grown program that only goes up to COM10. I used the method in this link (to give credit where due).
                            I believe that a new COM port is used even if you plug the same device into a different USB port. I had duplicates of 2 3G modems and I know I plugged them in to different USB ports.