Comments (3)
okay, there are lots of people who have this issue, and most of the time it's because the bus is busy with data, people recommend you hold reset for 5 seconds before you load the filters, however, I have found a solution that is a bit crude but DOES work as im switching from ALL traffic to 1x 29-bit canid, and then back to all traffic, dynamically, and without error.
There should be a note on this as i worked hard debugging and finding out the result by myself
if you create a for loop, and take your masks and filters above, and let it loop twice, you'll have more success changing them with less likely to let traffic slip through. But, even though, maybe it still might not set, I have set my for loop to set masks and filters 3x! and this has resulted in fixing this issue on 500 bitrate bus. This method does not require resetting the canbus shield OR the arduino which is awesome.
Also, you should add the additional info for ISO 15765-4, to specify frame flow should be in readme not necessarily in the examples however, if you send a buf to the ecu requesting vin, or requesting 4 pids, ecu will only send you the first 5 bytes starting at buf[3] position, to get the remaining (and this includes reading VIN(09 02 pid) you MUST send a frame flow ex unsigned char frame_flow = { 0x30, 00,00,00,00,00,00,00 } ( only once is needed) you will get 1 or 2 frames comming in with the remainder of the pid data or vin ascii (char).
Tony
from seeed_arduino_can.
to read vin you'll need to save 3 buffers, concatenate them needed bytes together (exclude the first unneeded bytes from each), then snprintf or memcpy them to a new buffer to be able to print it as ascii
from seeed_arduino_can.
Wow, no idea how you figured that out but that's awesome work, thanks!
from seeed_arduino_can.
Related Issues (20)
- Signed int , 16 bit int & float in can bus HOT 2
- This code is showing compiling error with seeeduino wio terminal after adding all the libraries required. Can anyone help me? #include <Servo.h> Servo myservo; int pos = 0; void setup() { myservo.attach(D0); //Connect servo to Grove Digital Port } void loop() { for (pos = 0; pos <= 179; pos += 1) { // in steps of 1 degree myservo.write(pos); delay(15); } for (pos = 179; pos >= 0; pos -= 1) { myservo.write(pos); delay(15); } } HOT 1
- Unable to Install Library HOT 1
- Can't send supported PID's for odb2 HOT 1
- padding bytes in mcp2518fd_TransmitChannelLoad method is written into wrong locations HOT 1
- warning: left shift count >= width of type HOT 1
- MCP2515 doesnt init HOT 1
- PlatformIO out-of-date HOT 2
- OBDII_PIDs:108: error: 'taskCanRecv' was not declared in this scope
- Problem with CAN BUS Receive Data HOT 4
- no matching function for call to 'mcp2515_can::sendMsgBuf(int, int, int, unsigned char [8])' HOT 3
- Examples Do Not Compile HOT 5
- MCP2515 - Inverted frame sending HOT 1
- I have a problem with the synchronization of messages HOT 1
- CAN extended (19 bit) frame cannot be detected by a receiver HOT 1
- Can not read message .. (extendet)
- Can receive returns empty bytes, Can send doesnt send.
- Filters and masks do not seem to work properly HOT 1
- MCP2515 init Fail
- CAN.getCanId() gets the ID of the TX MSG insted of the RX MSG
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from seeed_arduino_can.