Send Data to Local WiFi Node

Wondering if the following is possible, which I think I’ve found bits and pieces by searching this forum, but looking to confirm the entire process:

  1. Program (flash) an Argon while connected to Internet/Cloud

  2. Disconnect Argon from the Internet

Then in the real world:

  1. Run the Argon an connect to a local Wireless Access Point (WAP running on a Raspberry Pi, no Internet/Cloud)

  2. Argon collects data and periodically transmits it to a node (another Raspberry Pi) connected to the same WAP / WiFi network.

I know how to (and have) set up a Raspberry Pi as a WAP, and have other devices (phone, laptop, other Raspberry Pis) connecting to it, but there is no Internet connectivity. This would eventually be on a barge / boat floating around a lake in the middle of nowhere, so no, I’m not looking to use my phone to bridge to the Internet - assume that there is no viable Internet connectivity to the Cloud.

I think there is a “manual” feature to connect the Argon to any WiFi network (not Internet), but not clear on the exact process? Is there a document/post that walks me through how that works or provides a code example?

But bigger question is how do I send data from Argon to the Raspberry Pi once I am connected (assuming I can figure out ‘manual’ WiFi connection)? I have a web server running on the Raspberry Pi … can I make a Non-Cloud HTTP GET or POST request from the Argon directly to a servlet running on the Raspberry Pi? Or do I need to do low-level socket-to-socket data transmissions, i.e., listen on a UDP port on the Raspberry Pi and send UDP packets from the Argon?

Has anyone out there successfully done something like this? Any tips / pointers / links to the appropriate documentation / posts would be appreciated if so.

Also, I believe you can substitute any Linux/Unix/etc. computer for the Raspberry Pi, as the question from the perspective of the Argon remains the same.

Extra credit question: If this is indeed possible with an Argon, will the same be possible using a Photon (I have a handful of those lying around somewhere)? I’m assuming that is the case, but not sure if the Photon is different enough to make this not possible?

Thanks in advance for any feedback.

The cloud connection and the WiFi connection on the Argon and the Photon are controlled via separate objects to achieve exactly that.
While in the default AUTOMATIC mode the device spins up both in SEMI_AUTOMATIC or MANUAL mode you have control over that process and consequently can omit spinning up the cloud connection.

Once you have a running WiFi connection you can instantiate a TCPClient or use a library like HttpClient to communicate with your server.

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.