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
Copy file name to clipboardExpand all lines: README.md
+35-443
Original file line number
Diff line number
Diff line change
@@ -3,453 +3,44 @@
3
3
arduino-create-agent
4
4
====================
5
5
6
+
The Arduino Create Agent is a single binary that will sit on the traybar and work in the background. It allows you to use the [Arduino Create applications](https://create.arduino.cc) to seamlessly upload code to any USB connected Arduino board (or Yún in LAN) directly from the browser.
6
7
7
-
## GOA 2 refactoring
8
-
The agent is currently transitioning to the v2 of the GOA framework for API management, please refer to the following
9
-
[documentation](https://github.com/goadesign/goa/tree/v2) in order to install tools and libraries
10
-
11
-
12
-
i.e. to regenerate code from design use:
13
-
```bash
14
-
goa gen github.com/arduino/arduino-create-agent/design
15
-
```
16
-
17
-
## Installation
18
-
Get the latest version of the Agent for all supported platforms:
19
-
20
-
### Windows
21
-
*[Windows with Edge](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-edge.exe)
22
-
*[Windows with Chrome](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-chrome.exe)
23
-
*[Windows with Firefox](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-windows-installer-firefox.exe)
24
-
25
-
### MacOSX
26
-
*[MacOSX with Safari](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-safari.dmg)
27
-
*[MacOSX with Chrome](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-chrome.dmg)
28
-
*[MacOSX with Firefox](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-osx-installer-firefox.dmg)
29
-
30
-
### Linux
31
-
*[Linux x64 with Chrome](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-linux-x64-installer-chrome.tar.gz)
32
-
*[Linux x64 with Firefox](https://downloads.arduino.cc/CreateBridgeStable/ArduinoCreateAgent-1.1-linux-x64-installer-firefox.tar.gz)
33
-
34
-
arduino-create-agent is a fork of @[johnlauer](https://github.com/johnlauer)'s [serial-port-json-server](https://github.com/johnlauer/serial-port-json-server) (which we really want to thank for his kindness and great work)
35
-
36
-
The history has been rewritten to keep the repo small (thus removing all binaries committed in the past)
37
-
38
-
39
-
40
-
## Using multiple configurations
41
-
42
-
The agent supports 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.
47
-
48
-
To create multiple configuration files:
49
-
- stop the agent: tray bar icon -> pause then tray bar icon -> kill
50
-
- find the `config.ini` file that is present in the `arduino-create-agent` installation folder
51
-
- copy `config.ini` or create a new ini file (e.g. `example.ini`) with content:
52
-
```ini
53
-
name = your configuration name
54
-
```
55
-
add in this file other configuration options (you can override inherited values from `config.ini`)
56
-
- restart the agent
57
-
- click the tray bar icon and select the new configuration
58
-
59
-
**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.
60
-
61
-
## When behind a proxy
62
-
63
-
The agent supports working behind a proxy, but manual configuration is required (there is no support for automatic proxy discovery).
64
-
65
-
To add proxy configuration:
66
-
- stop the agent: tray bar icon -> pause then tray bar icon -> kill
67
-
- find the `config.ini` file that is present in the `arduino-create-agent` installation folder
68
-
- copy `config.ini` to a new file (e.g. `proxy.ini`) with content:
69
-
```ini
70
-
name = Proxy Enabled
71
-
[env]
72
-
http_proxy=your.proxy.here
73
-
https_proxy=your.https.proxyhere
74
-
```
75
-
- please note spaces are not allowed before and after the string `http_proxy`
1. Open Finder, click on Go menu, select 'Go to Folder'
101
-
102
-

103
-
2. Type the directory containing the autolauncher file, change <username> with your Mac username, by default the directory is /Users/username/Library/LaunchAgents
104
-
105
-

106
-
3. Select the ArduinoCreateAgent.plist file
107
-
108
-

109
-
4. Right click on the file name and select 'Move to Trash'
110
-
111
-

or in the location selected during the installation
145
-
146
-
# Contributing
147
-
148
-
Please use the current latest version:
149
-
150
-
### Windows
151
-
* [Windows with Edge dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer-edge.exe)
152
-
* [Windows with Chrome dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer.exe)
153
-
* [Windows with Firefox dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-windows-installer-firefox.exe)
154
-
155
-
### MacOSX
156
-
* [MacOSX with Safari dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-safari.dmg)
157
-
* [MacOSX with Chrome dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-chrome.dmg)
158
-
* [MacOSX with Firefox dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-osx-installer-firefox.dmg)
159
-
160
-
### Linux
161
-
* [Linux x64 with Chrome dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-linux-x64-installer-chrome.run)
162
-
* [Linux x64 with Firefox dev](https://downloads.arduino.cc/CreateBridge/staging/ArduinoCreateAgent-1.0-linux-x64-installer-firefox.run)
163
-
164
-
165
-
## How to use it
166
-
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.
167
-
168
-
It will listen to http and websocket connections on a range of ports from `8990` to `9000`.
169
-
170
-
### Discover the port
171
-
You should make GET request to the `/info` endpoint on the possible ports, until you find a reply:
172
-
173
-
$ curl http://127.0.0.1:8990/info
174
-
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
181
-
182
-
### Open a websocket
183
-
Most of the commands can be performed with websocket instructions. We use a library called [socket.io](https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.3.5/socket.io.min.js) to handle the messages.
184
-
Once you have the websocket endpoint you need you can:
185
-
186
-
```javascript
187
-
var socket = io(endpoint);
188
-
socket.on('connect', function () {
189
-
socket.emit('command', yourCommand);
190
-
191
-
socket.on('command', function () {
192
-
// Your code to handle messages
193
-
})
194
-
}
195
-
```
196
-
197
-
### Use the debug console
198
-
By clicking on the tray icon and going to the debug console you can try most of the websocket commands. The first command you should type in is:
199
-
200
-
log on
201
-
202
-
### List the boards
203
-
To get a json list of the connected boards you can issue the command:
204
-
205
-
list
206
-
207
-
You will receive an object of all the boards connected with USB or over the network:
- commandline is the command to execute to perform the upload. This is, for example, avrdude on a Leonardo.
375
-
376
-
- hex contains the sketch binary encoded in base64 (could decode in Intel hex or raw binary)
377
-
378
-
- signature is the signature of the commandline signed with the private key that matches the public key contained in the config.ini of the arduino-create-agent
379
-
380
-
The results of the upload will be delivered via websocket with messages that look like:
You can install the [arduino-create-agent-js-client](https://github.com/arduino/arduino-create-agent-js-client) in your client application
391
-
392
-
---
393
-
394
-
## Development
395
-
396
-
Please remember that for compile the project, you need go version >= 1.10.x (older versions are not supported for compile)
397
-
398
-
To clone the repository, run the following command:
399
-
```
400
-
go get github.com/arduino/arduino-create-agent
401
-
```
402
-
403
-
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.
404
-
405
-
Now you can go to the project directory and compile it:
406
-
```
407
-
cd $GOPATH/src/github.com/arduino/arduino-create-agent
408
-
go build
409
-
```
410
-
411
-
This will create the `arduino-create-agent` binary.
412
-
413
-
Other prerequisites are:
414
-
* libappindicator (Linux only on Ubuntu `sudo apt-get install libappindicator1 libappindicator3-0.1-cil libappindicator3-0.1-cil-dev libappindicator3-1 libappindicator3-dev libgtk-3-0 libgtk-3-dev`)
415
-
*[go-selfupdate] (https://github.com/sanbornm/go-selfupdate) if you want to test automatic updates
416
-
417
-
### Windows
418
-
Since we are using the https://github.com/lxn/walk library, we need to ship a manifest.xml file, otherwise the error would be:
419
-
420
-
```
421
-
panic: Unable to create main window: TTM_ADDTOOL failed
422
-
```
423
-
424
-
To do it make sure to install the required tool:
425
-
426
-
```
427
-
$ go get github.com/akavel/rsrc
428
-
```
429
-
430
-
and build it with
431
-
432
-
```
433
-
$ rsrc -arch=386 -manifest=manifest.xml
434
-
$ go build
435
-
```
436
-
437
-
Keep in mind that the presence of rsrc.syso file will break other builds, for example
22
+
## Installation
23
+
Get the [latest version](https://github.com/arduino/arduino-create-agent/releases) of the Agent for all supported platforms or complete the [Getting Started](https://create.arduino.cc/getting-started/plugin/welcome).
438
24
439
-
```
440
-
$ GOOS=linux go build
441
-
# github.com/arduino/arduino-create-agent
442
-
/usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
443
-
/usr/sbin/ld: i386 architecture of input file `/tmp/go-link-084341451/000000.o' is incompatible with i386:x86-64 output
444
-
collect2: error: ld returned 1 exit status
445
-
```
25
+
## Apple M1 support
26
+
At the moment the new Apple Silicon Macs released in November 2020, like the new [MacBook Pro 13"](https://www.apple.com/macbook-pro-13/), [MacBook Air](https://www.apple.com/macbook-air/) and [Mac mini](https://www.apple.com/mac-mini/) models with the [Apple M1](https://www.apple.com/mac/m1/) chip are currently NOT supported by the Create Agent.
446
27
447
-
## Submitting an issue
28
+
## Documentation
29
+
The documentation has been moved to the [wiki](https://github.com/arduino/arduino-create-agent/wiki) page. There you can find:
30
+
-[Advanced usage](https://github.com/arduino/arduino-create-agent/wiki/Advanced-usage): explaining how to use multiple configurations and how to use the agent with a proxy.
-[How to compile on Raspberry Pi](https://github.com/arduino/arduino-create-agent/wiki/How-to-compile-on-Raspberry-Pi)
35
+
-[How to use crashreport functionality](https://github.com/arduino/arduino-create-agent/wiki/How-to-use-crashreport-functionality)
36
+
-[How to use the agent](https://github.com/arduino/arduino-create-agent/wiki/How-to-use-the-agent)
448
37
449
-
Please attach the output of the commands running at the debug console if useful.
38
+
## Contributing
39
+
### Submitting an issue
450
40
451
-
## Submitting a pull request
41
+
When submitting a new issue please search for duplicates before creating a new one. Help us by providing useful context and information. Please attach the output of the commands running at the debug console or attach [crash reports](https://github.com/arduino/arduino-create-agent/wiki/How-to-use-crashreport-functionality) if useful.
452
42
43
+
### Submitting a pull request
453
44
We are glad you want to contribute with code: that's the best way to help this software.
454
45
455
46
Your contribution is adding or modifying existing behaviour, please always refer to an existing issue or open a new one before contributing. We are trying to use [Test Driven Development](https://en.wikipedia.org/wiki/Test-driven_development) in the near future: please add one or more tests that prove that your contribution is good and is working as expected, it will help us a lot.
@@ -460,6 +51,12 @@ Also, for your contribution to be accepted, every one of your commits must be "S
460
51
461
52
By signing off your commits, you agree to the following agreement, also known as [Developer Certificate of Origin](http://developercertificate.org/): it assures everyone that the code you're submitting is yours or that you have rights to submit it.
462
53
54
+
## Authors and acknowledgment
55
+
arduino-create-agent is a fork of @[johnlauer](https://github.com/johnlauer)'s [serial-port-json-server](https://github.com/johnlauer/serial-port-json-server) (which we really want to thank for his kindness and great work)
56
+
57
+
The history has been rewritten to keep the repo small (thus removing all binaries committed in the past)
58
+
59
+
## License
463
60
```
464
61
Developer Certificate of Origin
465
62
Version 1.1
@@ -498,8 +95,3 @@ By making a contribution to this project, I certify that:
498
95
maintained indefinitely and may be redistributed consistent with
499
96
this project or the open source license(s) involved.
500
97
```
501
-
502
-
503
-
## Creating a release
504
-
Just create a new release on GitHub, and our drone server will build and upload
505
-
the compiled binaries for every architecture in a zip file in the release itself.
0 commit comments