WebSockets on nginx

location /api/websocket {
proxy_pass ws://192.168.56.101:8123/api/websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
}

location / {
proxy_pass http://192.168.56.101:8123/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
}

Source: ServerAdmin jovan@ris.mk ServerName smkocani.duckdns.org DocumentRoot /var/www/html # Available loglevels: trace8, …, trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for

WebSockets on nginx was last modified: July 15th, 2024 by Jovan Stosic

Sim7600 power-on

This is the code for the power-on of sim7600e:

/**************************Power on Sim7x00**************************/
void Sim7x00::PowerOn(int PowerKey = powerkey){
   uint8_t answer = 0;

  Serial.begin(9600);

  // checks if the module is started
  answer = sendATcommand("AT", "OK", 2000);
  if (answer == 0)
  {
    Serial.print("Starting up...\n");
    
    pinMode(PowerKey, OUTPUT);
    // power on pulse
    digitalWrite(PowerKey, HIGH);
    delay(500);
    digitalWrite(PowerKey, LOW);
    
    // waits for an answer from the module
    while (answer == 0) {     // Send AT every two seconds and wait for the answer
      answer = sendATcommand("AT", "OK", 2000);
	  delay(1000);
    }

Source: Sim7600 and arduino won’t connect – Using Arduino / Project Guidance – Arduino Forum

Sim7600 power-on was last modified: July 8th, 2024 by Jovan Stosic