Forum » Programiranje » SMS z Arduinom, Nexmo in Twitter
SMS z Arduinom, Nexmo in Twitter
Oldi ::
Tole sem nakvač¨kal, pa ne gre, na konzoli dobim:
connecting...
disconnecting.
SMSa pa ni, na dashbordu se ne zgodi nič
Eni pravijo, da Nexmo zahteva https, drugi, da to ni res. Prek Chrome s pobrisanim s ne gre.
Probal sem prek Twiterja, a so mi nov račun zablokirali predno sem uspel poslati prvi SMS (avtomatizirani account ni dovoljen). Ali je komu uspelo pretentati Twitter
connecting...
disconnecting.
SMSa pa ni, na dashbordu se ne zgodi nič
Eni pravijo, da Nexmo zahteva https, drugi, da to ni res. Prek Chrome s pobrisanim s ne gre.
#include <SPI.h> #include <Ethernet.h> byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x43 }; IPAddress ip(192, 168, 1, 43); EthernetClient client; void setup() { // Open serial communications and wait for port to open: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for native USB port only } Ethernet.begin(mac, ip); delay(1000); Serial.println("connecting..."); //Tole je ukaz, ki poslje SMS, seveda s spremenjenimi podatki "https://rest.nexmo.com/sms/json?api_key=Optional[e894]&api_secret=a0e93&from=NEXMO&to=38631234567&text=Welcome+to+Nexmo" if (client.connect("rest.nexmo.com", 80)) { client.println("GET /sms/json?api_key=Optional[e894]&api_secret=a0e93&from=NEXMO&to=38631234567&text=Tu+Arduino+kurilnica"); //client.println("GET to=38631234567&text=Tu+Arduino+kurilnica"); client.println("Host: rest.nexmo.com"); client.println("Accept: application/json"); client.println("Connection: close"); //probal sem tudi brez te vrstice client.println(); //obvezno ena prazna vrstica } else { // if you didn't get a connection to the server: Serial.println("connection failed"); } if (client.connected()) client.stop(); } void loop() { if (client.available()) { char c = client.read(); Serial.print(c); } // if the server's disconnected, stop the client: if (!client.connected()) { Serial.println(); Serial.println("disconnecting."); client.stop(); while (true); } }
Probal sem prek Twiterja, a so mi nov račun zablokirali predno sem uspel poslati prvi SMS (avtomatizirani account ni dovoljen). Ali je komu uspelo pretentati Twitter
Oldi ::
V firefoxu mi ob vnosu http://rest.nexmo.com/sms/json?api_key=...........330&text=Welcome+to+Nexmo najprej javi
Firefox can't find the file at http://rest.nexmo.com/sms/json?api_key=...........330&text=Welcome+to+Nexmo.
Check the file name for capitalization or other typing errors.
Check to see if the file was moved, renamed or deleted.
Nato dodam s in mi sprejme fajl s tole vsebino
{
"message-count": "1",
"messages": [{
"status": "4",
"error-text": "Bad Credentials"
}]
}
Sem jih vprašal v support centru in mi odgovorijo:
Thanks for contacting us about this - you need to remove the word Optional in the API key parameter and the parentheses around the API key itself and it should work.
In res, brez Optional in [] dobim SMS tudi brez s-ja
Svašta, zakaj vraga imajo potem ta Optional in [] v curl-ju in zakaj je prvič stvar delala, poslal sem 2 testna SMS-a in ziher nisem brisal Optional ????
Firefox can't find the file at http://rest.nexmo.com/sms/json?api_key=...........330&text=Welcome+to+Nexmo.
Check the file name for capitalization or other typing errors.
Check to see if the file was moved, renamed or deleted.
Nato dodam s in mi sprejme fajl s tole vsebino
{
"message-count": "1",
"messages": [{
"status": "4",
"error-text": "Bad Credentials"
}]
}
Sem jih vprašal v support centru in mi odgovorijo:
Thanks for contacting us about this - you need to remove the word Optional in the API key parameter and the parentheses around the API key itself and it should work.
In res, brez Optional in [] dobim SMS tudi brez s-ja
Svašta, zakaj vraga imajo potem ta Optional in [] v curl-ju in zakaj je prvič stvar delala, poslal sem 2 testna SMS-a in ziher nisem brisal Optional ????
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | SIM800L modul in Arduino NanoOddelek: Elektrotehnika in elektronika | 2962 (1775) | domenc |
» | Kdo se spozna na ESP8266 in Arduino?Oddelek: Pomoč in nasveti | 2469 (2047) | chiiiii |
» | Arduino(slave) + ESP8266(master) preko I2CjaOddelek: Elektrotehnika in elektronika | 1050 (903) | teoo |
» | Arduino in luči (strani: 1 2 )Oddelek: Elektrotehnika in elektronika | 12259 (9885) | FX6300B |
» | Arduino "leteče luči"Oddelek: Elektrotehnika in elektronika | 3018 (1895) | zrataj4201 |