GithubHelp home page GithubHelp logo

sarnau / loxlink Goto Github PK

View Code? Open in Web Editor NEW
46.0 46.0 22.0 39.4 MB

Loxone extension and tree device sample implementation for a STM32

Home Page: http://www.sarnau.info

C++ 1.28% C 97.58% HTML 1.12% Python 0.02%

loxlink's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

loxlink's Issues

send_analog_value error

I think that there's an error in void LoxNATExtension::send_analog_value:
msg.data[1] = format & (flags & 0xF0);
should be
msg.data[1] = format | (flags & 0xF0);

Tested and working with a RoomComfortSensor sending dummy temperature and humidity data. Should I issue a pull request? Not experienced with git...

Serial Nummer der Extension eintragen, LEDs blinken nicht...

Hallo, ich versuche schon seit längern das ich eine DI extension mit dem STM32F103VET6 herstelle... Leider scheitere ich dabei.

Ich habe die AES Keys ausgelesen und mittels Cross Studio das Programm aufgespielt.

Leider weis ich nicht ob und wo ich die Serien Nummer der DI extension eintragen soll oder muss.

Die LEDs blinken leider auch nicht. Ich habe bei den preprocessor properties bereits das STARTUP_FROM_RESET eingetragen jedoch hilft das nichts.

Da ich ein ziemlicher Anfänger bin weiß ich leider nicht mehr weiter.

Vielleicht kann mir jemand ein paar Tipps geben.

Danke im Voraus Franz

Tree Device

Hi,
Ich habe mal versucht ein Tree Device zu kompilieren. Es ist aber nur möglich, wenn auch die Tree Extension mit kompiliert wird.
Ist es also richtig, dass man kein Tree Device stand-alone kompilieren kann?

Di Extension booted nicht

Ich habe main.cpp angepasst, so dass mein STM32F103VET6 Board eine DiExtension werden soll:

#include "system.hpp"

#include "LED.hpp"
#include "Watchdog.hpp"

#include "LoxCANDriver_STM32.hpp"
//#include "LoxBusTreeExtension.hpp"
#include "LoxBusDIExtension.hpp"
//#include "LoxBusTreeAlarmSiren.hpp"
//#include "LoxBusTreeRoomComfortSensor.hpp"
//#include "LoxBusTreeTouch.hpp"
//#include "LoxLegacyDMXExtension.hpp"
//#include "LoxLegacyRS232Extension.hpp"
//#include "LoxLegacyModbusExtension.hpp"
//#include "LoxLegacyRelayExtension.hpp"
//#include "LoxBusTreeRgbwDimmer.hpp"

int main(void) {
  system_init();

  static CTL_TASK_t main_task;
  ctl_task_init(&main_task, 255, "main"); // create subsequent tasks whilst running at the highest priority.

  // Warning: be aware that two relay extension need two different serial numbers!
  uint32_t serial_base = serialnumber_24bit();

  static LoxCANDriver_STM32 gLoxCANDriver(tLoxCANDriverType_LoxoneLink);
#if EXTENSION_RS232
//  static LoxLegacyRS232Extension gLoxLegacyRS232Extension(gLoxCANDriver, serial_base);
#endif
#if EXTENSION_MODBUS
//  static LoxLegacyModbusExtension gLoxLegacyModbusExtension(gLoxCANDriver, serial_base);
#endif
  static LoxBusDIExtension gDIExtension(gLoxCANDriver, serial_base, gResetReason);
  //  static LoxLegacyRelayExtension gRelayExtension(gLoxCANDriver, serial_base);
  //  static LoxLegacyDMXExtension gDMXExtension(gLoxCANDriver, serial_base);
  //  static LoxBusTreeExtension gTreeExtension(gLoxCANDriver, serial_base, gResetReason);
  //  static LoxBusTreeRoomComfortSensor gTreeRoomComfortSensor(gTreeExtension.Driver(eTreeBranch_rightBranch), 0xb0112233, gResetReason);
  //  gTreeExtension.AddDevice(&gTreeRoomComfortSensor, eTreeBranch_rightBranch);
  //  static LoxBusTreeTouch gLoxBusTreeTouch(gTreeExtension.Driver(eTreeBranch_leftBranch), 0xb010035b, gResetReason);
  //  gTreeExtension.AddDevice(&gLoxBusTreeTouch, eTreeBranch_leftBranch);
  //  static LoxBusTreeAlarmSiren gLoxBusTreeAlarmSiren(gTreeExtension.Driver(eTreeBranch_leftBranch), 0xb010035c, gResetReason);
  //  gTreeExtension.AddDevice(&gLoxBusTreeAlarmSiren, eTreeBranch_leftBranch);
  //  static LoxBusTreeRgbwDimmer gLoxBusTreeRgbwDimmer(gTreeExtension.Driver(eTreeBranch_rightBranch), 0xb0200000, gResetReason);
  //  gTreeExtension.AddDevice(&gLoxBusTreeRgbwDimmer, eTreeBranch_rightBranch);

#if DEBUG && 0
  MX_print_cpu_info();
#endif
  gLED.Startup();
  gLoxCANDriver.Startup();

  Start_Watchdog();
  ctl_task_set_priority(&main_task, 0); // drop to lowest priority to start created tasks running.
  while (1) {
  }
  return 0;
}

Ich habe die BuildConfig auf Release gestellt. Dadurch musste ich in LoxBusTreeRgbwDimmer.cpp

void LoxBusTreeRgbwDimmer::ReceiveDirect(LoxCanMessage &message) {
    **//message.print(this->driver);**
    LoxBusTreeDevice::ReceiveDirect(message);
}

message.print(this->driver) auskommentieren, da sonst ein compiler Fehler kommt:
'class LoxCanMessage' has no member named 'print'

LoxCANBaseDriver.cpp

/***
 *  Received a message
 ***/
void LoxCANBaseDriver::ReceiveMessage(LoxCanMessage &message) {
  ++this->statistics.Rcv;
#if DEBUG && 0
  debug_printf("CANR:");
  **message.print(*this);**
#endif
  for (int i = 0; i < this->extensionCount; ++i) {
    this->extensions[i]->ReceiveMessage(message);
  }
}


Das eigentliche Problem was ich nun habe ist, dass die beiden LEDs D3 und D2 nur gerade nach dem uploaden des codes zu blinken beginnen. Wenn ich den Chip resette über SW1 oder CrossStudio blinken diese nicht mehr. Habe BOOT0 und BOOT1 auf 0. An was liegt das weshalb started der Code nur gerade nach dem Flashen?

ctl.h: No such file or directory

Ich hab mich an das Build gemacht aber leider findet er die ctl.h nicht.
Leider bin ich noch sehr grün hinter den Ohren mit dem Zeugs.
Woher bekomme ich denn diese?

Vielen Dank

ctl_start_timer from STM32_ctl.c counts every TEN_MS instead of ONE_MS

I made a custom Di Do extension with galvanic insulation. For the input I am using Si838x chips.

I configuration loxone to switch an output, when it detects an input.

When I shortly press the button the yellow led turns on, but the mcu does not detect it. And therefore does not turn on the output. I have to press the button quit long to properly detect an input. This makes it impossible to detect a double click.

As far as I understand the code. With the help of TIM3 it should update the state of the input pins every millisecond. And send it immediately if there is a change of state.

The "Minimum time interval" settings from the loxone config apps are ignored. Or did I miss something in the code?

Is there anything I can do to get a faster refresh rate of the input pins? The goal is to detect at least a triple click on my light switch.

Solution in : #18 (comment)

ctl.h: No such file or directory

Ich bekomme beim Compilieren des Projektes folgende Fehlermeldung:
ctl.h: No such file or directory

Gibt es da schon abhilfe?

Authentifikation fehlgeschlagen

Ich habe es nun geschafft die Di Extension in Betrieb zu nehmen. Die Freude war aber von sehr kurzer Dauer. Loxone wollte die Extension von 10.02.02.28 auf 10.03.11.08 aktualisieren. Dies ist logischerweise fehlgeschlagen. Damit er diese nicht aktualisieren will habe ich die Versionsnummer in LoxBusDIExtension.cpp auf 10031108 geändert. Worauf hin Loxone einene Meldung gebracht hat und die Extension deaktivert hat.
Screenshot_2020-01-19-17-47-25-084_com loxone kerberos
Vorher hatte ich noch kurz einen Eingang unter der alten Versionsnummer testen können :)

Hast du einen Tipp wie man diese Authentifikation vorgaukeln kann?

Segger Embedded Studio for Arm

Hallo,

Habe versucht das Crossstudio Projekt nach Segger zu portieren. Leider bekomme ich ne Menge Linker Errors. Liegt wahrscheinlich daran, dass Crossstudio Datein benötigt werden.

Hat irgendjemand diese Portierung bereits erledigt?
Andere Alternative, die frei verfügbar ist?
Ich würde gerne, nach Ablauf der Evaluation Phase weiter am Code herumbasteln.

Danke!!

TreeBus-only devices: Authentication Failed

Hab die AlarmSirene Tree direkt auf dem TreeBus getestet. Wird problemlos erkannt und meldet auch z.b. Sabotagekontakt. Allerdings kommt nach kurzer Zeit der Hinweis Authentication failed.
Leider kann ich in Crossstudio nur Compilieren aber flashen funktioniert nicht, Daher kann ich den Debugger nicht verwenden eventuell weitere Infos zu liefern. Hat jemand von euch Tree Geräte mit Crypto getestet? Läuft es bei euch?

GPIO´s anders zuordnen

Hallo, ist es möglich die GPIO´s anders zuzuordnen?
Ich habe eine fertige SPS Platine ( FX3U-56MR) mit dem STM32F103VCT6 diesen habe ich bereits soweit das ich den Code aufspielen kann. Leider stimmen die GPIO´s der Relais und der Eingänge nicht mit denen des Codes überein. Somit wäre es interessant ob bzw. wo und wie ich die GPIO´s anders zuordnen kann. Der CAN müsste zum Beispiel auf PD0 und PD1 das Run LED auf PD10. Ich habe schon einiges versucht leide blinkt weder das LED noch kann ich die Platine an den Miniserver verbinden. Danke im Voraus Franz.

random_range overflows

Hi,
I was debugging the code and found out that random_range() fails due to uint16 overflow.
There is this code (global_functions.cpp line 17)
uint16_t range = maximum - minimum + 1;

and LoxLegacyExtension.cpp calls it with maximum 0xffff and minimum 0.
So the range gets 0 due to oveflow.

Then line fails:
return value % range + minimum;

because of modulo by 0.

Making the range uint32_t fixes the problem.

Device "clocking frequency" and interrupts

Thank you very much for this in depth analysis and work (also in the other repository about the miniserver).
If I read this correctly, all the main tasks for devices are done inside the Timer10ms method. Does this mean that the devices essentially run at 100Hz update intervals?

How would you implement functionality for the touch device, I assume you wouldn't just scan the touch state at 100Hz but listen for interrupts of the touch driver. On which layer of this hierarchical structure (with CAN Driver, Extension class, Device class) would you implement the interrupt call?

DMX Extension Authentication Fail

Sobald ich der DMX Extension Aktoren zuweise kommt das Autentifizierungsproblem wieder :(
Kann es sein, dass die Legacy sich doch etwas anders autentifizeren?
Habe ich es falsch verstanden, dass LoxLegacyDMXExtension von der LoxLegacyExtension erbt und sich die Methode FragmentedPacketToExtension um den Crypto-Key kümmert? Muss ich noch etwas anderes beachten, dass ich eventuell übersehen habe?

Tree Interkommunikation

hi

are there any plans to reverse engineer tree intercommunication ?

would be cool to use it as a data channel to the miniserver

br

Entwicklungsumgebung

Hallo Markus,
vielen Dank für dein Super Projekt.
Ich kenne mich mit den ST32 Entwicklungsumgebungen bisher nicht sehr gut aus.
Dein Projekt ist in Crossworks erstellt !? Ist es hierfür notwendig eine Lizenz zu kaufen oder gibt es auch kostenfreie Varianten?

Vielen Dank!
Grüße Fabian

1 Wire extension

Hi, hat zufällig jemand hier schonmal eine 1 Wire extension implementiert?
Gruß challo

RS232 Extension muß an CrossWorks Tasking Library angepaßt werden

Ich konnte erfolgreich eine DiExtension in Betrieb nehmen. Vielen Dank für die Kryptoerweiterung 👍
Habe bei mir 2 Miniserver und habe mit dem PythonScript bei beiden die gleichen Keys erhalten.

Nun wollte ich die RS232 ausprobieren und habe dazu in LoxLegacyExtension.hpp
'''
#define EXTENSION_RS232 1
'''
von 0 auf 1 gewechselt.

Jetzt reklamiert er jedoch in LoxLegacyRS232Extension.hpp, dass er Zeile 13 #include "queue.h" nicht finden kann. Wo finde ich diese Datei?

Firmware update

I have adapted the code to update the firmware version when receiving NAT update packages. This works fine but I can't get the CRC verify to work. This causes the Miniserver to keep retrying until it eventually stops communicating with the Extension. If I then reboot the Miniserver and add the Extension again, it works fine (until the Extension is rebooted).
I would like to get the CRC check working, could you help by providing some more documentation about the following statement?

0x80 | from Device | Confirm success of the verify, Page is 0 and "the actual 32-bit CRC" in the optional data area

I2C2_EV_IRQHandler is missing (LoxBusTreeRoomComfortSensor)

@KjellVerb I am getting an error when I try to compile the latest master. Can you help me solve this issue?

LoxLink Debug/LoxBusTreeRoomComfortSensor.o: in function `I2C2_EV_IRQHandler':
undefined reference to `HAL_I2C_EV_IRQHandler'
LoxLink Debug/LoxBusTreeRoomComfortSensor.o: in function `I2C2_ER_IRQHandler':
undefined reference to `HAL_I2C_ER_IRQHandler'

I temporarily solved it like this:

extern "C" void I2C2_EV_IRQHandler(){
    //HAL_I2C_EV_IRQHandler(&hi2c2);
}
extern "C" void I2C2_ER_IRQHandler(){
    //HAL_I2C_ER_IRQHandler(&hi2c2);
}

CrossStudio und ST-Link

Hallo Zusammen

Hat wer von euch schon das Projekt mit einem ST-Link Flashen können?

Bei mir sind nun meine Boards angekommen und ich kann nun auch Testen.
Mit den ST-Link und uVision konnte ich verifizieren, dass ich das Board beschreiben kann und der Treiber auch korrekt funktioniert.
Das File von @matlab22 habe ich via STM32CUBE Programmer auch getestet und den Pin PC13 gemessen.

Beim uploade-Versuch aus CrossStudio bekomme ich jedoch einen DEV_AP_ACCESS_ERROR.
Loading target script file STM32_Target.js Executing match part name script Executing script MatchPartName("STM32F103VE") Loading target script file STM32_Target.js Preparing target for download Executing Reset script Reset() Erasing ‘LoxLink.elf’ on ST-LINK/V2 Erase successful Downloading ‘LoxLink.elf’ to ST-LINK/V2 Programming 51.0 KB of addresses 08000000 — 0800cc3f Programming 0.0 KB of addresses 0800cc40 — 0800cc58 Download failed

Beim Manuellen laden der elf Datei, via CubeProgrammer bekomme ich auch einen Fehler: Tow ore more semgents defines the same memory zone.
\LoxLink-master\Project\LoxLink Debug\LoxLink.elf 10:55:41 : Number of segments: 2 10:55:41 : segment[0]: address= 0x8000000, size= 0xCC59 10:55:41 : segment[1]: address= 0x2000001C, size= 0x0 10:55:41 : Warning: File corrupted. Two or more segments defines the same memory zone

Ich vermute nun, dass eine Einstellung für den St-Link nicht stimmt. Jedoch verwirren mich der andere Error noch zusätzlich.

lg
Benjamin

FTP Problem

Hallo, ich scheitere am erstellen der AESKeys hat jemand eine IDEE für mich ?
`ftp.retrbinary("RETR %s_B1E1424BFF667AF471D715EE6745FDF0.upd" % version, callback=handle_binary)
File "C:\Python27\lib\ftplib.py", line 416, in retrbinary
conn = self.transfercmd(cmd, rest)
File "C:\Python27\lib\ftplib.py", line 378, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
File "C:\Python27\lib\ftplib.py", line 341, in ntransfercmd
resp = self.sendcmd(cmd)
File "C:\Python27\lib\ftplib.py", line 251, in sendcmd
return self.getresp()
File "C:\Python27\lib\ftplib.py", line 226, in getresp
raise error_perm, resp
error_perm: 550 Can't open ._B1E1424BFF667AF471D715EE6745FDF0.upd: No such file or directory

`

Vielen Dank
lg

Hardware aufbau

Hallo Markus

Ich habe mir ein Ziel gesetzt eine Relai & DI Extension aufzubauen. Einerseits als Projektarbeit für die Ausbildung und anderseits aus Interessen, da ich Zuhause einen neuen Server stehen habe.

Nun ist es für mich ein wenig schwer, aus dem Code alle Anschlüsse zu finden und dann auch noch richtig zuzuordnen.
Hast du evtl. eine Pinbelegung des Boards?
Meine beiden bestellten Boards sind noch unterwegs, daher entfällt mir leider noch die Try and Error Methode.

Die Buttons an PB0 und PB15 für was werden diese verwendet?
Die CAN Schnittstelle an PB8 und PB9 verstehe ich richtig, das diese für die LoxLink ist.
Daher müsste eigendlich PA11 und PA12 für die Tree Extension sein. Leider kann ich dies im Code nicht nachvollziehen.

Bei Interesse kann ich auch den Schaltplan und Layout deinem Projekt beisteuern.
Im Anhang ist vor allem das pdf Haupt_uC interresant, wo ich nach Interpretation des Code die Belegung eingetragen habe.
Das zweite Dokument sollte die Möglichkeit bringen, direkt mit einem USB ohne externen ST-Link das Projekt zu warten.
Haupt_uC.pdf
Programmer.pdf

lg
Benj

Mann muss vielleicht noch sagen, dass der Schaltplan erst am entstehen ist.
Evtl gibt es noch 4 SSR die es auch erlauben Induktive Lasten zu schalten. Mal schauen.

DI Extension: LED blinkt nur mit ST-Link Utility

Hallo,

gleich vorweg: Ja, ich habe "STARTUP_AFTER_RESET" gesetzt. Leider ist der Erfolg nur halb eingetreten.
Die Extension bootet nur wenn ich im ST-LINK Utility unter Target->MCU Core-> System Reset oder Core Reset ausführe (die LED beginnt zu blinken). Boot0/1 sind beide auf GND.

Im Code selber habe ich nur die grüne LED auf PC13 gehängt.

Was mache ich falsch, dass der STM32 nicht alleine bootet?

Danke!!!

CAN bus TX error - arduino mega - mcp_can

Good day,

I ported your code to the ArduinoMEGA + MCP_CAN device. Unfortunately I have a problem on the CAN bus and I don't really understand where the problem is. Haven't you seen this problem in your development?

The error always occurs after several sent messages.

Loxone log:

00000031 192.168.1.77    22:06:20.808 22:07:01.263 LNK NAT index request from extension 14111779 (device type: 0014)
00000032 192.168.1.77    22:06:20.808 22:07:01.263 LNK send NAT offer to Extension 14111779, new NAT index: 129, park extension
00000033 192.168.1.77    22:06:22.808 22:07:03.294 LNK got version packet from parked extension 14111779, Version: 20031108
00000034 192.168.1.77    22:06:23.332 22:07:03.818 LNK NAT index request from extension 14111775 (device type: 0014)
00000035 192.168.1.77    22:06:23.332 22:07:03.818 LNK send NAT offer to Extension 14111775, new NAT index: 2
00000036 192.168.1.77    22:06:23.356 22:07:03.839 LNK ESR1 = 0x0007f TX err cnt = 128 RX err cnt = 4
00000037 192.168.1.77    22:06:23.356 22:07:03.840 LNK Error-Passive
00000038 192.168.1.77    22:06:23.977 22:07:04.463 LNK NAT index request from extension 14111777 (device type: 0014)
00000039 192.168.1.77    22:06:23.977 22:07:04.463 LNK send NAT offer to Extension 14111777, new NAT index: 130, park extension
00000040 192.168.1.77    22:06:26.009 22:07:06.495 LNK got version packet from parked extension 14111777, Version: 20031108
00000041 192.168.1.77    22:06:26.533 22:07:07.019 LNK NAT index request from extension 14111778 (device type: 0014)
00000042 192.168.1.77    22:06:26.533 22:07:07.019 LNK send NAT offer to Extension 14111778, new NAT index: 131, park extension
00000043 192.168.1.77    22:06:26.554 22:07:07.039 LNK ESR1 = 0x000e7 TX err cnt = 255 RX err cnt = 5
00000044 192.168.1.77    22:06:26.555 22:07:07.040 LNK Bus-Off
00000045 192.168.1.77    22:06:27.058 22:07:07.544 LNK NAT index request from extension 14111776 (device type: 0014)
00000046 192.168.1.77    22:06:27.058 22:07:07.544 LNK send NAT offer to Extension 14111776, new NAT index: 3
00000047 192.168.1.77    22:06:27.570 22:07:08.056 LNK packet from extension (14111776 / DI Extension)
00000048 192.168.1.77    22:06:28.075 22:07:08.561 LNK packet from extension (14111776 / DI Extension)
00000049 192.168.1.77    22:06:28.581 22:07:09.066 LNK packet from extension (14111776 / DI Extension)
00000050 192.168.1.77    22:06:29.093 22:07:09.578 LNK packet from extension (14111776 / DI Extension)

Arduino Log:

Tx: 336664441 : 269250814, Command: FE, Data: 00 00 14 00 79 17 11 14 
Send status: 0
Rx: 000000000 : 2423255293, Command: FD, Data: FF 81 01 00 79 17 11 14 , ExtensionNat: FF, value32: 14111779
Tx: 336664441 : 270012656, Command: F0, Data: 00 02 14 00 CA 3B CF CB 
Tx: 336664441 : 270012657, Command: F1, Data: 00 84 A6 31 01 00 00 00 
Tx: 336664441 : 270012657, Command: F1, Data: 00 00 9B EF 49 91 79 17 
Tx: 336664441 : 270012657, Command: F1, Data: 00 11 14 02 14 00 00 17 
Tx: 336664437 : 269152510, Command: FE, Data: 00 00 14 00 75 17 11 14 
Tx: 336664439 : 268972286, Command: FE, Data: 00 00 14 00 77 17 11 14 
Rx: 000000000 : 2423255293, Command: FD, Data: FF 82 01 00 77 17 11 14 , ExtensionNat: FF, value32: 14111777
Tx: 336664439 : 270016752, Command: F0, Data: 00 02 14 00 55 70 C8 38 
Tx: 336664439 : 270016753, Command: F1, Data: 00 84 A6 31 01 00 00 00 
Tx: 336664439 : 270016753, Command: F1, Data: 00 00 9B EF 49 91 77 17 
Tx: 336664439 : 270016753, Command: F1, Data: 00 11 14 02 14 00 00 17 
Tx: 336664440 : 269291774, Command: FE, Data: 00 00 14 00 78 17 11 14 
Tx: 336664438 : 269046014, Command: FE, Data: 00 00 14 00 76 17 11 14 
Rx: 000000000 : 2423255293, Command: FD, Data: FF 03 00 00 76 17 11 14 , ExtensionNat: FF, value32: 14111776
Tx: 336664438 : 269496560, Command: F0, Data: 00 02 14 00 D8 17 C5 71 
Tx: 336664438 : 269496561, Command: F1, Data: 00 84 A6 31 01 00 00 00 
Tx: 336664438 : 269496561, Command: F1, Data: 00 00 9B EF 49 91 76 17 
Tx: 336664438 : 269496561, Command: F1, Data: 00 11 14 02 14 00 00 17
 
Send status: 0, Error register value: 10101, TX error count: 131, RX error count: 0


Rx: 000000000 : 2423271665, Command: F1, Data: 00 10 01 0C 00 D0 02 00 , ExtensionNat: 3, value32: 2D000
Rx: 000000000 : 2423271665, Command: F1, Data: 00 00 00 00 00 00 00 00 , ExtensionNat: 3, value32: 0
Rx: 000000000 : 2423271665, Command: F1, Data: 00 00 00 00 00 00 00 00 , ExtensionNat: 3, value32: 0
Tx: 336664437 : 269152510, Command: FE, Data: 00 00 14 00 75 17 11 14
Tx: 336664440 : 269291774, Command: FE, Data: 00 00 14 00 78 17 11 14
 
Send status: 0, Error register value: 10101, TX error count: 129, RX error count: 0

.....
....
..

For the detected errors on the arduin side I use this code:

	if (CAN0.checkError() == CAN_CTRLERROR) {
		Serial.print("Send status: ");
		Serial.print(sndStat, HEX);

		Serial.print(", Error register value: ");
		byte tempErr = CAN0.getError(); // We are only interested in errors, not warnings.
		Serial.print(tempErr, BIN);

		Serial.print(", TX error count: ");
		tempErr = CAN0.errorCountTX();
		Serial.print(tempErr, DEC);

		Serial.print(", RX error count: ");
		tempErr = CAN0.errorCountRX();
		Serial.print(tempErr, DEC);
		Serial.println();
	}

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.