Skip to content

Commit 2b28d9c

Browse files
authored
Merge pull request #1 from aselafernando/master
Added WiFi protocol definitions and speed & gear data to sensor channel
2 parents 1071244 + 16da531 commit 2b28d9c

2 files changed

Lines changed: 60 additions & 0 deletions

File tree

hu/hu.proto

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,3 +763,61 @@ message NAVDistanceMessage
763763
}
764764
optional DISPLAY_DISTANCE_UNIT display_distance_unit = 4;
765765
}
766+
767+
message WifiChannel
768+
{
769+
required string ssid = 1;
770+
}
771+
772+
message WifiInfoRequest
773+
{
774+
required string ip_address = 1;
775+
optional uint32 port = 2;
776+
}
777+
778+
message WifiInfoResponse {
779+
optional string ip_address = 1;
780+
optional uint32 port = 2;
781+
required Status status = 3;
782+
783+
enum Status {
784+
STATUS_UNSOLICITED_MESSAGE = 1;
785+
STATUS_SUCCESS = 0;
786+
STATUS_NO_COMPATIBLE_VERSION = -1;
787+
STATUS_WIFI_INACCESSIBLE_CHANNEL = -2;
788+
STATUS_WIFI_INCORRECT_CREDENTIALS = -3;
789+
STATUS_PROJECTION_ALREADY_STARTED = -4;
790+
STATUS_WIFI_DISABLED = -5;
791+
STATUS_WIFI_NOT_YET_STARTED = -6;
792+
STATUS_INVALID_HOST = -7;
793+
STATUS_NO_SUPPORTED_WIFI_CHANNELS = -8;
794+
STATUS_INSTRUCT_USER_TO_CHECK_THE_PHONE = -9;
795+
STATUS_PHONE_WIFI_DISABLED = -10;
796+
}
797+
}
798+
799+
message WifiSecurityReponse {
800+
required string ssid = 1; //mo15384a
801+
required string key = 2; //mo15385b
802+
required string bssid = 3; //mo15386c
803+
required SecurityMode security_mode = 4;
804+
required AccessPointType access_point_type = 5;
805+
806+
enum SecurityMode {
807+
UNKNOWN_SECURITY_MODE = 0;
808+
OPEN = 1;
809+
WEP_64 = 2;
810+
WEP_128 = 3;
811+
WPA_PERSONAL = 4;
812+
WPA2_PERSONAL = 8;
813+
WPA_WPA2_PERSONAL = 12;
814+
WPA_ENTERPRISE = 20;
815+
WPA2_ENTERPRISE = 24;
816+
WPA_WPA2_ENTERPRISE = 28;
817+
}
818+
819+
enum AccessPointType {
820+
STATIC = 0;
821+
DYNAMIC = 1;
822+
}
823+
}

hu/hu_aap.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,8 @@ int HUServer::handle_ServiceDiscoveryRequest(ServiceChannels chan, byte* buf,
521521
inner->add_sensor_list()->set_type(HU::SENSOR_TYPE_DRIVING_STATUS);
522522
inner->add_sensor_list()->set_type(HU::SENSOR_TYPE_NIGHT_DATA);
523523
inner->add_sensor_list()->set_type(HU::SENSOR_TYPE_LOCATION);
524+
inner->add_sensor_list()->set_type(HU::SENSOR_TYPE_CAR_SPEED);
525+
inner->add_sensor_list()->set_type(HU::SENSOR_TYPE_GEAR);
524526

525527
callbacks.CustomizeSensorConfig(*inner);
526528
}

0 commit comments

Comments
 (0)