Comments on: Rock7 Core – Endpoints http://www.makersnake.com/rock7-core-endpoints/ Fri, 08 Dec 2017 18:31:47 +0000 hourly 1 http://wordpress.org/?v=4.1 By: Makersnake http://www.makersnake.com/rock7-core-endpoints/#comment-30792 Tue, 22 Aug 2017 07:22:55 +0000 http://www.makersnake.com/?p=287#comment-30792 Chad – Yep I think so, you should be able to define your endpoint in the RockBLOCK admin system per your example URL (e.g. providing your username/password).

What we do is only accept requests from certain IP addresses (the ones used for posting the data from Rock7) – this protects us from any nefarious posts.

]]>
By: Chad Taylor http://www.makersnake.com/rock7-core-endpoints/#comment-30786 Tue, 22 Aug 2017 01:20:53 +0000 http://www.makersnake.com/?p=287#comment-30786 In a current project of mine using Twilio to send and receive text messages back and forth between my server and getting responses based on command I am somewhat familiar with the idea of using the POST back and forth. However Twilio provides a mechanism that protects the script on my server by with apache auth like this below…

http://username:Password@myserver.com/sms-control/receive.php

Can the RockBlock system do the same?

]]>
By: Paul McWhorter http://www.makersnake.com/rock7-core-endpoints/#comment-5914 Mon, 27 Mar 2017 12:03:48 +0000 http://www.makersnake.com/?p=287#comment-5914 Wlll do . . . we are putting together a system we will put the edge of space on HAB. We are hoping to exceed 135,000 feet in altitude. Launch will is planned for mid may.

]]>
By: Makersnake http://www.makersnake.com/rock7-core-endpoints/#comment-5911 Mon, 27 Mar 2017 08:16:26 +0000 http://www.makersnake.com/?p=287#comment-5911 Great – glad you got this working Paul!

If you do something cool with your RockBLOCK do let us know!

]]>
By: Paul McWhorter http://www.makersnake.com/rock7-core-endpoints/#comment-5670 Thu, 23 Mar 2017 12:42:42 +0000 http://www.makersnake.com/?p=287#comment-5670 Got it! I had not done PHP before, so did not understand the code. Went through a few PHP examples, and now have it all working.

The biggest problem that I had with this is that at the end of the day it appears that Godaddy does not allow Python or Pearl scripts. PHP is allowed, so this was the solution.

I really appreciate the help on this.
Thanks!

]]>
By: Makersnake http://www.makersnake.com/rock7-core-endpoints/#comment-5664 Thu, 23 Mar 2017 12:15:41 +0000 http://www.makersnake.com/?p=287#comment-5664 It’s easy when you know how, yes the above will work in principle…

At the moment, the example php does nothing with the data (it’s not saved anywhere) – so you’ll need to add this code to the script.

Here’s a tutorial to get you going: https://www.w3schools.com/php/php_file_create.asp

You should just be able to append the variables into the file, something like:

$myfile = fopen(“rockblock-data.txt”, “a”) or die(“Unable to open file!”);
fwrite($myfile, $transmit_time);
fwrite($myfile, ” “);
fwrite($myfile, $data);
fwrite($myfile, “\n”);
fclose($myfile);

If you have any problems opening the file – it’ll probably be an issue with file permissions.

Good Luck!!

]]>
By: Paul McWhorter http://www.makersnake.com/rock7-core-endpoints/#comment-5403 Tue, 21 Mar 2017 19:30:18 +0000 http://www.makersnake.com/?p=287#comment-5403 Thank you for the guidance. I am finding that my godaddy hosting is not wanting to run python or pearl scripts, but does appear to be OK with PHP.

I really appreciate your help as my expertise is arduino/raspberry pi/python/circuits, and the WEB stuff is not easy for me. Would the following work.

1) I create a file in my WEB root directory called rb.php
2) I use the script you provide above
3) I point the Rockblock to http://www.mydomain.com/rb.php
4) I send a test message from rockblock, which is then directed to 3) above

If I do this, then where does the data end up from your script? Is there a text file in my root folder your script directs the data to, or where do I now find the data.

I really appreciate your help. I have spend about 20 hours trying to figure this out, but there are no simple tutorials to follow on how this works, so if you could give me some guidiance I would greatly appreciate it.
Thanks!
PJM

]]>
By: Makersnake http://www.makersnake.com/rock7-core-endpoints/#comment-5279 Tue, 21 Mar 2017 10:57:05 +0000 http://www.makersnake.com/?p=287#comment-5279 Hey Paul,

It all depends on what your web-hosting provides and how it’s setup – so it’s hard to provide definitive answers!

Take a look at some basic examples to get up to speed with a hello world example; i’d recommend Python.

Here’s a link that should put you in the right direction: https://docs.python.org/2/howto/webservers.html

]]>
By: Paul McWhorter http://www.makersnake.com/rock7-core-endpoints/#comment-5167 Mon, 20 Mar 2017 15:31:49 +0000 http://www.makersnake.com/?p=287#comment-5167 Thank you for the code to allow receiving data from rockblock. Could you say just a few words of how to implement this code. Do you save the code as the index.html page of the WEB site, or how do you name the file, and where do you put it on the WEB site? Any additional help would be appreciated.
PJM

]]>