Skip to content

Commit 805dd84

Browse files
committed
Added support for BYD
1 parent 92542ea commit 805dd84

14 files changed

Lines changed: 512 additions & 129 deletions

File tree

apps/box/android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ android {
8686
applicationId "land.fx.blox"
8787
minSdkVersion rootProject.ext.minSdkVersion
8888
targetSdkVersion rootProject.ext.targetSdkVersion
89-
versionCode 257
90-
versionName "2.5.1"
89+
versionCode 258
90+
versionName "2.5.2"
9191

9292
testBuildType System.getProperty('testBuildType', 'debug')
9393
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<network-security-config>
3-
<domain-config cleartextTrafficPermitted="true">
4-
<domain includeSubdomains="true">10.0.2.2</domain>
5-
<domain includeSubdomains="true">localhost</domain>
6-
<domain includeSubdomains="true">10.42.0.1</domain>
7-
</domain-config>
3+
<base-config cleartextTrafficPermitted="true">
4+
<trust-anchors>
5+
<certificates src="system" />
6+
</trust-anchors>
7+
</base-config>
88
</network-security-config>

apps/box/ios/Box.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@
589589
"$(inherited)",
590590
"@executable_path/Frameworks",
591591
);
592-
MARKETING_VERSION = 2.5.1;
592+
MARKETING_VERSION = 2.5.2;
593593
OTHER_LDFLAGS = (
594594
"$(inherited)",
595595
"-ObjC",
@@ -627,7 +627,7 @@
627627
"$(inherited)",
628628
"@executable_path/Frameworks",
629629
);
630-
MARKETING_VERSION = 2.5.1;
630+
MARKETING_VERSION = 2.5.2;
631631
OTHER_LDFLAGS = (
632632
"$(inherited)",
633633
"-ObjC",

apps/box/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "box",
3-
"version": "2.5.1",
3+
"version": "2.5.2",
44
"private": true,
55
"dependencies": {
66
"@babel/core": "*",

apps/box/src/api/bloxHardware.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,44 @@ export const getBloxProperties = async (): Promise<any> => {
106106
* Erase partition
107107
* @returns
108108
*/
109+
/**
110+
* Exchange config with a Blox at a specific IP address (LAN/PC setup).
111+
* Same as exchangeConfig but targets the provided IP instead of the
112+
* hardcoded hotspot API_URL.
113+
*/
114+
export const exchangeConfigAtIp = async (
115+
ip: string,
116+
port: number,
117+
data: { peer_id?: string; seed?: string }
118+
): Promise<{ data: { peer_id: string } }> => {
119+
const formData = new URLSearchParams();
120+
formData.append('peer_id', data?.peer_id);
121+
formData.append('seed', data?.seed);
122+
return axios.post(
123+
`http://${ip}:${port}/peer/exchange?${formData.toString()}`,
124+
undefined,
125+
{
126+
timeout: 1000 * 15,
127+
headers: {
128+
Accept: '*/*',
129+
'Content-Type': 'application/x-www-form-urlencoded',
130+
},
131+
}
132+
);
133+
};
134+
135+
/**
136+
* Get Blox properties from a specific IP address (LAN/PC setup).
137+
* Skips BLE — goes straight to HTTP at the provided address.
138+
*/
139+
export const getBloxPropertiesAtIp = async (
140+
ip: string,
141+
port: number
142+
): Promise<any> => {
143+
const res = await axios.get(`http://${ip}:${port}/properties`);
144+
return res;
145+
};
146+
109147
export const bloxFormatDisk = async (): Promise<{ data: GeneralResponse }> => {
110148
return axios.post(`${API_URL}/partition`);
111149
};

0 commit comments

Comments
 (0)