CAN frame receive and send sms

Platform for Telematic Applications
Post Reply
giaco
Posts: 4
Joined: Thu 4. Feb 2016, 10:26

CAN frame receive and send sms

Post by giaco » Thu 4. Feb 2016, 10:51

Hello, here's the problem: for a project, I have to use the PCAN-GPRS link and uvision 4 with the base project "PCAN-GPRS Link Example Projekt V1.6.2" and the GNU compiler.

I format an SD card 1GB and I puts the file "FirmCRC.bin", "crc.txt" and "Update.ini" after each compilation. Is that the only files to recover?

I must receive a CAN frame of a colleague using PCAN-basic, frames which give me the values of "engine oil temperature, fuel level, .."
I then have to send these values by sms to another colleague.
And I do not know how to do all this, I do not know what code to write, or what page.

If someone could help me. thank you beforehand.

S.Michaelsen
Hardware Development
Hardware Development
Posts: 87
Joined: Fri 10. Sep 2010, 13:11

Re: CAN frame receive and send sms

Post by S.Michaelsen » Fri 5. Feb 2016, 08:25

Hello.

Yes, this is the only way to flash the new wirmware without overwriting the bootloader.

There is an file called sms.c that contains an example how to send an sms and some others (like can.c) that shows how the CAN bus could be stardet and how messages could be read. I guess that would be good examples to modify for your own needs.

BR,
Stephan

giaco
Posts: 4
Joined: Thu 4. Feb 2016, 10:26

Re: CAN frame receive and send sms

Post by giaco » Tue 8. Mar 2016, 15:41

Thank you. Once the GPS data and OBDII Receipts, where are they?
I have to send the details by sms, and I do not find their location.

S.Michaelsen
Hardware Development
Hardware Development
Posts: 87
Joined: Fri 10. Sep 2010, 13:11

Re: CAN frame receive and send sms

Post by S.Michaelsen » Tue 8. Mar 2016, 16:22

If valid data is avalible it will be written to the structure called pi of type S_PROCESSIMAGE.

giaco
Posts: 4
Joined: Thu 4. Feb 2016, 10:26

Re: CAN frame receive and send sms

Post by giaco » Tue 8. Mar 2016, 17:03

thank you, but where is located S_PROCESSIMAGE ?

S.Michaelsen
Hardware Development
Hardware Development
Posts: 87
Joined: Fri 10. Sep 2010, 13:11

Re: CAN frame receive and send sms

Post by S.Michaelsen » Wed 9. Mar 2016, 08:12

The defintion can be found in typedefs.h

giaco
Posts: 4
Joined: Thu 4. Feb 2016, 10:26

Re: CAN frame receive and send sms

Post by giaco » Thu 17. Mar 2016, 09:37

Thank you! I found thanks to you. however, in sms_send function, I put "sms_send (pi.pos.latDeg, sizeof (pi.pos.latDeg), PhoneNumber, LongNumber);"

with PhoneNumber LongNumber and variables that I created. When I wrote the text of sms hard, sends the sms is the way I want. But when I put the variables pi, which sends the sms is white

S.Michaelsen
Hardware Development
Hardware Development
Posts: 87
Joined: Fri 10. Sep 2010, 13:11

Re: CAN frame receive and send sms

Post by S.Michaelsen » Thu 17. Mar 2016, 09:58

Well, you try to send binary data instead of text. You'd have to convert the values to a text string before you could send it via SMS. For more details about what (special) characters could be send by SMS please have a look into the documentation (e.g. into +CMGS chapter AT_Command_Interface_Guide.pdf).

Post Reply