Gecko OS FAQ

Is there a way to run a script from the web setup?

See the setup command. See also: Configuration and Setup, Configuration Scripts.

Where does the module get the UTC time and which port needs to be open on our firewall for this to function?

See the ntp.server variable. The port is UDP port 123.

If I change the baud rate, does it go into effect after a save command, or immediately?

uart.baud changes after save and reboot. You can also apply changes without a save and reboot, using uart_update.

When should I use UART flow control?

You should always use UART flow control to ensure reliable data exchange with no dropped characters. See the uart.flow variable.

Is there anything to be careful about when enabling hardware flow control?

See the uart.flow variable. There are no special considerations about enabling flow control.

How do I turn off all log messages?

Use the command set system.print_level 0. See system.print_level.

How do I run the system in stream mode (UART0) and get the logs and all debug and informational responses from UART1?

Use the following command sequence:

set bus.data_bus uart0
set bus.log_bus uart1
set bus.mode stream
save

How do I verify my Azure certificates?

Tags: azure, tls client, cert, certificate, socket

You can use the following simple Python script to verify your Azure certificates. Change the cert file names and URL to fit your case.

from socket import *
from ssl import *

client_socket=socket(AF_INET, SOCK_STREAM)
tls_client = wrap_socket(client_socket, ssl_version=PROTOCOL_TLSv1, cert_reqs=CERT_REQUIRED, ca_certs="BaltimoreCyberTrustRoot.crt", keyfile="client-key.pem", certfile="client-cert.pem")
tls_client.connect(('HubName.azure-devices.net', 8883))

print('Connected...')

# Close the socket
client_socket.shutdown(SHUT_RDWR)
client_socket.close()