From 1289056c1827380109a3325b72cc79b33d308181 Mon Sep 17 00:00:00 2001 From: Asela Fernando Date: Thu, 19 Oct 2023 10:54:49 +1100 Subject: [PATCH 1/2] Added Car Speed and Gear Sensors to sensor channel --- hu/hu_aap.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hu/hu_aap.cpp b/hu/hu_aap.cpp index ffde84f..8fae632 100644 --- a/hu/hu_aap.cpp +++ b/hu/hu_aap.cpp @@ -521,6 +521,8 @@ int HUServer::handle_ServiceDiscoveryRequest(ServiceChannels chan, byte* buf, inner->add_sensor_list()->set_type(HU::SENSOR_TYPE_DRIVING_STATUS); inner->add_sensor_list()->set_type(HU::SENSOR_TYPE_NIGHT_DATA); inner->add_sensor_list()->set_type(HU::SENSOR_TYPE_LOCATION); + inner->add_sensor_list()->set_type(HU::SENSOR_TYPE_CAR_SPEED); + inner->add_sensor_list()->set_type(HU::SENSOR_TYPE_GEAR); callbacks.CustomizeSensorConfig(*inner); } From 1e50a6f3357b691d765f771ea15db1d520803262 Mon Sep 17 00:00:00 2001 From: Asela Fernando Date: Thu, 19 Oct 2023 15:08:00 +1100 Subject: [PATCH 2/2] Added WiFi definitions Added WiFI definitions from https://github.com/gartnera/headunit/pull/188 --- hu/hu.proto | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/hu/hu.proto b/hu/hu.proto index 4a06e7e..9f2942e 100644 --- a/hu/hu.proto +++ b/hu/hu.proto @@ -763,3 +763,61 @@ message NAVDistanceMessage } optional DISPLAY_DISTANCE_UNIT display_distance_unit = 4; } + +message WifiChannel +{ + required string ssid = 1; +} + +message WifiInfoRequest +{ + required string ip_address = 1; + optional uint32 port = 2; +} + +message WifiInfoResponse { + optional string ip_address = 1; + optional uint32 port = 2; + required Status status = 3; + + enum Status { + STATUS_UNSOLICITED_MESSAGE = 1; + STATUS_SUCCESS = 0; + STATUS_NO_COMPATIBLE_VERSION = -1; + STATUS_WIFI_INACCESSIBLE_CHANNEL = -2; + STATUS_WIFI_INCORRECT_CREDENTIALS = -3; + STATUS_PROJECTION_ALREADY_STARTED = -4; + STATUS_WIFI_DISABLED = -5; + STATUS_WIFI_NOT_YET_STARTED = -6; + STATUS_INVALID_HOST = -7; + STATUS_NO_SUPPORTED_WIFI_CHANNELS = -8; + STATUS_INSTRUCT_USER_TO_CHECK_THE_PHONE = -9; + STATUS_PHONE_WIFI_DISABLED = -10; + } +} + +message WifiSecurityReponse { + required string ssid = 1; //mo15384a + required string key = 2; //mo15385b + required string bssid = 3; //mo15386c + required SecurityMode security_mode = 4; + required AccessPointType access_point_type = 5; + + enum SecurityMode { + UNKNOWN_SECURITY_MODE = 0; + OPEN = 1; + WEP_64 = 2; + WEP_128 = 3; + WPA_PERSONAL = 4; + WPA2_PERSONAL = 8; + WPA_WPA2_PERSONAL = 12; + WPA_ENTERPRISE = 20; + WPA2_ENTERPRISE = 24; + WPA_WPA2_ENTERPRISE = 28; + } + + enum AccessPointType { + STATIC = 0; + DYNAMIC = 1; + } +}