BPI-GSM Sketch upload problem

Continua la discussione da [BPI IoT] BPI-GSM module with arduino:

Goodmorning, I have the BPI-GSM but I’m not able to program it. I have followed the video tutorial in this post, but the arduino ide is not able to program BPI-GSM.

I have acquired the USBasm (USB ISP) module. I have connected : MOSI -> MOSI (BPI) RST -> RESET (BPI) SCK -> SCK (BPI) MISO -> MISO (BPI) VCC -> 5V out (BPI) GND -> GND (BPI)

I have acquired USB 2 TTL module (FTDI232) and I have connected : GND -> GND (BPI) RX -> TX (BPI) TX -> RX (BPI)

I have installed the USBasp drivers in Windows 10 (I see “libusb-win32 device - USBasp” on computer management/device manager and Windows says that “This device is working properly” )

Then I have loaded “bpi-gsm_test_code.ino” sketch into arduino IDE 1.6.11. I have selected “Arduino Mega 2560” with “Atmega 2560” Com 3 (the USB2TTL virtual port) Programmer: USBasp

When I try to upload the Sketch on BPI-GSM, I receive the following error log from the IDE:

Sketch uses 12,134 bytes (4%) of program storage space. Maximum is 253,952 bytes. Global variables use 2,321 bytes (28%) of dynamic memory, leaving 5,871 bytes for local variables. Maximum is 8,192 bytes. avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout communicating with programmer An error occurred while uploading the sketch

But if I press the “reset” button on the BPI-GSM while the UPLOAD process is starting, all works fine and the Sketch is loaded. Is not very simple to found the exact moment to press the reset button and I need to resolve the problem.

Someone may help me ? Thanks Francesco

Hi Francesco:

You try this way, in the programming process by USBasp programming Bootloader, and then write your Arduino program