Git Product home page Git Product logo

m2ret's People

Contributors

adamvoss avatar collin80 avatar cybermaggedon avatar jaesin avatar tdoust avatar yoh-there avatar

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  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  avatar  avatar  avatar

m2ret's Issues

Writing to SWCAN

Hi,

I'm logging my CAN bus and I know (from a different test with another lib, Afterglow/arduino-gmlan) that eg sending to address
10644040

with data
0 0 FF

dims the interior lights of my Camaro.

That's with arduino-gmlan:
can_send_29bit_message(0x10644040,3, {0,0,0xff})

I try to port this to work with M2Ret (which I use as a boilerplate) and I do see this log message when logging with M2Ret:
10716486 - 10644040 X 2 3 0 0 FF

so, I think, it should be correct to do
frame.id = 0x10644040;
frame.length = 3;
frame.data.byte[0] = 0x00;
frame.data.byte[1] = 0x00;
frame.data.byte[2] = 0xFF;
sendFrame(&SWCAN, frame);

But nothing happens. I tried all different sorts of modifying the frame, like setting priority, rtr, etc. but to no avail.

documentation

Is there any documentation?
I'm wondering how the output from M2RET is formatted. Is it binary? ASCII? Can you send commands to M2RET, and if so how? Etc..

Arduino 1.8.5 on macOS 10.13.1 and M2RET

Hi,
iam new to using the M2 to tinker around with my 2016 Skoda Octavia III and wanted to get M2RET running on my M2 with SavvyCAN at first.
I've installed the newest Arduino Software and also installed the Board Configuration described on the Macchina page and was also able to upload and test the "LED Blink" Example, so the basic things seem to work.

Then i "git clone"ed all the libraries here (due_can, wire, mcp...) to ~/Documents/Arduino/libraries with their normal "git clone" names. Then i tried to Compile the also latest master clone of M2RET and got the following errors (i think the double libraries found thing is not a problem). Can you help me?

Thanks, Martin

Error:

`Arduino: 1.8.5 (Mac OS X), Board: "Macchina M2"

/Users/martinseener/Documents/Arduino/M2RET/M2RET.ino: In function 'void setup()':
M2RET:310: error: 'class SWcan' has no member named 'setListenOnlyMode'
SWCAN.setListenOnlyMode(true);
^
M2RET:314: error: 'class SWcan' has no member named 'setListenOnlyMode'
SWCAN.setListenOnlyMode(false);
^
/Users/martinseener/Documents/Arduino/M2RET/M2RET.ino: In function 'void sendFrame(CAN_COMMON*, CAN_FRAME&)':
M2RET:392: error: comparison between distinct pointer types 'CAN_COMMON*' and 'SWcan*' lacks a cast
if (bus == &SWCAN) whichBus = 2;
^
/Users/martinseener/Documents/Arduino/M2RET/M2RET.ino: In function 'void loop()':
M2RET:705: error: no matching function for call to 'SWcan::GetRXFrame(CAN_FRAME&)'
if (SWCAN.GetRXFrame(incoming)) {
^
/Users/martinseener/Documents/Arduino/M2RET/M2RET.ino:705:34: note: candidate is:
In file included from /Users/martinseener/Documents/Arduino/libraries/Single-Wire-CAN-mcp2515/src/MCP2515_sw_can.h:34:0,
from /Users/martinseener/Documents/Arduino/M2RET/M2RET.ino:37:
/Users/martinseener/Documents/Arduino/libraries/mcp2515/src/MCP2515.h:67:7: note: bool MCP2515::GetRXFrame(Frame&)
bool GetRXFrame(Frame &frame);
^
/Users/martinseener/Documents/Arduino/libraries/mcp2515/src/MCP2515.h:67:7: note: no known conversion for argument 1 from 'CAN_FRAME' to 'Frame&'
M2RET:959: error: cannot convert 'SWcan*' to 'CAN_COMMON*' for argument '1' to 'void sendFrame(CAN_COMMON*, CAN_FRAME&)'
if (out_bus == 2) sendFrame(&SWCAN, build_out_frame);
^
Multiple libraries were found for "due_can.h"
Used: /Users/martinseener/Documents/Arduino/libraries/due_can
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/due_can
Multiple libraries were found for "Arduino_Due_SD_HSMCI.h"
Used: /Users/martinseener/Documents/Arduino/libraries/M2_SD_HSMCI
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/M2_SD_HSMCI
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/M2_SD_HSMCI
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/M2_SD_HSMCI
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/M2_SD_HSMCI
Multiple libraries were found for "due_wire.h"
Used: /Users/martinseener/Documents/Arduino/libraries/due_wire
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/due_wire
Multiple libraries were found for "lin_stack.h"
Used: /Users/martinseener/Documents/Arduino/libraries/LIN
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/LIN
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/LIN
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/LIN
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/LIN
Multiple libraries were found for "MCP2515_sw_can.h"
Used: /Users/martinseener/Documents/Arduino/libraries/Single-Wire-CAN-mcp2515
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/Single-Wire-CAN-mcp2515
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/Single-Wire-CAN-mcp2515
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/Single-Wire-CAN-mcp2515
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/Single-Wire-CAN-mcp2515
Multiple libraries were found for "MCP2515.h"
Used: /Users/martinseener/Documents/Arduino/libraries/mcp2515
Not used: /Users/martinseener/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/mcp2515
exit status 1
'class SWcan' has no member named 'setListenOnlyMode'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
`

bossac version

Interestingly, I tried using the newest version of bossac (1.9.1) to flash M2RET and it didn't work. I just get:
No device found on cu.Bluetooth-Incoming-Port
even though I set
stty -f /dev/tty.usbmodem14201 1200 cs8 cread clocal
If I use the bossac included here (1.3a) then it works fine.

SuperB does not work

As discussed on the ESP32RET repo, the SuperB support is not working M2RET. Reopening the issue here so it's in the right place.

LAWICEL mode

I was trying to get LAWICEL mode working on on an M2, I found that it worked fine if the SysSettings.lawicelMode variable is set to true. I was able to do this either by sending the 'V' command manually over the serial port, or by changing how the 'O' command was handled (although I suspect that this isn't the proper way to fix this behavior):

diff --git a/SerialConsole.cpp b/SerialConsole.cpp
index 740025d..5bb6b37 100644
--- a/SerialConsole.cpp
+++ b/SerialConsole.cpp
@@ -196,8 +196,8 @@ void SerialConsole::handleShortCmd()
         
     //Lawicel specific commands    
     case 'O': //LAWICEL open canbus port (first one only because LAWICEL has no concept of dual canbus
-        Can0.disable_autobaud_listen_mode();
-        Can0.begin(settings.CAN0Speed, 255);
+        //Can0.disable_autobaud_listen_mode();
+        //Can0.begin(settings.CAN0Speed, 255);
         Can0.enable();
         SerialUSB.write(13); //send CR to mean "ok"
         SysSettings.lawicelMode = true;

After making this change I was able to use slcand to be able to use the Linux socketcan utilities:

$ sudo slcand -o -c /dev/ttyACM0

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.