Can't get it to work on Arduino

Pfff I tried everything but I can’t get any response from the M2. Not even a led is blinking… My board is recognized by Windows as a ‘Bossa Program port’ ?? Even if I reinstall arduino it doesn’t get recognized. Did install Arduino SAM Boards (32-bit ARM Cortex-M3) by Arduinoand then install Macchina SAM Boards (Install Arduino SAM Boards first) by Macchina.

Did install drivers for Due but when I connect to USB I only hear a sound that something is connected but the M2 is not responding to anything in Arduino IDE

Arduino says UNKNOWN BOARD… is it really so hard to get this working???
Why don’t I see any led lit up when I connect it to USB?? Is it broken?

Bossa programming port means that nothing is flashed to the M2 and it is blank (in theory). You might try hooking it up to USB and then pressing the erase button for two seconds. Then disconnect from USB and reconnect. It should show up as Bossa programming at that point because erasing for two seconds most certainly zaps all flash and blanks out the chip. Now, you should be able to use Arduino IDE and set the board (Tools->Board->Macchina M2). Now, try to flash something to it.

Here’s something really simple:

void setup()
{}

void loop()
{
   SerialUSB.println("I like clean socks");
   delay(1000);
}

If you flash that and then bring up the Serial Monitor (in Tools) then you should get a message about socks every single second until you get sick of seeing about clean socks. If that works then you can build up to other things. If you can’t flash it or you don’t get messages then something is wrong somewhere and we’ll have to trace down what.

make sure you use the right COM port. If your not using the right COM port it will come up weird.

I had to to a clean install of my Arduino last week and got it up and running. I only had to do as the instructions say and it worked fine.

Just have to make sure you included the right macchina URL, installed the SAM and then the M2 stuff. Installed and uploaded fine on mine. Gave me both the M2 Beta and M2… Was able to compile and upload using the M2 without issue.
I did have to do a clean install though because when I tried to update my previous install it kept telling me my M2 was invalid.

@sammie Did you get it to work?

@CollinK @redheadedrod Thanks for the suggestions and help here.

We erase everything from M2 before we ship it out, so no LED should come on when you plug it in.

I installed the latest version of the software on my M2 but I used the M2 board and not the M2(Beta). I do not get a blue LED lighting now when I connect to the USB as before. Is this correct for the dev boards? Or should I be using the M2(beta) board definition?

Rodney

Rodney
The only time you need to use the M2_Beta is if you are using one of the first boards in the early development stage & want access to the sink pins of output I/O otherwise just select Macchina M2
Tony

I just got my M2 Fri. And I’m having problems getting it to work. I followed the Startup Guide and I can find my Machina M2 and loaded the blink sketch and that all works. But I can’t read can data. And I don’t understand how to install Savvycan or M2RET. I am using Windows 10 must I go with lunix? I’ll admit the programming worlds a little Greek to me.

I did “the clean socks” thing and it reads out on the serial port just fine. But still having problems with the whole can bus thing.

SavvyCAN works just fine with Windows 10. You just need the latest version which I am not sure how to get. Windows needs specific software that is compatible with your device which in this case is SavvyCAN. You can also use putty or another serial terminal to connect to the M2 as well and feed it commands through there.

SavvyCAN will only work with canbus and maybe swcan. Any other protocol would require the use of the serial terminal method. There IS ELM327 support so it IS possible a standard ODBII program could work from windows but I have not tried that myself at this time.

Rodney

WWeiler, you will most certainly need to compile M2RET and upload it to the M2 before you’re able to capture CAN. Thereafter you should be able to connect to it with SavvyCAN and capture traffic. SavvyCAN is available in binary form at www.savvycan.com

You would want to:

  1. Open SavvyCAN
  2. Click the "Connection"menu and select “Open Connection Window”
  3. In the bottom left of that window click “New Connection” just to be sure
  4. Then toward the upper right make sure “GVRET Serial” is the selected radio box option
  5. Select the COM port you have the device connected to from the list of ports. Hopefully you made it easy and only connected that one board so there’s only one choice.
  6. Click “Enabled” and set the speed to the proper one (probably 250000 or 500000)
  7. Click “create new connection”

It should create two CAN ports and if everything went well and you are connected to a CAN bus then you should see traffic start pouring into the main window.

I’m getting a file error for missing file MSVC140.dll So I’ll need to fix this be for I can get Savvycan Working
Thank for your input
WW

https://www.microsoft.com/en-us/download/details.aspx?id=48145

Sorry, should probably mention that somewhere. It was compiled with Visual Studio 2015 and so you need the VS2015 runtime files for it to work. I had kind of just assumed that everyone was likely to already have those files as plenty of other things should have been compiled with VS2015 as well but perhaps not. The above link should fix it up for you.

Hey I finely figured it out M2RET was not install right. I now have M2 & SavvyCan V174 workin with my bench mule. I’m ready to go try it on my pickup. Thanks CollinK for your input.

3 posts were split to a new topic: USB cables wearing out

Hi collink
I am not able to install M2RET.ino on my M2 board
getting errors like this

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);

exit status 1
’class SWcan’ has no member named ‘setListenOnlyMode’