ambrop72 / aprinter

3D printer firmware written in C++
Other
144 stars 42 forks source link

Can't open programming usb port after upload firmware #6

Closed a0s closed 10 years ago

a0s commented 10 years ago

Hi, I found strange behavior of programming usb port on RAMPS-FD. I can't open it after upload firmware. I can't connect from Pronterface with device through this port. I tried all speeds in list. But native usb working fine at the same time.

ambrop72 commented 10 years ago

Are you trying to program the device over native USB port while the firmware is running? If so, then it won't work. It only works with Arduino programs because those install some code that allows that. Aprinter will probably never do that.

If you just want to upload firmware, you can always do it over the programming port. It's slow, but it should work in the default configuration of the build system, no matter what state the board is in.

Note that the build system does support uploading over native USB. But for this to work, you need:

Unfortunately the erase button is made inaccessible by the RAMPS-FD attachment. But, there might be a way to put it into bootloader from software, and if there is, a gcode that does it could be added.

a0s commented 10 years ago

Hm, no. I am trying to program the device over programming usb, and THEN connect to the device over programming usb from Pronterface. And its not connecting.

ambrop72 commented 10 years ago

This is expected, by default the firmware will communicate over native USB. So you're expected to program over programming port but switch to native USB before connecting with Pronterface.

While I do not recommend it, you can get the firmware to use the raw UART (programming port) instead, by changing to USE_USB_SERIAL=0 in the target configuration. Note that this is either-or, it's not possible to have the firmware listen on both native USB and UART.

a0s commented 10 years ago

Thanks for explanation!