You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Windows with Edge](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-edge.exe)
9
+
*[Windows with Chrome](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-chrome.exe)
10
+
*[Windows with Firefox](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-firefox.exe)
11
+
12
+
### MacOSX
13
+
*[MacOSX with Safari](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-safari.dmg)
14
+
*[MacOSX with Chrome](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-chrome.dmg)
15
+
*[MacOSX with Firefox](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-firefox.dmg)
16
+
17
+
### Linux
18
+
*[Linux x64 with Chrome](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-linux-x64-installer-chrome.tar.gz)
19
+
*[Linux x64 with Firefox](http://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-linux-x64-installer-firefox.tar.gz)
10
20
11
21
arduino-create-agent is a fork of @johnlauer's serial-port-json-server (which we really want to thank for his kindness and great work)
12
22
13
23
The history has been rewritten to keep the repo small (thus removing all binaries committed in the past)
14
24
25
+
26
+
27
+
## Using multiple configurations
28
+
29
+
The agent support multiple configuration files. When multiple configurations are found by the agent, the tray icon menu is expanded to contain the different configurations:
The default `config.ini` file contains common configurations, every other config file inherit from it.
34
+
35
+
To create multiple configuration files:
36
+
- stop the agent: tray bar icon -> pause then tray bar icon -> kill
37
+
- find the `config.ini` file that is present in the `arduino-create-agent` installation folder
38
+
- copy `config.ini` or create a new ini file (e.g. `example.ini`) with content:
39
+
```ini
40
+
name = your configuration name
41
+
```
42
+
add in this file other configuration options (you can override inherited values from `config.ini`)
43
+
- restart the agent
44
+
- click the tray bar icon and select the new configuration
45
+
46
+
**Tip**: you can also use the multiple configurations feature to create a new configuration with the proxy settings. This way you can have multiple proxies configured and disable proxy configuration with ease.
47
+
48
+
## When behind a proxy
49
+
50
+
The agent support working behind a proxy, but manual configuration is required ( there is no support for automatic proxy discovery ).
51
+
52
+
To add proxy configuration:
53
+
- stop the agent: tray bar icon -> pause then tray bar icon -> kill
54
+
- find the `config.ini` file that is present in the `arduino-create-agent` installation folder
55
+
- copy `config.ini` to a new file (e.g. `proxy.ini`) with content:
56
+
```ini
57
+
name = Proxy Enabled
58
+
[env]
59
+
http_proxy=your.proxy.here
60
+
https_proxy=your.https.proxyhere
61
+
```
62
+
- please note spaces are not allowed before and after the string `http_proxy`
* [Windows with Edge dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer-edge.exe)
139
+
* [Windows with Chrome dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer.exe)
140
+
* [Windows with Firefox dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer-firefox.exe)
141
+
142
+
### MacOSX
143
+
* [MacOSX with Safari dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-safari.dmg)
144
+
* [MacOSX with Chrome dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-chrome.dmg)
145
+
* [MacOSX with Firefox dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-firefox.dmg)
146
+
147
+
### Linux
148
+
* [Linux x64 with Chrome dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-linux-x64-installer-chrome.run)
149
+
* [Linux x64 with Firefox dev](http://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-linux-x64-installer-firefox.run)
150
+
85
151
86
152
## How to use it
87
153
The arduino create agent is a single binary that reads from a configuration file. Upon launching it will sit on the traybar and work in the background.
@@ -91,12 +157,12 @@ It will listen to http and websocket connections on a range of ports from `8990`
91
157
### Discover the port
92
158
You should make GET request to the `/info` endpoint on the possible ports, until you find a reply:
93
159
94
-
$ curl http://localhost:8990/info
95
-
curl: (7) Failed to connect to localhost port 8990: Connection refused
96
-
$ curl http://localhost:8991/info
160
+
$ curl http://127.0.0.1:8990/info
161
+
curl: (7) Failed to connect to 127.0.0.1 port 8990: Connection refused
The reply will contain a json with info about the version and the http and https endpoints to use
102
168
@@ -107,9 +173,9 @@ Once you have the websocket endpoint you need you can:
107
173
```javascript
108
174
var socket = io(endpoint);
109
175
socket.on('connect', function () {
110
-
socket.emit('message', yourCommand);
176
+
socket.emit('command', yourCommand);
111
177
112
-
socket.on('message', function () {
178
+
socket.on('command', function () {
113
179
// Your code to handle messages
114
180
})
115
181
}
@@ -176,7 +242,7 @@ where you should replace /dev/ttyACM0 with the actual port and 9600 with the bau
176
242
You will receive a message like:
177
243
178
244
```json
179
-
{
245
+
{
180
246
"Cmd":"Open",
181
247
"Desc":"Got register/open on port.",
182
248
"Port":"/dev/ttyACM0",
@@ -189,7 +255,7 @@ You will receive a message like:
189
255
or
190
256
191
257
```json
192
-
{
258
+
{
193
259
"Cmd":"OpenFail",
194
260
"Desc":"Error opening port. Serial port busy",
195
261
"Port":"/dev/ttyACM0",
@@ -204,7 +270,7 @@ You can then close the port with
204
270
You will receive a message like:
205
271
206
272
```json
207
-
{
273
+
{
208
274
"Cmd":"Close",
209
275
"Desc":"Got unregister/close on port.",
210
276
"Port":"/dev/ttyACM0",
@@ -216,7 +282,7 @@ or
216
282
217
283
218
284
```json
219
-
{
285
+
{
220
286
"Error":"We could not find the serial port /dev/ttyACM0 that you were trying to close."
221
287
}
222
288
```
@@ -238,7 +304,7 @@ with a reply like
238
304
You can receive output from the serial port by listening to messages like this:
239
305
240
306
```json
241
-
{
307
+
{
242
308
"D":"output string\r\n"
243
309
}
244
310
```
@@ -309,17 +375,20 @@ The results of the upload will be delivered via websocket with messages that loo
309
375
310
376
## Development
311
377
312
-
From the project root dir executing:
378
+
To clone the repository, run the following command:
313
379
```
314
-
exportGOPATH=$PWD
315
-
go get
316
-
go build
380
+
go get github.com/arduino/arduino-create-agent
317
381
```
318
-
will build the `arduino-create-agent` binary.
319
382
320
-
`compile_webidebridge.sh` contains the cross-platform script we use to deploy the agent for all the supported platforms; it needs to be adjusted as per your `go` installation paths and OS.
383
+
This will clone the repository into your [Go workspace](https://golang.org/doc/code.html#Workspaces) or create a new workspace, if one doesn't exist. You can set `$GOPATH` to define where your Go workspace is located.
384
+
385
+
Now you can go to the project directory and compile it:
386
+
```
387
+
cd $GOPATH/src/github.com/arduino/arduino-create-agent
388
+
go build
389
+
```
321
390
322
-
You can use `bootstrapPlatforms` function to compile the needed CGO-enabled environment
391
+
This will create the `arduino-create-agent` binary.
323
392
324
393
Other prerequisites are:
325
394
* libappindicator (Linux only on Ubuntu `sudo apt-get install libappindicator1`)
0 commit comments