Engineering and technology notes

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

upgrade – ESM 401 Unauthorized error on Ubuntu 18.04

deb http://archive.ubuntu.com/ubuntu/ bionic-backports main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu/ bionic main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main universe multiverse restricted
deb http://security.ubuntu.com/ubuntu/ bionic-security main universe multiverse restricted

Source: upgrade – ESM 401 Unauthorized error on Ubuntu 16.04 – Ask Ubuntu

upgrade – ESM 401 Unauthorized error on Ubuntu 18.04 was last modified: June 3rd, 2024 by Jovan Stosic

Add AD Account over ldap

**LDAP so Active Directory**
### Eve eden link za pomos: http://pig.made-it.com/pig-adusers.html
### Za password treba so attribute $”unicodePwd”, taka da pazi 😀
### Prvo e potrebno da se enkodira Passwordot so $”UTF16LE” od $”UTF16″ pa so $”base64″

 

## Za enkripcija na password se koristi ovaa komanda
echo -n “\”Password\”” | iconv -f UTF8 -t UTF16LE | base64 -w 0

 

## Posle ti treba ovoj ldif fajl
#####################################################
dn: CN=filip,OU=EhealthUsers,DC=ehealthdev,DC=local
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: filip
sn: filip
telephoneNumber: 1234563213123
sAMAccountName: filip
userPrincipalName: filip@ehealthdev.local

 

dn: CN=filip,OU=EhealthUsers,DC=ehealthdev,DC=local
changetype: modify
replace: unicodePwd
unicodePwd::IgBDAG8AcwBoAHkAJgA5ADYAOQAiAA==

 

dn: CN=filip,OU=EhealthUsers,DC=ehealthdev,DC=local
changetype: modify
replace: userAccountControl
userAccountControl: 512
#####################################################

 

## Za dodavanje korisnik vo AD so LDAP Mora da ti bide Secure konekcijata za da moze unicodePwd (Passwordot) da se stavi
ldapadd -H ldaps://192.168.56.104:636 -x -D “CN=Administrator,CN=Users,DC=ehealthdev,DC=local” -W -f proba.ldif

 

## Za prelistuvanje na Domain Component i proverka dali akauntot e OK
ldapsearch -x -D “CN=filip,OU=EhealthUsers,DC=ehealthdev,DC=local” -W -H ldap://192.168.56.104 -b “dc=ehealthdev,dc=local”

Add AD Account over ldap was last modified: April 1st, 2024 by Jovan Stosic

Ubuntu 18.04 LTS : OpenLDAP : LDAP over SSL/TLS

root@dlp:~#

cp /etc/ssl/private/server.key \
/etc/ssl/private/server.crt \
/etc/ssl/certs/ca-certificates.crt \
/etc/ldap/sasl2/

root@dlp:~#

chown openldap. /etc/ldap/sasl2/server.key \
/etc/ldap/sasl2/server.crt \
/etc/ldap/sasl2/ca-certificates.crt
root@dlp:~#

vi mod_ssl.ldif
# create new
dn: cn=config
changetype: modify
add: olcTLSCACertificateFile
olcTLSCACertificateFile: /etc/ldap/sasl2/ca-certificates.crt
-
replace: olcTLSCertificateFile
olcTLSCertificateFile: /etc/ldap/sasl2/server.crt
-
replace: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/ldap/sasl2/server.key

root@dlp:~#

ldapmodify -Y EXTERNAL -H ldapi:/// -f mod_ssl.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
modifying entry "cn=config"
[3] Configure LDAP Client
If you’d like to make sure the connection between LDAP server and client is encrypted, use tcpdump and other network capture software on LDAP server.
root@www:~#

echo “TLS_REQCERT allow” >> /etc/ldap/ldap.conf
root@www:~#

vi /etc/ldap.conf
# line 261: uncomment

ssl start_tls

root@www:~#

logout

www login: ubuntu     # LDAP user
Password:
Last login: Tue Jun  5 11:22:06 JST 2018 on ttyS0
Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-20-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Tue Jun  5 15:05:32 JST 2018

  System load:  0.0               Processes:           93
  Usage of /:   6.4% of 28.45GB   Users logged in:     0
  Memory usage: 3%                IP address for ens3: 10.0.0.31
  Swap usage:   0%

 * Meltdown, Spectre and Ubuntu: What are the attack vectors,
   how the fixes work, and everything else you need to know
   - https://ubu.one/u2Know

16 packages can be updated.
8 updates are security updates.

ubuntu@www:~$      # logined

Source: Ubuntu 18.04 LTS : OpenLDAP : LDAP over SSL/TLS : Server World

Ubuntu 18.04 LTS : OpenLDAP : LDAP over SSL/TLS was last modified: March 27th, 2024 by Jovan Stosic