Realdash CAN over wifi

The Arduino that is sending the CAN frames.

im going crazy even bought an arduino r4 wifi to get it working trough wifi but nope… no libraries working for the r4 and the mcp2515. I orderd some r3 from china but im thinking of maybe buying the mkr1010 since you guys have this code working for it…

I finally got realdash can work over wifi, but its really slow. The bike is sending around 600 packets/sec. But realdash only manages to recieve 65 packets/ at max on wifi. This is way to slow.

I also tried running code on my R3 and use usb/serial connection realdash then recieves 600+ packets/sec.

My big question is why is not UDP supported, because recieving 10 % of the can messages is really slow. I also went trough my code and cleaned it up. Also took help from chatgpt to clean the code and make it better but without any solutions.

I really think tcp should be able to handle the packets without any bigger delay since calculating the data is not really that much.

Calculation:

16bytes*600packets = 9.6 kb/s (0.56mb/minute)

i dont know if my calculations are correct but i think so.

R4 Specs

Features

  • The R7FA4M1AB3CFM#AA0, often referred to as RA4M1 in this datasheet, is the main MCU on the UNO R4 WiFi,
  • connected to all pin headers on the board as well as all communication buses.
  • Overview
  • 48 MHz Arm® Cortex®-M4 microprocessor with a floating point unit (FPU)
  • 5 V operating voltage
  • Real-time Clock (RTC)
  • Memory Protection Unit (MPU)
  • Digital-to-analog Converter (DAC)

Memory

  • 256 kB Flash Memory
  • 32 kB SRAM
  • 8 kB Data Memory (EEPROM)

Peripherals

  • Capacitive Touch Sensing Unit (CTSU)
  • USB 2.0 Full-Speed Module (USBFS)
  • 14-bit ADC
  • Up to 12-bit DAC
  • Operational Amplifier (OPAMP)

Power

  • Operating voltage for RA4M1 is 5 V
  • Recommended input voltage (VIN) is 6-24 V
  • Barrel jack connected to VIN pin (6-24 V)
  • Power via USB-C® at 5 V

Communication

  • 1x UART (pin D0, D1)
  • 1x SPI (pin D10-D13, ICSP header)
  • 1x I2C (pin A4, A5, SDA, SCL)
  • 1x CAN (pin D4, D5, external transceiver is required)

The ESP32-S3-MINI-1-N8 is the secondary MCU with a built-in antenna for Wi-Fi® & Bluetooth® * connectivity. This

  • module operates on 3.3 V and communicates with the RA4M1 using a logic-level translator (TXB0108DQSR).
  • Overview
  • Xtensa® dual-core 32-bit LX7 microprocessor
  • 3.3 V operating voltage
  • 40 MHz crystal oscillator

Wi-Fi®

  • Wi-Fi® support with 802.11 b/g/n standard (Wi-Fi® 4)
  • Bit rate at up to 150 Mbps
  • 2.4 GHz band
  • Bluetooth®
  • Bluetooth® 5

Double posting is not nice, but I’ll follow your example:

Impossible to remotely troubleshoot this sort of custom hardware projects. We use TCP/IP simulator for our testing and we typically get around 5000 frames per second on local network so I do not believe that receiving end is the bottleneck.

Probably the arduino r4 thats the bottleneck then. But i want to belive its not… my code is really clean so i dont think its that. But if the arduino can handle all packets and send them to serial/usb then i dont see the reason why it cant manage to forward them trough tcp ip via the wifi server