Home        Store        Docs        Blog

Cannot change Ping1D firmware

Hello - I have been using the Ping(1D) Sonar in combination with a Raspberry Pi, and this has been working fine. However, I now want it to work with an Arduino, but the Pingviewer software is not letting me change the firmware to the 9600baud version (e.g. Ping-V.3.27_9600b.hex). The computer (Mac) connects with the sonar, and shows readings, but then when I click “firmware update”, it gives me an “Unexpected error in process: 0” error. The readings then stop and “Emit Ping” does not work. However, after restarting “pingviewer” and replugging the BLUART USB it shows up again, and I can connect with it. Similarly, if I plug it back into the Raspberry Pi, the altimeter works and gives readings. I was hoping whether you could help me figure out what’s going wrong, and why it cannot change the firmware?

Please see the GUI log pasted below (apologies - I am not allowed to upload files as a new user). Seems like an issue with the current firmware? Do I need to flash the sensor as described here?

$ grep -vE '""|Handling Message|Requesting' 20191101-100517728.txt
[10:05:20:414] ping.settingsmanager[Debug]: "Load darkTheme with:" false
[10:05:20:414] ping.settingsmanager[Debug]: "Load debugMode with:" true
[10:05:20:428] ping.settingsmanager[Debug]: "Load replayMenu with:" false
[10:05:20:429] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:429] ping.settingsmanager[Debug]: "Load logScrollLock with:" true
[10:05:20:429] ping.settingsmanager[Debug]: "Load logScrollLock with:" true
[10:05:20:435] ping.settingsmanager[Debug]: "Load debugMode with:" true
[10:05:20:435] ping.settingsmanager[Debug]: "Load debugMode with:" true
[10:05:20:435] ping.settingsmanager[Debug]: "Load debugMode with:" true
[10:05:20:436] ping.settingsmanager[Debug]: "Load debugMode with:" true
[10:05:20:436] ping.settingsmanager[Debug]: "Load replayMenu with:" false
[10:05:20:436] ping.settingsmanager[Debug]: "Load darkTheme with:" false
[10:05:20:572] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:611] default[Warning]: FirmwareUpdate.qml(18) qrc:/FirmwareUpdate.qml:18:5: QML Connections: Cannot assign to non-existent property "onFlashProgress"
[10:05:20:646] ping.devicemanager[Debug]: Start protocol detector service.
[10:05:20:647] ping.protocol.protocoldetector[Debug]: Probing UDP: "LinkConfiguration{Name: BlueRov2 Ping1D Port, Sensor: UNKNOWN, LinkType: UDP, Arguments: (192.168.2.2:9090)}"
[10:05:20:657] default[Warning]: FirmwareUpdate.qml(19) qrc:/FirmwareUpdate.qml:19: TypeError: Cannot read property 'flasher' of null
[10:05:20:658] default[Warning]: FirmwareUpdate.qml(88) qrc:/FirmwareUpdate.qml:88: TypeError: Cannot read property 'firmware_version_major' of null
[10:05:20:658] default[Warning]: PingStatus.qml(72) qrc:/PingStatus.qml:72: TypeError: Cannot read property 'title' of undefined
[10:05:20:658] default[Warning]: PingStatus.qml(75) qrc:/PingStatus.qml:75: TypeError: Cannot read property 'model' of undefined
[10:05:20:658] default[Warning]: PingStatus.qml(14) qrc:/PingStatus.qml:14: TypeError: Cannot call method 'sensorStatusModel' of null
[10:05:20:658] default[Warning]: MainPage.qml(264) qrc:/MainPage.qml:264: TypeError: Cannot read property 'z' of null
[10:05:20:658] ping.main[Info]: Git version: a1e1cb2
[10:05:20:658] ping.main[Info]: Git version date: 2019-09-24T11:41:18-03:00
[10:05:20:658] ping.main[Info]: Git tag: v2.0.4
[10:05:20:658] ping.main[Info]: Git url: https://github.com/bluerobotics/ping-viewer.git
[10:05:20:670] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:671] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:671] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:672] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:672] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:672] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:673] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:673] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:673] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:674] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:768] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:769] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:769] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:770] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:770] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:771] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:20:771] ping.settingsmanager[Debug]: "Load enabledCategories with:" 0
[10:05:21:697] ping.protocol.protocoldetector[Debug]: UDP socket disconnected.
[10:05:21:697] ping.protocol.protocoldetector[Debug]: Probing UDP: "LinkConfiguration{Name: BlueRov2 Ping360 Port, Sensor: UNKNOWN, LinkType: UDP, Arguments: (192.168.2.2:9092)}"
[10:05:22:748] ping.protocol.protocoldetector[Debug]: UDP socket disconnected.
[10:05:22:748] ping.protocol.protocoldetector[Debug]: Probing UDP: "LinkConfiguration{Name: Development port, Sensor: UNKNOWN, LinkType: UDP, Arguments: (127.0.0.1:1234)}"
[10:05:22:748] ping.protocol.protocoldetector[Debug]: Socket is not in connected state.
[10:05:22:748] ping.protocol.protocoldetector[Debug]: "Error (0): Connection refused."
[10:05:22:748] ping.protocol.protocoldetector[Debug]: UDP socket disconnected.
[10:05:22:803] ping.protocol.protocoldetector[Debug]: Waiting port to open..  0 "tty.HoluxM-1000C-SPPslave"
[10:05:22:857] ping.protocol.protocoldetector[Debug]: Waiting port to open..  1 "tty.HoluxM-1000C-SPPslave"
[10:05:22:910] ping.protocol.protocoldetector[Debug]: Waiting port to open..  2 "tty.HoluxM-1000C-SPPslave"
[10:05:22:964] ping.protocol.protocoldetector[Debug]: Waiting port to open..  3 "tty.HoluxM-1000C-SPPslave"
[10:05:23:017] ping.protocol.protocoldetector[Debug]: Waiting port to open..  4 "tty.HoluxM-1000C-SPPslave"
[10:05:23:069] ping.protocol.protocoldetector[Debug]: Waiting port to open..  5 "tty.HoluxM-1000C-SPPslave"
[10:05:23:119] ping.protocol.protocoldetector[Debug]: Waiting port to open..  6 "tty.HoluxM-1000C-SPPslave"
[10:05:23:174] ping.protocol.protocoldetector[Debug]: Waiting port to open..  7 "tty.HoluxM-1000C-SPPslave"
[10:05:23:225] ping.protocol.protocoldetector[Debug]: Waiting port to open..  8 "tty.HoluxM-1000C-SPPslave"
[10:05:23:280] ping.protocol.protocoldetector[Debug]: Waiting port to open..  9 "tty.HoluxM-1000C-SPPslave"
[10:05:23:280] ping.protocol.protocoldetector[Debug]: Couldn't open port "tty.HoluxM-1000C-SPPslave"
[10:05:23:282] ping.protocol.protocoldetector[Warning]: Fail to open serial port: QSerialPort::PermissionError
[10:05:23:332] ping.protocol.protocoldetector[Debug]: Waiting port to open..  0 "tty.HoluxM-1000C-SPPslave"
[10:05:23:332] ping.protocol.protocoldetector[Debug]: Couldn't open port "tty.HoluxM-1000C-SPPslave"
[10:05:23:385] ping.protocol.protocoldetector[Debug]: Waiting port to open..  0 "tty.usbserial-DM01NJ2Q"
[10:05:23:385] ping.protocol.protocoldetector[Debug]: Probing Serial "tty.usbserial-DM01NJ2Q" 115200
[10:05:23:390] ping.protocol.protocoldetector[Debug]: Port is open
[10:05:23:453] ping.protocol.protocoldetector[Debug]: "BR\x04\x00\x04\x00\x00\x00\x01\x00\x00\x00\x9D\x00"
[10:05:23:453] ping.protocol.protocoldetector[Debug]: Detect new device:
device_type: 1
device_revision: 0
firmware_version_major: 0
firmware_version_minor: 0
firmware_version_patch: 157
[10:05:23:455] ping.protocol.protocoldetector[Debug]: Ping detected on: "LinkConfiguration{Name: Detector serial link, Sensor: Ping1D, LinkType: Serial, Arguments: (tty.usbserial-DM01NJ2Q:115200)}"
[10:05:23:509] ping.protocol.protocoldetector[Debug]: Waiting port to open..  0 "tty.usbserial-DM01NJ2Q"
[10:05:23:509] ping.protocol.protocoldetector[Debug]: Probing Serial "tty.usbserial-DM01NJ2Q" 9600
[10:05:23:514] ping.protocol.protocoldetector[Debug]: Port is open
[10:05:24:081] ping.devicemanager[Debug]: Available devices: QVector("LinkConfiguration{Name: Detector serial link, Sensor: Ping1D, LinkType: Serial, Arguments: (tty.usbserial-DM01NJ2Q:115200)}")
[10:05:24:081] ping.devicemanager[Debug]: Add connection configuration for: "Ping1D" "LinkConfiguration{Name: Detector serial link, Sensor: Ping1D, LinkType: Serial, Arguments: (tty.usbserial-DM01NJ2Q:115200)}"
[10:05:24:575] ping.protocol.protocoldetector[Debug]: Probing UDP: "LinkConfiguration{Name: BlueRov2 Ping1D Port, Sensor: UNKNOWN, LinkType: UDP, Arguments: (192.168.2.2:9090)}"
[10:05:25:050] ping.devicemanager[Debug]: Stop protocol detector service.
[10:05:25:050] ping.devicemanager[Debug]: Connecting with sensor: "Ping1D" "LinkConfiguration{Name: Detector serial link, Sensor: Ping1D, LinkType: Serial, Arguments: (tty.usbserial-DM01NJ2Q:115200)}"
[10:05:25:050] ping.settingsmanager[Debug]: "Load lastLinkConfiguration with:" "LinkConfiguration{Name: Detector serial link, Sensor: Ping1D, LinkType: Serial, Arguments: (tty.usbserial-DM01NJ2Q:115200)}"
[10:05:25:050] ping.protocol.ping[Debug]: Loading last configuration connection from settings: "LinkConfiguration{Name: Detector serial link, Sensor: Ping1D, LinkType: Serial, Arguments: (tty.usbserial-DM01NJ2Q:115200)}"
[10:05:25:059] ping.protocol.protocoldetector[Debug]: UDP socket disconnected.
[10:05:25:060] ping.waterfallGradient[Warning]: Invalid color or name
[10:05:25:060] ping.waterfall[Debug]: Gradients: ("Thermal blue", "Thermal black", "Thermal white", "Monochrome black", "Monochrome white", "Monochrome sepia")
[10:05:25:060] ping.waterfall[Warning]: Not valid theme: "Thermal 5"  in: ("Thermal blue", "Thermal black", "Thermal white", "Monochrome black", "Monochrome white", "Monochrome sepia")
[10:05:25:085] ping.settingsmanager[Debug]: "Load debugMode with:" true
[10:05:25:086] ping.settingsmanager[Debug]: "Load enableSensorAdvancedConfiguration with:" false
[10:05:25:086] ping.settingsmanager[Debug]: "Load enableSensorAdvancedConfiguration with:" false
[10:05:25:086] ping.settingsmanager[Debug]: "Load enableSensorAdvancedConfiguration with:" false
[10:05:25:086] ping.settingsmanager[Debug]: "Load debugMode with:" true
[10:05:25:087] ping.settingsmanager[Debug]: "Load debugMode with:" true
[10:05:25:087] ping.settingsmanager[Debug]: "Load debugMode with:" true
[10:05:25:090] default[Warning]: Ping1DControlPanel.qml(116) qrc:/Ping1DControlPanel.qml:116: ReferenceError: startAngle is not defined
[10:05:25:090] default[Warning]: Ping1DControlPanel.qml(115) qrc:/Ping1DControlPanel.qml:115: ReferenceError: startAngle is not defined
[10:05:25:090] default[Warning]: Ping1DControlPanel.qml(120) qrc:/Ping1DControlPanel.qml:120: ReferenceError: animationType is not defined
[10:05:25:091] default[Debug]: Ping1DControlPanel_QMLTYPE_181(0x608000361f80, parent=0x604000155b30, geometry=0,0 562x150)
[10:05:25:097] ping.settingsmanager[Debug]: "Load debugMode with:" true
[10:05:25:100] ping.protocol.sensor[Debug]: Connecting to "LinkConfiguration{Name: Detector serial link, Sensor: Ping1D, LinkType: Serial, Arguments: (tty.usbserial-DM01NJ2Q:115200)}"
[10:05:25:100] ping.protocol.seriallink[Debug]: "LinkConfiguration{Name: Detector serial link, Sensor: Ping1D, LinkType: Serial, Arguments: (tty.usbserial-DM01NJ2Q:115200)}"
[10:05:25:128] ping.protocol.ping[Debug]: Start pre configuration task and requests.
[10:05:25:129] ping.filemanager[Debug]: Creating file name: "/Users/pbongaerts/Documents/PingViewer/Sensor_Log/20191101-100525129.bin"
[10:05:25:129] ping.protocol.filelink[Debug]: "LinkConfiguration{Name: , Sensor: UNKNOWN, LinkType: File, Arguments: (/Users/pbongaerts/Documents/PingViewer/Sensor_Log/20191101-100525129.bin:w)}"
[10:05:25:129] ping.protocol.sensor[Critical]: Connection with log fail ! "LinkConfiguration{Name: , Sensor: UNKNOWN, LinkType: File, Arguments: (/Users/pbongaerts/Documents/PingViewer/Sensor_Log/20191101-100525129.bin:w)}" "Unknown error"
[10:05:25:129] ping.devicemanager[Debug]: Available devices: QVector()
[10:05:25:131] qml[Debug]: DepthAxis.qml(146) 20 12
[10:05:25:423] ping.protocol.ping[Warning]: UNHANDLED MESSAGE ID: 1200
[10:05:25:430] ping.protocol.ping[Debug]:
PingConfiguration {
	1_pingInterval: 66
	1_speedOfSound: 1500000
	2_automaticMode: 1
	3_gainIndex: 6
	3_lengthDistance: 44011
	3_startDistance: 0
}
[10:05:25:438] ping.devicemanager[Debug]: Stop protocol detector service.
[10:05:25:564] ping.protocol.protocoldetector[Debug]: Scan finished.
[10:05:25:721] ping.protocol.ping[Debug]: "Ping-V3.27_115kb.hex"
[10:05:25:721] ping.protocol.ping[Debug]: "Ping-V3.27_9600b.hex"
[10:05:25:721] ping.protocol.ping[Debug]: "Ping_V3.26_115kb.hex"
[10:05:25:721] ping.protocol.ping[Debug]: "Ping_V3.26_9600b.hex"
[10:05:25:907] ping.protocol.ping[Debug]: "Device configuration does not match. Waiting for (66), got (0) for 1_pingInterval"
[10:05:25:907] ping.protocol.ping[Debug]: Device was running with last configuration in auto mode.
[10:05:26:381] ping.protocol.ping[Debug]: Device was running with last configuration in auto mode.
[10:05:26:381] ping.protocol.ping[Debug]: Last configuration done, timer will stop now.
[10:05:29:078] ping.protocol.protocoldetector[Warning]: Fail to open serial port: QSerialPort::PermissionError
[10:05:34:562] qml[Debug]: MainPage.qml(316) Key pressed:  16777248
[10:05:34:562] qml[Debug]: MainPage.qml(350) Ask the visualizer to handle shortcut.
[10:05:34:856] qml[Debug]: MainPage.qml(316) Key pressed:  16777267
[10:05:34:857] qml[Debug]: MainPage.qml(350) Ask the visualizer to handle shortcut.
[10:05:34:925] qml[Debug]: MainPage.qml(316) Key pressed:  16777266
[10:05:34:925] qml[Debug]: MainPage.qml(350) Ask the visualizer to handle shortcut.
[10:05:36:268] qml[Debug]: MainPage.qml(316) Key pressed:  16777248
[10:05:36:268] qml[Debug]: MainPage.qml(350) Ask the visualizer to handle shortcut.
[10:05:36:383] qml[Debug]: MainPage.qml(316) Key pressed:  16777267
[10:05:36:383] qml[Debug]: MainPage.qml(350) Ask the visualizer to handle shortcut.
[10:05:37:650] qml[Debug]: MainPage.qml(316) Key pressed:  16777248
[10:05:37:650] qml[Debug]: MainPage.qml(350) Ask the visualizer to handle shortcut.
[10:05:37:801] qml[Debug]: MainPage.qml(316) Key pressed:  16777249
[10:05:37:802] qml[Debug]: MainPage.qml(350) Ask the visualizer to handle shortcut.
[10:05:45:867] ping.settingsmanager[Debug]: "Load debugMode with:" true
[10:05:45:867] ping.settingsmanager[Debug]: "Load debugMode with:" true
[10:05:46:149] ping.networkmanager[Debug]: "Download [https://raw.githubusercontent.com/bluerobotics/ping-firmware/master/ping1d/Ping-V3.27_9600b.hex] -1 (31KB)"
[10:05:46:188] ping.networkmanager[Debug]: "Download [https://raw.githubusercontent.com/bluerobotics/ping-firmware/master/ping1d/Ping-V3.27_9600b.hex] 100 (361KB)"
[10:05:46:188] ping.networkmanager[Debug]: "Download https://raw.githubusercontent.com/bluerobotics/ping-firmware/master/ping1d/Ping-V3.27_9600b.hex finished"
[10:05:46:189] ping.flash[Debug]: Downloaded firmware: "/private/var/folders/gz/bv7bxycd3gng0px9b5mc7m6szxgcxg/T/Ping Viewer.qvoJFH"
[10:05:46:231] ping.protocol.ping[Warning]: Invalid frequency: 0
[10:05:46:231] ping.protocol.ping[Debug]: Ping frequency 0
[10:05:46:231] ping.protocol.ping[Debug]: Put it in bootloader mode.
[10:05:46:231] ping.protocol.ping[Debug]: Finish connection.
[10:05:47:234] ping.protocol.seriallink[Debug]: Port closed.
[10:05:47:235] ping.protocol.ping[Debug]: Save sensor configuration.
[10:05:47:235] ping.protocol.ping[Debug]: Start flash.
[10:05:48:236] ping.flash[Debug]: Found program in: "/Applications/pingviewer.app/Contents/MacOS/../../stm32flash"
[10:05:48:236] ping.flash[Debug]: Found program in: "/Applications/pingviewer.app/Contents/MacOS/../../stm32flash"
[10:05:48:236] ping.flash[Debug]: 3... 2... 1...
[10:05:48:236] ping.flash[Debug]: "\"/Applications/pingviewer.app/Contents/MacOS/../../stm32flash\" -w \"/private/var/folders/gz/bv7bxycd3gng0px9b5mc7m6szxgcxg/T/Ping Viewer.qvoJFH\" -v -g 0x0 -b 57600 /dev/tty.usbserial-DM01NJ2Q"
[10:05:48:748] ping.flash[Critical]: "Unexpected error in process: 0"
[10:05:48:748] qml[Debug]: FirmwareUpdate.qml(27) Flash procedure failed!
[10:05:48:748] qml[Debug]: FirmwareUpdate.qml(28) Error:
[10:05:49:249] ping.networktool[Debug]: Running release version: "v2.0.4" # 33555456
[10:05:49:250] ping.networktool[Debug]: Testing version: "continuous"
[10:05:49:250] ping.networktool[Debug]: Not a release. QRegularExpressionMatch(Valid, no match)
[10:05:49:250] ping.networktool[Debug]: Testing version: "continuous-fix_small_window"
[10:05:49:250] ping.networktool[Debug]: Not a release. QRegularExpressionMatch(Valid, no match)
[10:05:49:250] ping.networktool[Debug]: Testing version: "stable"
[10:05:49:250] ping.networktool[Debug]: Not a release. QRegularExpressionMatch(Valid, no match)
[10:05:49:250] ping.networktool[Debug]: Testing version: "v2.0.4"
[10:05:49:250] ping.networktool[Debug]: Possible new version.
[10:05:49:250] ping.networktool[Debug]: comparing version: "v2.0.4" # 33555456
[10:05:49:250] ping.networktool[Debug]: Testing version: "t2.0.3"

In an attempt to get this working (and get the 9600baud firmware installed), I have followed the instructions to flash the firmware (but then on a Mac), but unfortunately without success.

I downloaded the firmware from the github page, opened up the device, and powered it up while pressing the boot button. I had to install a different version of stm32flash (using homebrew) as the one in the pingviewer.app folder gave me an ‘exec format error’. I found the device name using ls /dev/tty.* and double-checked the name with the logs. Then with the LED off, I then ran stm32flash, but got a Failed to init device.. Also tried it with a 115200 baudrate (-b 115200) and 115kb firmware file, but the same error.

$ stm32flash -v -g 0x0 -b 9600 -w ./Ping-V3.27_9600b.hex /dev/tty.usbserial-DM01NJ2Q
stm32flash 0.5
http://stm32flash.sourceforge.net/
Using Parser : Intel HEX
Interface serial_posix: 9600 8E1
Failed to init device.

This doesn’t solve your firmware problem, but you can use Ping with an Arduino at 115200 baud if it has more than one serial port (such as an Arduino Mega).

Check out my example in this thread: Ping Sonar and Arduino Mega

$ stm32flash -v -g 0x0 -b 9600 -w ./Ping-V3.27_9600b.hex /dev/tty.usbserial-DM01NJ2Q
stm32flash 0.5
http://stm32flash.sourceforge.net/
Using Parser : Intel HEX
Interface serial_posix: 9600 8E1
Failed to init device.

The order of pressing the button, plugging the device, and running stm32flash is very important. If the stm32 bootloader gets some unexpected data (such as communications from opening up the ping-viewer or other applications), it may become unresponsive.

  • When you encounter this error, close any other applications, and try re-plugging the device to power cycle it to restart the bootloader, then try the command again. Otherwise, this command should be working.
  • Please also share the output of ls /dev/tty*.

Will try to play around a bit more to see if I can get it working. For now, I have received the new unit (thank you!) preloaded with the 9600 firmware/

One additional question regarding hooking it up with the Arduino - I currently have an Adafruit Datashield connected to the Uno, which is using pin 10 to interface with the SD card reader. In the example, the Ping is using 9 and 10, would it be possible to use different pins for the SoftwareSerial RX/TX, so I can keep using the SD card reader?

Yes, you can select any two pins arbitrarily for SoftwareSerial: