Dsolberg8132
Active member
I need to write a function that will communicate with a Huawei R4850G2 power supply using its' CAN Bus interface. I am using a Teensy 4.1 and a printed circuit board from a 3rd party source that connects the Teensy 4.1 to a SN65HVD234 CAN Bus xcvr on CAN3. The CAN bus interface is just one small part of a much larger project monitoring and controlling a Ham solid state amplifier. This is the last function that I need to write. Most of my other functions were written for use on an Arduino Mega. These functions have been ported to the Teensy and I have written some new ones, which has give me experience with the Teensy 4.1.
The Huawei communicates at 125 kbps baud rate using extended frames.
To receive data frames with information about the power supply, such as voltage and current, you have to send a request to 0x108040FE, with the data value frames padded with zeros. The supply then responds with 0X1081407F with frames of data.
I have no previous experience with CAN bus communication so this has already been a long journey. I bought a 3rd party controller that communicates with the Huawei supply for monitoring and also for setting values. Using this controller and a USB CAN Analyzer I can monitor the interaction. I know what messages that I have to send and what responses I can expect back.
I found some sample sketches on this forum that I have been using to learn more about the CAN bus communication. Using the Flex CAN_T4 library I am able to send data frames that I can monitor on the USB CAN Bus Analyzer. I can not enter the request data frame as the msg.id. If I send smaller numeric data values the data frames are coming across as "standard" frames in the USB CAN Bus Analyzer.
What do I need to do to enable the use of "extended" frames?
Don
The Huawei communicates at 125 kbps baud rate using extended frames.
To receive data frames with information about the power supply, such as voltage and current, you have to send a request to 0x108040FE, with the data value frames padded with zeros. The supply then responds with 0X1081407F with frames of data.
I have no previous experience with CAN bus communication so this has already been a long journey. I bought a 3rd party controller that communicates with the Huawei supply for monitoring and also for setting values. Using this controller and a USB CAN Analyzer I can monitor the interaction. I know what messages that I have to send and what responses I can expect back.
I found some sample sketches on this forum that I have been using to learn more about the CAN bus communication. Using the Flex CAN_T4 library I am able to send data frames that I can monitor on the USB CAN Bus Analyzer. I can not enter the request data frame as the msg.id. If I send smaller numeric data values the data frames are coming across as "standard" frames in the USB CAN Bus Analyzer.
What do I need to do to enable the use of "extended" frames?
Don