# Communication between BMS and PC via CAN/RS485 — where to start?

I am about to obtain BYD B-Box LV Residential battery for my off-grid solar system. The inverter I have is not on the list of compatible ones, which means (according to my local battery supplier) that the battery will simply refuse to run unless we connect it to a specially programmed device like Venux GX which will trick the BMS into thinking that it is connected to a compatible inverter. The interface is CAN/RS485.

Now my idea is to use a laptop instead of Venux GX for these reasons:

• Venux GX would not be connected to the inverter, therefore it will not have chances to react (e.g. change voltage) exactly/when the BMS wants (although the inverter can be programmed on its own, this is less than ideal). At the same time, the inverter can be controlled from PC via serial port so I would like to write a program that would coordinate the inverter and BMS to co-work nicely;
• I want to learn how to program this kind of stuff (I am a software engineer but never worked with microcontrollers before).

So, the question is about where/how to approach this task. I assume that I will need to obtain:

• Some sort of adapter from CAN/RS485 to USB?
• Some software/frameworks/languages handy to program communications over CAN/RS485?
• Any other gotchas a newbie would be advised to know?
• trick the BMS into thinking that it is connected to a compatible inverter ... how does the Venus GX do that? .... do you have the information – jsotola May 20 '18 at 23:55
• @jsotola My local battery supplier knows how to program Venus to do that. I have no idea just yet but they are offering me to sell the battery and Venus programmed to work with it. – Greendrake May 20 '18 at 23:59
• i am sure that your battery supplier does not know how the Venus GX communicates to the BMS ..... you need to know that information before you can replace the VenusGX with your own device (your laptop) – jsotola May 21 '18 at 0:16
• @jsotola Well, the supplier claims they know and they will let me know if I buy from them. So let's assume I know how they communicate for the purpose of this question. – Greendrake May 21 '18 at 0:21
• You will need to know which protocol the BMS is using or there's nothing you can do, save for trying to reverse-engineer it, which is not a newbie task. Other than that, you may or may not be able to use adapters and a laptop, depending on the real-time requirements. As a rule of thumb, forget about using PC if you need faster response time than 10ms. As for adapters, there's plenty of manufacturers, depending on if you need CAN or RS485. – Lundin May 22 '18 at 9:43