Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated IP configuration for cameras #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Youssefeh
Copy link

@Youssefeh Youssefeh commented Dec 10, 2024

Automating Camera IP Configuration

This pull request addresses Issue #10, which highlights the difficulty users face in changing the IP address of their Lucid cameras to match their network setup. The implemented solution introduces a script to streamline this process by automating camera IP configuration using the IpConfigUtility tool from the ArenaSDK which was downloaded from the thinklucid site (https://thinklucid.com/downloads-hub/).


Summary of Changes

  • Copied the IpConfigUtility tool
    • Copied the IpConfigUtility tool from the ArenaSDK packages downloaded from the thinklucid site (https://thinklucid.com/downloads-hub/).
    • This tool was NOT developed by me and was taken from the ArenaSDK package to make it easier for users to use
  • Automated Camera Detection:
    • The script scans for connected cameras using the /list command and retrieves details such as MAC addresses, current IPs, subnets, and gateways.
  • User Input Handling:
    • Prompts users to enter new IP addresses for each detected camera.
    • Validates the IP format to ensure correctness before proceeding.
  • Automated IP Configuration:
    • Executes the /force command to temporarily set the new IP address.
    • Follows up with the /persist command to save the IP address permanently.
  • Error Handling:
    • Handles invalid inputs and unexpected tool failures gracefully.
    • Simulates interactive prompts (e.g., pressing "Enter") to ensure a seamless user experience.
  • Simplified Feedback:
    • Consolidates success messages for /force and /persist commands into a single output for each camera, improving usability.

Why This Change is Important

  • User Convenience: Simplifies a manual and error-prone process, making it accessible to less experienced users.
  • Alignment with Community Needs: Directly addresses a ticket raised by a community member.
  • Increased Functionality: Integrates an existing tool into the driver repository for easy access and usability.

Testing Evidence

  • Successfully tested the script on a single Lucid camera:
    • The camera's IP address was updated to the value specified in the ticket.
    • Verified functionality using Wireshark to capture packets from the camera with the new IP address.
  • Screenshots:
    Screenshot from 2024-12-10 15-55-49
    • Figure 3: Wireshark output showing the initial IP address.

Screenshot from 2024-12-10 15-56-10

  • Figure 4: Wireshark output after applying the new IP address.

Screenshot from 2024-12-10 12-09-09

  • Figure 5: Script output demonstrating execution and user prompts.
  • While the script was tested with one camera, the implementation is designed to support multiple cameras and follows robust programming practices.

Known Limitations

  • Testing was performed with a single camera due to hardware availability. Although confident in its functionality for multiple cameras, further testing is recommended.

Future Improvements

  • Expand testing to setups with multiple cameras.
  • Incorporate additional feedback from the community for further enhancements.

This contribution improves the overall usability of the Lucid Vision Driver, providing users with a reliable way to manage camera IP configurations. Feedback and suggestions from maintainers are welcome to refine this feature further.

    - Copied the original script used for manual IP configuration via .
    - Automated the process to:
      - Scan for available cameras and retrieve their MAC addresses and current IPs.
      - Prompt for user input to assign new IP addresses to each detected camera.
      - Sequentially apply the new IP addresses using both  and  commands.
    - Ensured the process no longer requires manual Enter key presses by simulating input programmatically.
    - Combined success messages for both  and  steps into a single confirmation message for cleaner output.
    - Updated  handling to ensure compatibility with Wireshark and Spinnaker library conflicts.

    This change significantly streamlines the workflow, reducing manual effort and minimizing potential errors during camera IP reconfiguration.

Signed-off-by: youssefeh <[email protected]>
@Youssefeh Youssefeh force-pushed the camera_Custom_IP_Configuration branch from a41c2a1 to b4cf564 Compare December 10, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant