Connecting 2 Ameba RTL8195 Wifi modules

Hi all,

I am using Ameba RTL8195 modules. 1 module connects to sensors to get measurements in an outdoor environment. I want to get these readings to another module connected to PC. Is there any guidance available to connect these modules. Datasheet is available below:

https://www.amebaiot.com/en/ameba-arduino-download/

Datasheet is available below:

After I register. Which ain't going to happen.

PaulS:
After I register. Which ain't going to happen.

UM0048-Realtek-Ameba1-DEV-1v0-User-Manual_1v9_20160406_1.pdf (1.09 MB)

I want to get these readings to another module

How? SPI? I2C? Serial? Servos waving semaphore flags? RF?

Serial

sal_murd:
Serial

What is the problem, then?

I want to establish peer to peer communication between these 2 ameba devices, whereby, the one in the outdoor environment sends the measurements to the one indoor connected to the PC via usb. What is the way forward please ?

What is the way forward please ?

You've already defined that - serial. Incorrectly, in my opinion. Sending data over wires, from outdoors to indoors, hardly makes sense.

In any case, I don't understand what the problem is. If you ARE going to use Serial, you connect the TX pin of one device to the RX pin of the other, and you connect the grounds, and you use Serial.print(), Serial.println(), or Serial.write() to send the data, and Serial.available() and Serial.read() to get the data.

I apologise for not describing well the problem. I want to transmit the measurements wireless to indoor device be it any method. Then the indoor connected device's serial monitor should be able to display all those measurements taken outdoor.

If those ARE WiFo devices, wouldn't it be simpler to make one a server (the indoor one) and one a client? Then, the client just makes a GET request with the data, and the server handles the GET request.

I don't see the relationship between those things and Arduino.

Im trying to make one Ameba as server, but getting an error message.

/*  Connects to the home WiFi network
 *  Asks some network parameters
 *  Starts WiFi server with fix IP and listens
 *  Receives and sends messages to the client
 *  Communicates: wifi_client_01.ino
 */
#include <SPI.h>
#include <WiFi.h>

char ssid[] = "mynetwork";               // SSID of your home WiFi
char pass[] = "myPassword";               // password of your home WiFi
int status = WL_IDLE_STATUS;
byte ledPin = 2;
WiFiServer server(80);
IPAddress ip(192,168,1,3);            // IP address of the server
IPAddress gateway(192,168,1,1);           // gateway of your network
IPAddress subnet(255,255,255,0);          // subnet mask of your network

void setup() {
  Serial.begin(9600);                   // only for debug
  WiFi.config(ip, gateway, subnet);       // forces to use the fix IP
  WiFi.begin(ssid, pass);                 // connects to the WiFi router
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(500);
  }
  server.begin();                         // starts the server
/*  Serial.println("Connected to wifi");
  Serial.print("Status: "); Serial.println(WiFi.status());  // some parameters from the network
  Serial.print("IP: ");     Serial.println(WiFi.localIP());
  Serial.print("Subnet: "); Serial.println(WiFi.subnetMask());
  Serial.print("Gateway: "); Serial.println(WiFi.gatewayIP());
  Serial.print("SSID: "); Serial.println(WiFi.SSID());
  Serial.print("Signal: "); Serial.println(WiFi.RSSI());
  Serial.print("Networks: "); Serial.println(WiFi.scanNetworks());*/
  pinMode(ledPin, OUTPUT);
}

void loop () {
  WiFiClient client = server.available();
  if (client) {
    if (client.connected()) {
      digitalWrite(ledPin, LOW);  // to show the communication only (inverted logic)
      Serial.println(".");
      String request = client.readStringUntil('\r');    // receives the message from the client
      Serial.print("From client: "); Serial.println(request);
      client.flush();
      client.println("Hi client! No, I am listening.\r"); // sends the answer to the client
      digitalWrite(ledPin, HIGH);
    }
    client.stop();                // tarminates the connection with the client
  }
}

Arduino: 1.8.1 (Windows 7), Board: "Ameba RTL8195A"

sketch\wifi_server_01.ino.cpp.o: In function `setup':

C:\Users\eng.EEPROJ-DP.000\Downloads\wifi_server_01/wifi_server_01.ino:21: undefined reference to `WiFiClass::config(IPAddress, IPAddress, IPAddress)'

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for "WiFi.h"
Used: C:\Users\eng.EEPROJ-DP.000\AppData\Local\Arduino15\packages\realtek\hardware\ameba\2.0.4\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
Error compiling for board Ameba RTL8195A.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

You need to take this up with the (I'm trying to use a politically correct term here, but really don't want to) at ameba. There is NO excuse for them building a class with the same name as the Arduino-provided WiFi library, when it operates on different hardware.

Is it possible to rename the library so that there is no conflict ? whats the way forward?