Failed to initialize

Dear,

Every time I try to run the sonar I get the error “Failed to initialize Ping!”. I also tried to run in the ping viewer software but it is unable to recognize the device. Although the sonar is not initialized, the pc recognizes it in the ttyUSB0 port.

Do you know how can I fix it? How to restart/reboot the sonar?

def sonar_acquisition(device='/dev/ttyUSB0'):

    #TODO: ADICIONAR TRATATIVA DE ERRO PARA SELECIONAR PORTA

    "Identify and initialize sonar"

    device = f"{device}"  # USB port
    baudrate = 115200

    # Make a new Ping
    myping = Ping1D()

    if device is not None:
        myping.connect_serial(device, baudrate)
    elif device is None:
        myping.connect_serial("/dev/ttyUSB1", baudrate)

    if myping.initialize() is False:
        print("Failed to initialize Ping!")
        exit(1)

    return myping
[...]
self.myping = sonar_acquisition()

first = list(self.myping.get_profile()["profile_data"])

[..]

Regards,
Mariana Flavio.

Hi @mlflavio,

Can you try going through our Ping Viewer troubleshooting steps? If it’s detected by the computer, and the drivers are installed, but Ping Viewer can’t recognise it then it’s perhaps worth attempting a device recovery.

If you’re unable to get the sonar connected to Ping Viewer then you’ll likely need to contact our support email (support@bluerobotics.com), with a link to this thread for some context, and your order number (/rough order date), and try to sort things out from there.

Thanks for your reply, Eliot.

Just to confirm, if none of the troubleshooting steps work I still can apply for a warranty. Right?

The troubleshooting steps are there to help find and fix issues where it’s possible to do so, but if a device is actually broken then there’s no guarantee it’s easily fixable.

If you’ve received a broken product, or it has stopped working in an unexpectedly short timeframe without being misused, then that’s the kind of scenario where you should contact support to discuss getting a warranty replacement :slight_smile: