SenseCAP M2 LoRaWAN Gateway - How to ssh into console

Hi there,

And Welcome here…

So I recall an openVpn thing to Leave out the cert blocks and see if it starts the service, often it’s a goofy malformed cert options. I have had that happen on embedded only systems, where they released test code as custom and never added the cert options or something?

OK… So go try this stuff… Some embedded systems fail unless ‘dev tun’ is used instead of tun0 or tun1’

Here is the full AI monty… :grin: :+1:

:white_check_mark: Checklist for OpenVPN on SensCap M2 (OS 0.9.6-7)

1. Ensure OpenVPN is Actually Running on M2

  • First, SSH into the SensCap M2 (or use the serial terminal if SSH isn’t available).
  • Run:
ps | grep openvpn

If it’s not showing up, the service may not be starting at all due to a config error.

2. Check if Config is Being Parsed Correctly

  • Confirm the config.ovpn is correctly placed in the /etc/openvpn/ or the expected UI-configured location.
  • Try running OpenVPN manually for better error output:
openvpn --config /path/to/your/config.ovpn

This will often tell you exactly where the problem is — malformed certs, bad options, missing files, etc.

3. Common Issues:

  • Incorrect format or encoding of <ca>, <cert>, <key> blocks
    Make sure there are no hidden characters, mismatched BEGIN/END lines, or extra spaces.
  • auth-user-pass input handling:
    If you edited this via the GUI, ensure the content was saved correctly to a file and referenced in the .ovpn file as:
auth-user-pass /etc/openvpn/credentials.txt
  • Missing or incorrect dev tun0 setup:
    Some embedded systems fail unless dev tun is used instead of tun0. Try replacing:
dev-type tun
dev tun0

with just:

dev tun
  • TCP Mode compatibility issue:
    Some OpenVPN clients default to UDP mode. Your config correctly uses:
proto tcp-client

Just ensure the Freebox allows this specific TCP connection from the WAN.


:test_tube: Debugging Tip:

Since OpenVPN logs aren’t showing up in the console:

  • Run this from serial or SSH:
logread | grep openvpn

or

cat /var/log/messages | grep openvpn

(Depending on log system used)

If logging is suppressed due to the OpenVPN service not starting at all, try launching manually as mentioned above to capture the errors.


:bulb: Suggestion:

If the Freebox OpenVPN server is working with other clients (Windows, Linux, etc.) — then the config is likely okay. The issue is probably:

  • M2 firmware not supporting inline <extra-certs> properly (try removing that block temporarily)
  • Incorrect handling of auth-user-pass in UI

Give that a go and come back let us know what you find :crossed_fingers:

HTH
GL :slight_smile: PJ :v: