iOS VIOFO App v3.2 - Incorrect handling of text fields with spaces
My friend
@Panzer Platform (Chuck) mentioned that he observed his newly received A139 Pro production dash camera have an issue with the setting of the text values for the "Custom Text Stamp" and "Car License Number". Since the A139 Pro has no screen, you must use the VIOFO app to update the values for those fields. Chuck normally sets those two fields with values that will identify footage gathered by his dash camera testing. Chuck stated that when he places a space in those values the space shows up as a plus (+) character. Chuck uses the iOS version of the VIOFO app to configure the settings of his VIOFO dash cameras. These two text fields only allow numbers, letters, a period (.) character, a hyphen (-) character and a space character.
My Testing - Android VIOFO app v3.2.8
I used the Android version of the VIOFO app to update my A139 Pro running firmware version v1.0_1115 with the text strings that Chuck was using. The end result was that spaces are present in the text strings that appear on the status line. The A139 Pro appears to use a variable width font which makes the space character very narrow, but it's there.
Custom Text Stamp = "CHUCK MCCOY"
Car License Number = "PNZR PLTFRM"
The VIOFO app uses a HTTP GET request to send a send the updated field value for those two fields. The GET request's parameters need to be sent in a manner that the HTTP request itself will not be misinterpreted by the HTTP server on the VIOFO dash camera side of the request. A text value for a GET request parameter is usually translated/encoded in a manner to make it safe to pass to the server. You usually see a space translated to a plus (+) character or "%20". The GET requests sent to the VIOFO dash camera actually have the space character converted to an asterisk (*) character.
My best guess is that the use of an asterisk character for the space is something implemented by the VIOFO app and firmware developers to know that a space character was entered rather than using the traditional plus (+) or hexadecimal escaped value of "%20".
The end result is that updating the text field value using the Android v3.2.8 VIOFO app works with the A139 Pro and with an A229 Duo.
My Testing - iOS VIOFO app v3.2
I used the iOS VIOFO app v3.2 to run the same test, but this time instead two text string values having a space character in the value stored on the dash camera it was a plus (+) symbol. I tried several HTTP packet capture apps on an iOS device, but they all got in the way of the connection between the iOS VIOFO app and the A139 Pro HTTP server. So, I don’t have a packet capture of the requests from the iOS VIOFO app setting those text values.
My educated guess is that the input field value for those text fields are being URI escaped by some api call that is converting the space character to a “+” plus character. I don’t know if the Android app is performing its own character translation of a space to an asterisk or not, but it sure looks that way. The iOS app is not translating the input field value spaces to an asterisk like the Android app before being made URI safe in the GET request sent to the HTTP server on the dash camera. That’s why I wanted to get a packet capture from an iOS device to prove it was the iOS app sending the “+” and not something on the A139 Pro HTTP server and/or firmware end of the connection.
I used my iOS device to change the “Custom Text Stamp” value again to the same value of “CHUCK MCCOY”, but you can see it ended up with the “+” character instead of the space character. I left the “Car License Number” field value as it was set by the Android app and it still shows a space where it should show a space.
Is it camera model specific or VIOFO app specific?
To see if the problem occurs with more than one dash camera model, I tried the same test actions with an A229 Duo running v1.1_1010 firmware. The same exact thing took place. When updating those text fields using the Android VIOFO app, it works and when using the iOS VIOFO app the space characters were changed to plus characters.
Packet capture between v3.2.8 Android VIOFO app and the A229 Duo:
The text values on the status line after being updated by the Android app:
The text values on the status line after being updated by the iOS app:
There appears to be a bug in the v3.2 iOS VIOFO app in the manner in which it encodes the space character to be sent as part of these text field values for at least two “cmd” numbers of 8218 and 8219.
I've reported my findings to VIOFO.