Troubleshooting and Fixing Connectivity Issues with Thingy:91

I recently encountered a frustrating issue while trying to program my Thingy:91 in cellular mode. The error message ‘Failed to connect to port’ kept appearing, and no amount of port switching seemed to resolve the problem. After hours of troubleshooting, I thought I’d share my journey and the eventual fix in case anyone else runs into this issue.

The Problem

The error occurred consistently across multiple ports, and even after resetting the device and checking permissions, the issue persisted. Logs indicated that the port was either already in use or couldn’t be opened, which led me to suspect a deeper issue with driver installation or system permissions.

What I Tried

  1. Reinstalling Drivers: I uninstalled and reinstalled the nRF-udev drivers as suggested in the logs. This didn’t immediately solve the problem, but it was a crucial step.
  2. Checking Port Usage: I used tools like lsof to check if any other processes were using the ports. Surprisingly, nothing was blocking them.
  3. System Updates: Ensuring my system was fully updated helped rule out any compatibility issues with the latest software.

The Fix

After some online research, I realized that the issue might be related to user permissions. The nrf-udev rules weren’t properly applied to my user account. Here’s what worked:

  1. Adding User to the dialout Group: Running sudo usermod -a -G dialout $USER and then logging out and back in allowed me to access the serial ports without root privileges.
  2. Rebooting the System: A simple reboot ensured that all changes took effect.

Final Thoughts

It was a bit overwhelming at first, but breaking the problem down step by step made it manageable. Now that everything is working smoothly, I can focus on the fun part—developing cellular applications for the Thingy:91!

If anyone else is struggling with similar issues, don’t hesitate to reach out. Let’s troubleshoot together and keep those devices connected! :rocket: