PlatformIO Community

Choosing socket to upload project

I am trying to upload a project to a remote device. To be clear, i have one PC “Client” connected to the arduino and another PC “Server” on another network that will upload a project (PC names are just to be clear). To connect them i run

  1. pio account login
  2. pio remote agent start --share
  3. pio remote agent list
  4. pio remote device monitor --baud 115200
    The remote connection is opened in a socket such as socket://localhost:59326. This connection works because i can send data to the arduino through this socket

The trouble is if i want to use platformio ide to upload. If i add to the configuration in platformio.ini

upload_port = socket://localhost:59326

It auto detects my bluetooth

AVAILABLE: atmel-ice, blackmagic, jlink, sam-ba, stlink
CURRENT: upload_protocol = sam-ba
Looking for upload port...
Auto-detected: /dev/cu.Bluetooth-Incoming-Port
Forcing reset using 1200bps open/close on port /dev/cu.Bluetooth-Incoming-Port
Uploading .pio/build/release/firmware.bin
No device found on cu.Bluetooth-Incoming-Port

But if you do that you hog the USB serial device, and the upload mechanism needs that to reset the device (1200 baud open → bootloader reset).

When you don’t monitor any firmware, what does just pio remote run -t upload do? Uploads the firmware via the remote computer onto the target?

If that fails, does pio remote run --force-remote -t upload work?

1 Like

It compiles but it throws

Error: Unknown board ID 'duelow'

My custom board customization works locally when i use the platoform IDE. (I do have the board with me, i am just testing for when i have it remotely deployed) Maybe i am missing some basic compilation step with pio command

Then the remote machine has a local modification that the local machine doesn’t have. Did you put the duelow.json in the boards/ folder of the project to be reproducable or in the PlatformIO-internal C:\Users\<user>\.platformio\platforms\atmelsam\boards folder?

No, i thought that everything was compiled in the “Server” and all the “Client” did was provide the serial connection to the arduino.

I will try adding the boards as i did with the “Server” PC

Yes, i’m sorry i did not try it before. It was a possibility but i simply thought the Client did not have to install anything.

Thanks again max!