5279浏览
查看: 5279|回复: 4

[已解决] GPS/GPRS/GSM Module 簡訊無法發送

[复制链接]
你好程式是照著範例 有把號碼修改成要發送的對象 也將SIM卡的PIN碼取消了
還是無法發送簡訊 請問還有什麼地方可能有問題?


--------------------------------------------------------------

// Product name: GPS/GPRS/GSM Module V3.0
// # Product SKU : TEL0051
// # Version     : 0.1

// # Description:
// # The sketch for driving the gsm mode via the Arduino board

// # Steps:
// #        1. Turn the S1 switch to the Prog(right side)
// #        2. Turn the S2 switch to the Arduino side(left side)
// #        3. Set the UART select switch to middle one.
// #        4. Upload the sketch to the Arduino board
// #        5. Turn the S1 switch to the comm(left side)
// #        6. RST the board

// #        wiki link- http://www.dfrobot.com/wiki/index.php/GPS/GPRS/GSM_Module_V3.0_(SKU:TEL0051)

byte gsmDriverPin[3] = {
  3,4,5};//The default digital driver pins for the GSM and GPS mode
//If you want to change the digital driver pins
//or you have a conflict with D3~D5 on Arduino board,
//you can remove the J10~J12 jumpers to reconnect other driver pins for the module!
void setup()
{   
  //Init the driver pins for GSM function
  for(int i = 0 ; i < 3; i++){
    pinMode(gsmDriverPin,OUTPUT);
  }
  digitalWrite(5,HIGH);//Output GSM Timing
  delay(1500);
  digitalWrite(5,LOW);  
  digitalWrite(3,LOW);//Enable the GSM mode
  digitalWrite(4,HIGH);//Disable the GPS mode
  delay(2000);
  Serial.begin(9600); //set the baud rate
  delay(5000);//call ready
  delay(5000);
  delay(5000);
}

void loop()
{  
  Serial.println("AT"); //Send AT command  
  delay(2000);
  Serial.println("AT");   
  delay(2000);
  //Send message
  Serial.println("AT+CMGF=1");
  delay(1000);
  Serial.println("AT+CMGS=\"15800449871\"");//Change the receiver phone number
  delay(1000);
  Serial.print("HELLO");//the message you want to send
  delay(1000);
  Serial.write(26);
  while(1);
}


Cain  初级技匠

发表于 2015-6-9 16:40:08

如果要使用模块功能是需要给下面主板外接供电的,另外配置是否正确,可以看一下wiki https://wiki.dfrobot.com.cn/index.php/(SKU:TEL0051)GPS/GPRS/GSM_%E6%89%A9%E5%B1%95%E6%9D%BF_V3.0
回复

使用道具 举报

joskyo  见习技师
 楼主|

发表于 2015-6-9 17:01:51

我在測試看看 謝謝喔 有問題我在繼續發問!

回复

使用道具 举报

joskyo  见习技师
 楼主|

发表于 2015-6-17 09:23:41

接上了外接電源後(使用9V電池)  我還是無法將簡訊發出
請問需要跟GPS一樣到空曠的地方才會發送出去嗎?還是我使用的SIM卡他不接受會有這樣的情況嗎 挑卡?
回复

使用道具 举报

joskyo  见习技师
 楼主|

发表于 2015-9-15 15:01:50

事隔好久 我還是找不到任何方法解決!
我可以使用Realterm 來讓sim卡正常的撥打電話出去
發送簡訊的指令也都正常發出 可是手機還是無法收到簡訊  
是否我還有哪些地方沒有注意到?
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail