Jump to content

Recommended Posts

Posted

Hi,

 

I am trying to accommodate a SIM800 GSM module using UART3 of OP Lite.

For the beginning, just to send a SMS and later on a MMS with a photo taken from gc2035 camera.

 

This is a source that I made for arduino which works:

  Serial.print("AT+CMGS=");
  Serial.print(char(34)); //before and after phone nr a char (") must be sent
  Serial.print(Phone_nr);
  Serial.println(char(34));
  delay(100);
  Serial.print(message);
  delay(100);
  Serial.println(char(26)); //end of message char

 

I have set FEX for the UART3 but now I am struggling to start this using system commands, such as:

      echo "AT+CMGS=\r\n" /dev/ttyS3 9600

 

Any help much aprreciated.

Posted

I have set FEX for the UART3 but now I am struggling to start this using system commands, such as:

      echo "AT+CMGS=\r\n" /dev/ttyS3 9600

 

Any help much aprreciated.

echo -e "+CMGS=\r\n" > /dev/ttyS3

 

should help.

The 9600 makes no sense though. That is set via stty command.

 

Posted

Thanks, it works :)

 

One more to go:

 

GPIO=6

echo $GPIO > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio${GPIO}/direction

while true; do
    if cat /sys/class/gpio/gpio${GPIO}/value;
      then fswebcam -r 640x480 -p YUV420P --jpeg 100 -> image.jpg;
    fi
    sleep 10
done
exit 0

 

with some reason it executes fswebcam even if cat returns "0".

what could be wrong?

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines