Git Product home page Git Product logo

arduino-create-agent's Introduction

arduino-create-agent

License: AGPL v3.0 Test Go status Codecov Test Integration status Check License status Check Go Dependencies status Check Go status

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 to seamlessly upload code to any USB connected Arduino board (or Yún in LAN) directly from the browser.

Architecture

+-------------------------------+
|                               |
|            Browser            |
|                               |   Web socket   +----------------------+   flashes   +---------------+
| +---------------------------+ |<-------------->|                      +------------>|               |
| |                           | |                | Arduino Create Agent |             | Arduino Board |
| | Arduino Create Web Editor | +--------------->|                      |<------------+               |
| |                           | |   REST API     +----------------------+   serial    +---------------+
| +---------------------------+ |
+-------------------------------+

Installation

Get the latest version of the Agent for all supported platforms or complete the Getting Started.

Apple silicon support

The Arduino Agent is supported both on Intel and Apple silicon computers. This includes devices with the M1, M2 and M3 processors.
At the moment the Arduino Agent is only built for Intel architectures, but Apple silicon devices can run it thanks to the Rosetta 2 translation layer by Apple.

Documentation

The documentation has been moved to the wiki page. There you can find:

Contributing

Submitting an issue

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 if useful.

Security

If you think you found a vulnerability or other security-related bug in this project, please read our security policy and report the bug to our Security Team 🛡️ Thank you!

e-mail contact: [email protected]

Submitting a pull request

We are glad you want to contribute with code: that's the best way to help this software.

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 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.

Be sure to use go vet and go fmt on every file before each commit: it ensures your code is properly formatted.

Also, for your contribution to be accepted, every one of your commits must be "Signed-off". This is done by committing using this command: git commit --signoff

By signing off your commits, you agree to the following agreement, also known as Developer Certificate of Origin: it assures everyone that the code you're submitting is yours or that you have rights to submit it.

Authors and acknowledgment

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)

The history has been rewritten to keep the repo small (thus removing all binaries committed in the past)

License

Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

arduino-create-agent's People

Contributors

alessio-perugini avatar atosatto avatar ccustine avatar chilipeppr avatar cmaglie avatar dependabot-preview[bot] avatar dependabot[bot] avatar endorama avatar facchinm avatar gvarisco avatar hannobraun avatar jarretluft avatar johnlauer avatar khanning avatar mandrav avatar mastrolinux avatar matteopologruto avatar matteosuppo avatar murilopolese avatar paulkaplan avatar per1234 avatar rsora avatar sandeepmistry avatar sebromero avatar smellai avatar thechampagne avatar umbynos avatar xayton avatar xplato avatar xrmx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduino-create-agent's Issues

Refactor

This project would probably benefit from a refactor.

We could organize the code in different packages:

main: starts things up, manage the daemonization
server: manage the http and websocket server
StartServer: start a http and https server and serves the requests
discovery: searches for serial and network ports
Loop: starts a Loop updating the list of ports found
monitor: dialogues with serial and network ports
Open: open a port to communicate, returns a channel where you can push info
Close: close a port to stop communicating
program: upload a sketch on a board connected to a port
Program: program a port

[Safari] Agent is not connected to client

It happens a lot on my machine, it doesn't on other's (on Gabriele's works), it seems related on a timeout issue. If you could give it a look it would be really nice!

(Also on @lorenzoromagnoli PC the Agent does not restart automatically, we reinstall it from scratch as we did on mine but still nothing)

errors running main.go

When I run main.go I get these errors:

elopio@calchas:~/workspace/go/src/github.com/arduino/arduino-create-agent$ go run ./main.go

command-line-arguments

./main.go:56: undefined: h in h.broadcastSys
./main.go:90: undefined: hideFile
./main.go:96: undefined: Unzip
./main.go:125: undefined: restart
./main.go:140: undefined: Updater
./main.go:184: undefined: GetList
./main.go:200: undefined: h in h.run
./main.go:202: undefined: sh in sh.run
./main.go:206: undefined: discoverLoop
./main.go:210: undefined: wsHandler
./main.go:210: too many errors

What am I missing here? I suppose I'm doing something terribly wrong, but not sure what.

mrk1000 board not recognized in macos

Hello guys, I have this problem, when connecting the mkr1000 board, the agent doesnt recognize the board, does it need additional drivers for macos?

Arch Linux Chromium Issue

Just to note this (was) all working in FireFox 49.0.2 tested with a Leonardo and was able to upload to it, after I found out I had to re-run the getting started process to accept a cert for firefox...

I was first trying to get the plugin working with Chromium which I had no luck on, so then I tried firefox. I didn't realize that you had to run the plugin interface again in the browser (as I already had the bridge installed) to get this cert nfo to pop up. Just thought it would be universal for the platform you are working with, might want to handle this differently as I didn't know what to do until I found these issue posts below then it dawned on me. That I had to then re-run the getting started stuff and then it worked great in FF. 👍 Maybe detect that they don't have the cert and point them to the getting started guide.

#45
puma/puma-dev#47 (comment)

Back to Chromium Version 54.0.2840.90 (64-bit)

Something went wrong

We are not able to establish a secure (HTTPS) connection between the Plugin and the Arduino Web Editor. You can try to restart your browser once more, or Download the Installer and run it again.
Please Write us on the Forum so we can help debugging this isse.

Minor note there is a typo in the word issue at the end of the sentence there. ^

Console:

ArduinoCreateAgent]$ ./Arduino_Create_Bridge 
INFO[0000] map[avrdude:/home/username/.arduino-create/avrdude/6.3.0-arduino6 avrdude-6.3.0-arduino6:/home/username/.arduino-create/avrdude/6.3.0-arduino6] 
INFO[0000] Version:1.0.46                               
INFO[0000] Hostname: systemname                             
INFO[0000] Garbage collection is on using Standard mode, meaning we just let Golang determine when to garbage collect. 
INFO[0000] You specified a serial port regular expression filter: usb|acm|com
 
INFO[0000] Your serial ports:                           
INFO[0000] 	{/dev/ttyACM0     0x8036 0x2341  false}
    
INFO[0000] 	{/dev/ttyUSB0     0x6001 0x0403 A6004mMA false}
 
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

INFO[0000] Inside run of serialhub                      
[GIN-debug] GET   /                         --> main.homeHandler (2 handlers)
[GIN-debug] GET   /certificate.crt          --> main.certHandler (2 handlers)
[GIN-debug] DELETE /certificate.crt          --> main.deleteCertHandler (2 handlers)
[GIN-debug] POST  /upload                   --> main.uploadHandler (2 handlers)
[GIN-debug] GET   /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] POST  /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] WS    /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[ERR] bonjour: Failed to bind to udp6 port: listen udp6 :5353: bind: address already in use
[GIN-debug] WSS   /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] GET   /info                     --> main.infoHandler (2 handlers)
[GIN-debug] POST  /killbrowser              --> main.killBrowserHandler (2 handlers)
[GIN-debug] POST  /pause                    --> main.pauseHandler (2 handlers)
[GIN-debug] POST  /update                   --> main.updateHandler (2 handlers)
[GIN-debug] Listening and serving HTTP on 127.0.0.1:8991
[GIN-debug] Listening and serving HTTPS on 127.0.0.1:8991
[GIN-debug] [ERROR] listen tcp 127.0.0.1:8991: bind: address already in use
INFO[0000] Error trying to bind to port: listen tcp 127.0.0.1:8991: bind: address already in use, so exiting... 
[GIN-debug] Listening and serving HTTPS on 127.0.0.1:8992

(Arduino_Create_Bridge:14991): Gdk-CRITICAL **: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
[ERR] bonjour: Failed to bind to udp6 port: listen udp6 :5353: bind: address already in use
[ERR] bonjour: Failed to bind to udp6 port: listen udp6 :5353: bind: address already in use
[ERR] bonjour: Failed to bind to udp6 port: listen udp6 :5353: bind: address already in use
[ERR] bonjour: Failed to bind to udp6 port: listen udp6 :5353: bind: address already in use

Tried an older version as well:

ArduinoCreateAgent-1.1]$ ./Arduino_Create_Bridge 
INFO[0000] map[avrdude:/home/username/.arduino-create/avrdude/6.3.0-arduino6 avrdude-6.3.0-arduino6:/home/username/.arduino-create/avrdude/6.3.0-arduino6] 
INFO[0000] Version:1.0.38                               
INFO[0000] Hostname: systemname                             
INFO[0000] Garbage collection is on using Standard mode, meaning we just let Golang determine when to garbage collect. 
INFO[0000] You specified a serial port regular expression filter: usb|acm|com
 
INFO[0000] Your serial ports:                           
INFO[0000] 	{/dev/ttyACM0     0x8036 0x2341  false}
    
INFO[0000] 	{/dev/ttyUSB0     0x6001 0x0403 A6004mMA false}
 
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /                         --> main.homeHandler (2 handlers)
[GIN-debug] GET    /certificate.crt          --> main.certHandler (2 handlers)
[GIN-debug] DELETE /certificate.crt          --> main.deleteCertHandler (2 handlers)
[GIN-debug] POST   /upload                   --> main.uploadHandler (2 handlers)
[GIN-debug] GET    /socket.io/               --> main.*WsServer.ServeHTTP·fm (2 handlers)
INFO[0000] Inside run of serialhub                      
[GIN-debug] POST   /socket.io/               --> main.*WsServer.ServeHTTP·fm (2 handlers)
[GIN-debug] WS     /socket.io/               --> main.*WsServer.ServeHTTP·fm (2 handlers)
[GIN-debug] WSS    /socket.io/               --> main.*WsServer.ServeHTTP·fm (2 handlers)
[GIN-debug] GET    /info                     --> main.infoHandler (2 handlers)
[GIN-debug] POST   /killbrowser              --> main.killBrowserHandler (2 handlers)
[GIN-debug] POST   /pause                    --> main.pauseHandler (2 handlers)
[GIN-debug] POST   /update                   --> main.updateHandler (2 handlers)
[GIN-debug] Listening and serving HTTPS on 127.0.0.1:8991
[GIN-debug] Listening and serving HTTP on 127.0.0.1:8991
[GIN-debug] [ERROR] listen tcp 127.0.0.1:8991: bind: address already in use
INFO[0000] Error trying to bind to port: listen tcp 127.0.0.1:8991: bind: address already in use, so exiting... 
[GIN-debug] Listening and serving HTTPS on 127.0.0.1:8992

(Arduino_Create_Bridge:15308): Gdk-CRITICAL **: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed

Now if I hit up the http://create.arduino.cc/getting-started/plugin?page=2 then hit skip for the plugin download as I already have it installed:

INFO[0280] called restart /home/username/ArduinoCreateAgent-1.1/Arduino_Create_Bridge 
INFO[0280] Starting new spjs process                    
&{/home/username/ArduinoCreateAgent-1.1/Arduino_Create_Bridge [/home/username/ArduinoCreateAgent-1.1/Arduino_Create_Bridge -ls -regex usb|acm|com -gc std ] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
FATA[0280] Exited current spjs for restart              
[username@systemname ArduinoCreateAgent-1.1]$

I get bumped back to the CLI, so staying on the same page I run it again...

ArduinoCreateAgent-1.1]$ ./Arduino_Create_Bridge 
INFO[0000] map[avrdude:/home/username/.arduino-create/avrdude/6.3.0-arduino6 avrdude-6.3.0-arduino6:/home/username/.arduino-create/avrdude/6.3.0-arduino6] 
INFO[0000] Version:1.0.46                               
INFO[0000] Hostname: systemname                            
INFO[0000] Garbage collection is on using Standard mode, meaning we just let Golang determine when to garbage collect. 
INFO[0000] You specified a serial port regular expression filter: usb|acm|com
 
INFO[0000] Your serial ports:                           
INFO[0000] 	{/dev/ttyACM0     0x8036 0x2341  false}
    
INFO[0000] 	{/dev/ttyUSB0     0x6001 0x0403 A6004mMA false}
 
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET   /                         --> main.homeHandler (2 handlers)
[GIN-debug] GET   /certificate.crt          --> main.certHandler (2 handlers)
[GIN-debug] DELETE /certificate.crt          --> main.deleteCertHandler (2 handlers)
[GIN-debug] POST  /upload                   --> main.uploadHandler (2 handlers)
[GIN-debug] GET   /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] POST  /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
INFO[0000] Inside run of serialhub                      
[GIN-debug] WS    /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] WSS   /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] GET   /info                     --> main.infoHandler (2 handlers)
[GIN-debug] POST  /killbrowser              --> main.killBrowserHandler (2 handlers)
[GIN-debug] POST  /pause                    --> main.pauseHandler (2 handlers)
[GIN-debug] POST  /update                   --> main.updateHandler (2 handlers)
[GIN-debug] Listening and serving HTTP on 127.0.0.1:8991
[ERR] bonjour: Failed to bind to udp6 port: listen udp6 :5353: bind: address already in use
[GIN-debug] [ERROR] listen tcp 127.0.0.1:8991: bind: address already in use
INFO[0000] Error trying to bind to port: listen tcp 127.0.0.1:8991: bind: address already in use, so exiting... 
[GIN-debug] Listening and serving HTTP on 127.0.0.1:8992
[GIN-debug] [ERROR] listen tcp 127.0.0.1:8992: bind: address already in use
INFO[0000] Error trying to bind to port: listen tcp 127.0.0.1:8992: bind: address already in use, so exiting... 
[GIN-debug] Listening and serving HTTP on 127.0.0.1:8993
[GIN-debug] Listening and serving HTTPS on 127.0.0.1:8991
[GIN-debug] [ERROR] listen tcp 127.0.0.1:8991: bind: address already in use
INFO[0000] Error trying to bind to port: listen tcp 127.0.0.1:8991: bind: address already in use, so exiting... 
[GIN-debug] Listening and serving HTTPS on 127.0.0.1:8992
[GIN-debug] [ERROR] listen tcp 127.0.0.1:8992: bind: address already in use
INFO[0000] Error trying to bind to port: listen tcp 127.0.0.1:8992: bind: address already in use, so exiting... 
[GIN-debug] Listening and serving HTTPS on 127.0.0.1:8993
[GIN-debug] [ERROR] listen tcp 127.0.0.1:8993: bind: address already in use
INFO[0000] Error trying to bind to port: listen tcp 127.0.0.1:8993: bind: address already in use, so exiting... 
[GIN-debug] Listening and serving HTTPS on 127.0.0.1:8994

(Arduino_Create_Bridge:15477): Gdk-CRITICAL **: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
[ERR] bonjour: Failed to bind to udp6 port: listen udp6 :5353: bind: address already in use
[ERR] bonjour: Failed to bind to udp6 port: listen udp6 :5353: bind: address already in use
[ERR] bonjour: Failed to bind to udp6 port: listen udp6 :5353: bind: address already in use
[ERR] bonjour: Failed to bind to udp6 port: listen udp6 :5353: bind: address already in use
...

Which the website then says:

Plugin correctly installed!

You should now see the Arduino Plugin Icon in your top or bottom bar of the Linux distribution you are using. Click on the Tray Icon for a link to the Arduino Web Editor, and if you want to Pause the plugin.
If you close it you can relanching by clicking the Arduino Plugin icon on your desktop.

Another minor typo above "relanching" => "relaunching".

"You had one job spellcheck!"

When you click next:

Restart Chrome

We know this is annoying, but to update the Certificates settings you need to restart Chrome.
If you don't restart the browser, the Arduino Web Editor won't be able to communicate with the plugin. The browser will reopen just this tab.
Any issue or question? Write us on the Forum.

Click Restart:

Loading Arduino Create...

CLI:

http2: server: error reading preface from client 127.0.0.1:53542: read tcp 127.0.0.1:8992->127.0.0.1:53542: read: connection reset by peer

WebGUI:

Something went wrong

We are not able to establish a secure (HTTPS) connection between the Plugin and the Arduino Web Editor. You can try to restart your browser once more, or Download the Installer and run it again.
Please Write us on the Forum so we can help debugging this isse.

I'm going to take a stab in the dark, but it seems like the same issue FireFox was having without the cert, as I believe it sent the same message in the CLI, but alas Chromium didn't prompt to add anything like Firefox did.

Edit: I just tried to export the cert from Firefox and then Import it into Chromium which did not work, still at a stand still, error didn't change.

I may have devalidated the cert some how in firefox using it on chromium as now it says:

http2: server: error reading preface from client 127.0.0.1:45592: remote error: tls: bad certificate

For Firefox. Yay! I tried removing it on Firefox and readding it but no luck there.

Incorrect Install Directory on Mac

Installed on Mac, it installs the agent in /Users/username/Applications, rather than ~username/Applications.

They're the same for accounts created with default settings in Preferences, but for Accounts created in Server App the Home directory can be anywhere - in my case on an external disk with a different name.

It still seems to work, but it looks like the install fails.

Please add instructions on how to install dependencies

For go newbies (like myself) it is quite daunting how go handle package dependencies. What I've tried seems not to be sufficient:

export GOPATH=$(pwd)
go get github.com/tools/godep
./bin/godep get ./...

I got some issues like having to download dependencies with go get because godep did not find them:

src/github.com/onsi/gomega/ghttp/handlers.go:12:2: cannot find package "github.com/golang/protobuf/proto" in any of:
    /usr/lib/go/src/github.com/golang/protobuf/proto (from $GOROOT)
    /home/rm/src/arduino-create-agent/src/github.com/golang/protobuf/proto (from $GOPATH)
godep: exit status 1
rm@rieux:~/src/arduino-create-agent$ GOPATH=$(pwd) ./bin/godep get ./...
godep: Package (golang.org/x/sys/unix) not found
rm@rieux:~/src/arduino-create-agent$ GOPATH=$(pwd) go get golang.org/x/sys/unix
rm@rieux:~/src/arduino-create-agent$ GOPATH=$(pwd) ./bin/godep get ./...
godep: Package (github.com/getlantern/filepersist) not found
rm@rieux:~/src/arduino-create-agent$ GOPATH=$(pwd) go get github.com/getlantern/filepersist
rm@rieux:~/src/arduino-create-agent$ GOPATH=$(pwd) ./bin/godep get ./...
godep: Package (github.com/mattn/go-isatty) not found
rm@rieux:~/src/arduino-create-agent$ GOPATH=$(pwd) go get github.com/mattn/go-isatty
rm@rieux:~/src/arduino-create-agent$ GOPATH=$(pwd) ./bin/godep get ./...
godep: exec: "godep": executable file not found in $PATH

cannot install dependency github.com/sanderhahn/gozip/patchzip

Trying to install dependencies but fails:

GOPATH=$(pwd) ./bin/godep get ./...
package github.com/sanderhahn/gozip/patchzip: cannot find package "github.com/sanderhahn/gozip/patchzip" in any of:
    /usr/lib/go/src/github.com/sanderhahn/gozip/patchzip (from $GOROOT)
    /home/rm/src/arduino-create-agent/src/github.com/sanderhahn/gozip/patchzip (from $GOPATH)
godep: exit status 1

Binary data support

Currently all the messages being sent are being explici cast to string (serialport.go, line 113).
Having support for sending binary data through the serial port would be great.

Maybe you could choose a protocol/type of data you want to receive when you open the port?

This would be crucial for the Eslov-system that is going to be ported/implemented into agent/create in the future.

Prevent autostart on boot

Could someone implement an option/ a setting to choose wether you want the plugin to autostart on boot. Because I don't like the fact that it just clutters my statusbar without asking. And I hate to know that software is running on my machine while I am not using the respective piece of software.

I want to be able to choose wether it should autostart or wether I will manually start the plugin whenever I want to use it.

Check if the directory of a tool exists

If the user deletes a directory from ~/.arduino-create the agent doesn't notice and continues thinking it already exists. It should probably check and download the tool again if at startup the folder didn't exist.

Mega board not recognised on Windows IDE

When plugging in the Mega to Windows and using the Create IDE (on Chrome), Mega shows up as "Board at COM5" rather than the expected "Arduino/Genuino Mega 2560 at COM5". When I have tried to select the Arduino Mega as the board for the port before uploading, it still shows the "Board at COM5" in the dropdown list of connected boards as well as the Mega which is shown as disconnected. It is therefore not possible to upload a sketch to the board since the Mega is disconnected and the Board at COM5 does not know which board it is. (However it works without this problem on my Mac.)

Debug console doesn't seem to work anymore

V 1.0.21-3037740 on OSX
when I select "open debug console" nothing happens. Web console doesn't show any error. if I try lo reload I get "The connection to ws://localhost:8991/socket.io/?EIO=3&transport=websocket&sid=dlJm4u7YjwpEcajp7G-3 was interrupted while the page was loading. socket.io.min.js:2:19359
TypeError: msg.indexOf is not a function
localhost:8991:19:50"

Socketio Messages

We are using http://socket.io/ but only for its reconnections.

We could leverage the concept of events in order to have a clearer API.

For example:

Event from the client Arguments
CmdDiscover
CmdOpen {port: "", baud: ""}
CmdClose {port: ""}
CmdSend {port: "", data: ""}
CmdDownload {tool: "", version: ""}
CmdTools
CmdInterrupt
Event from the agent Arguments
DiscoverSerial []array of boards
DiscoverNetwork []array of boards
ProgramOutput {msg: "", type: "debug"}
ProgramSuccess {msg: ""}
ProgramError {msg: "", err: ""}
DownloadOutput {msg: "", type: "debug"}
DownloadSuccess {msg: ""}
DownloadError {msg: "", err: ""}

HiDPI support in the installer

Bitrock Support says:

property, which will allow you to manually resize the installer window:

<project>
   ...
   <allowWindowResize>1</allowWindowResize>
   ...
</project>

On Windows, we also support DPI aware installers by enabling :

<project>
   ...
   <enableHDPISupport>1</<enableHDPISupport>
   ...
<project>

Edge case when multiple PC identities are using the agent

  • User A downloads the agent and have it running
  • User B downloads the agent and have it running
  • User A wants to pause or kill the agent

This is currently not possible because it Agent A keeps running.
From the UX point of view this is quite mesmerizing because the action you are doing has no feedback and you might want to turn the agent off cause you need to use the ports or whatever.
We need a way to identify the agent with the specific identity, this way we could close it on one user only.

@mastrolinux

Linux 32

Any chance of getting a 32bit version for linux?

Add md5 of downloaded tools

To be sure users download the right tool, include a md5 file and a check after dowbload for every of them.

Error Downloading libraries from Arduino online editor

As stated in the attached picture, i couldn't manage to download libraries from Arduino's online editor. I have tried to download libraries from "Arduino" and not just "Favorites" but seems working for some libraries and others don't.

error while downloading library

[UBUNTU 14.04] Installing agent

At the end of the installation, the plugin is not correctly quitted and so the installation process freezes at 98%. Clicking on quit the installation finish and everything works.

Incorrect License.md contact details

The license file was copied without filling in actual contact details of SW creators.
It currently reads for example:
{signature of Ty Coon}, 1 April 1989 Ty Coon, President of Vice

Add kill-programmer API

The "Interrupt" button in the web interface should have a dual behaviour:

  • kill the java IDE if pressed before compilation end
  • kill the programmer if pressed after

We should keep track of the spawned process' pid to kill it in a cross platform fashion. Maybe a library exists to do this?

@smellai @matteosuppo @00alis

Update udev rules during installation

To make the programming port of the Zero working we need to add the following on linux:

ACTION!="add|change", GOTO="openocd_rules_end"
SUBSYSTEM!="usb|tty|hidraw", GOTO="openocd_rules_end"
# CMSIS-DAP compatible adapters
ATTRS{product}=="*CMSIS-DAP*", MODE="664", GROUP="plugdev"
LABEL="openocd_rules_end"

I did that creating a file named /etc/udev/rules.d/61-openocd.rules with that content.

[Mac] white tray icon on dark scheme

From the betatesting http://forum.arduino.cc/index.php?topic=363469.0

The second issue was that I couldn't see that the Agent was running. My system is set to use the Dark menu bar and Dock - the ArduinoCreateAgent.app does not show an icon on the main display with the Dark menu, it does show on the non-active display menu, so I finally figured out that it was running, and the Agent took me to the http:// pages.

stuck creating desktop shortcut

I'm using Ubuntu Yakkety 16.10.

I dowloaded ArduinoCreateAgent-1.1-linux-x64-installer.tar.gz, extracted and ran it.
Then it got stuck in 89% (Creating desktop shortcut)
ekrankopio de 2016-08-02 17-42-33

This is what was printed in the terminal:


$ ./ArduinoCreateAgent-1.1-linux-x64-installer.run 
INFO[0000] map[]                                        
INFO[0000] Version:1.0.37                               
INFO[0000] Hostname: aeneas                             
INFO[0000] Garbage collection is on using Standard mode, meaning we just let Golang determine when to garbage collect. 
INFO[0000] You specified a serial port regular expression filter: usb|acm|com

INFO[0000] Your serial ports:                           
INFO[0000]  {/dev/ttyUSB0     0xEA60 0x10C4 0001 false}

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /                         --> main.homeHandler (2 handlers)
[GIN-debug] GET    /certificate.crt          --> main.certHandler (2 handlers)
[GIN-debug] DELETE /certificate.crt          --> main.deleteCertHandler (2 handlers)
[GIN-debug] POST   /upload                   --> main.uploadHandler (2 handlers)
[GIN-debug] GET    /socket.io/               --> main.*WsServer.ServeHTTP·fm (2 handlers)
[GIN-debug] POST   /socket.io/               --> main.*WsServer.ServeHTTP·fm (2 handlers)
[GIN-debug] WS     /socket.io/               --> main.*WsServer.ServeHTTP·fm (2 handlers)
[GIN-debug] WSS    /socket.io/               --> main.*WsServer.ServeHTTP·fm (2 handlers)
[GIN-debug] GET    /info                     --> main.infoHandler (2 handlers)
[GIN-debug] POST   /killbrowser              --> main.killBrowserHandler (2 handlers)
[GIN-debug] POST   /pause                    --> main.pauseHandler (2 handlers)
[GIN-debug] POST   /update                   --> main.updateHandler (2 handlers)
INFO[0000] Inside run of serialhub                      
[GIN-debug] Listening and serving HTTP on 127.0.0.1:8991
INFO[0005] Sending err back:  We could not find the serial port /dev/ttyUSB0 that you were trying to close. 
INFO[0005] called restart                               
INFO[0005] Starting new spjs process                    
INFO[0005] exePath using osext: /home/elopio/ArduinoCreateAgent-1.1/Arduino_Create_Bridge

&{/home/elopio/ArduinoCreateAgent-1.1/Arduino_Create_Bridge [/home/elopio/ArduinoCreateAgent-1.1/Arduino_Create_Bridge -ls -regex usb|acm|com -gc std -hibernate] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
FATA[0005] Exited current spjs for restart

Downloadtools method is completely blocking

Whenever a downloadtools command is triggered the agent waits for the response and if in the meantime there are other activitities running (such as serial monitor) the agents stops reacting and we could see a disconnection in the client side.

For a full example sketch please contact @00alis

Documentation for the HTTP(S) interface of Create Agent

Hello,

I have noticed that the Arduino Create Agent offers HTTP(S) and WebSocket endpoints for talking to the Arduino and to upload sketches. I am developing a block-based Arduino system in order to help teach Arduino and electronics to kids via my code club and makerspace (blockuino.no), and I am investigating the possibility of including functionality to upload sketches directly from blockuino.no to the Arduino via these HTTP(S) or WebSocket endpoints.

So far, though I am having little luck. I can generate a Curl copy of the request that the Arduino Create website creates when uploading the Hex file, but I am unable to replicate this via HTTP(S) at all.

Is there an example or a guide of sorts that I can look at in order to complete this integration?

For completeness I am attaching the full HTTP Request that I am trying to send to the Arduino. The result is a "200 OK" response, but nothing really happens on the Arduino itself.

HTTP Request: https://gist.github.com/joachimhs/152a21399f51be43ce9f84ff0f5379cd

Potential arbitrary command execution

Now the command line is sent via the backend to the daemon and is not signed. The #70 is an intention to fix this issue by signing every command line request to a trusted client. The signing key is server side.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.