Writing to GMLan (SWCAN)

Dear All,

I finally received a M2 and adopted M2Ret in such way that it logs as usual, but when I press the user button, I try to write a message to GMLan.
It looks like it is stored in buffer, but never sent. I can see a lot of traffic in serial monitor at the CAN bus though
Maybe anybody has an example of a simple “sendFrame” ?
Or is there something I do have to do to stop RX and start TX in basic M2Ret code?

Using sendFrame ought to work. Check two things:

  1. Do you have 12V going to the M2? I think it is required to make SWCAN work at all

  2. Are you sure you turned SWCAN on in the configuration screen and that it’s the proper speed?

Hi Collin, yes, of course, I actually see all the frames in the log, so this is not the problem.
For example: I want to send arbit. id 0x20A with prio 4 and payload data of 0x00, 0x01
AFAIK this translates to
.id = 0x414040
.priority = 4
.length = 3;
.data.byte[0] = 0x00;
.data.byte[1] = 0x01;

but nothing happens. I mean, I see that it does a TX, but nothing actually happens in the car.
If I use a STN1170 and do (via AT commands):
ATCP10
ATSH414040
0001

the interior light goes off (as wanted)

Anyone … ? Please … ?

Can you more definitively prove that the frames are actually being sent? I know you say that it says it is sending but you’re going to have to figure out if it really is. The easiest approach is to add another device you control to the bus and see if that device sees the message you’re trying to send. If it doesn’t then obviously the first thing to do is figure out why it isn’t sending. If it is sending but you still see no effect then maybe investigate whether you need to do a high voltage wake up first.