I am a novice to BT so I am looking for some advice. My LPC1314 has a bluetooth module soldered to its UART.


bluetooth module

I believe the BT module is a HC-06.

I want to use BT to flash the firmware.bin to the device (later also for debugging). Unfortunately I do not have a manual and I could not get it to work.

  • the BT module / connection works (I can remote control the device using an android app)

I can BT scan the device (it shows the MAC address): hcitool scan

I tried different tools to send the file (no luck):

  • bluetooth-sendto
  • coax-software pybootloader.SerialLoader.py

Any ideas about the right tools to send the firmware.bin file from Linux?

Here my attempt to use the suggested LPC21ISP tool:

mark@ichikawa:~$ sudo rfcomm bind rfcomm0 00:19:MY:MA:xx:yy 1
mark@ichikawa:~$ rfcomm
rfcomm0: 00:19:MY:MA:xx:yy channel 1 clean 
mark@ichikawa:~$ ls -l /dev/rfcomm0
crw-rw---- 1 root dialout 216, 0 Feb  3 09:07 /dev/rfcomm0

I resolved the permission issue and lpc21isp stopped complain about the com port...

mark@ichikawa:~$ sudo lpc21isp -control -verify -bin firmware.bin /dev/rfcomm0 115200 12000
Verify after copy RAM to Flash.
lpc21isp version 1.94
File firmware.bin:
image size : 1952
Image size : 1952
Synchronizing (ESC to abort)..............................................
............. no answer on '?'

I also pressed the ISP button on the device but still the firmware is not uploaded. I tried using LPC21ISP on Windows7 and it shows me the same synchronizing issue.

  • \$\begingroup\$ What exactly does that ISP button do? (A link to the circuit diagram would be usefull!) \$\endgroup\$ Feb 3, 2014 at 8:54
  • \$\begingroup\$ Unfortunately I do not have documentation. I contacted the shop website where I bought the robot for a circuit diagram. \$\endgroup\$ Feb 3, 2014 at 11:00
  • \$\begingroup\$ You have too many unfamiliar layers of technology here where there could be a problem: linux, bluetooth, board layout/mode pins, the bootloader itself. Try temporarily eliminating some, for example bypassing the bluetooth and testing direct serial communication, then trying to get the bootloader to accept a download that way. \$\endgroup\$ Feb 3, 2014 at 16:16
  • \$\begingroup\$ I use HC06 modules with Linux using the "rfcomm bind" and /dev/rfcomm0 devices and it works fine (with python pySerial library.) I suspect something else is wrong. \$\endgroup\$
    – markrages
    Feb 3, 2014 at 17:32
  • \$\begingroup\$ @Chris Stratton: you are absolutely right. Any ideas how to bypass the bluetooth? Do I need an extra device, cable etc? My laptop does not even have a com port. For LPCXpresso I see a lot of pages discussing virtual serial ports (i.e. mbed.org/handbook/USBSerial). Do I need something similar for Linux? markages: do you use any drivers for virtual serial port? \$\endgroup\$ Feb 4, 2014 at 4:18

1 Answer 1


Assuming you have a bare chip (without user-installed bootloader) you must first activate the built-in serial bootloader, by resetting the chip while keeping both PIO0_1 and PIO0_3 low.

Next you make sure the bluetooth connection (or a hardware serial connection) is established, and use a tool on your PC that implements the bootload protocol. My favourite is LPC21ISP.

  • \$\begingroup\$ LPC21ISP looks good and is easy to install "sudo apt-get install lpc21isp". Then it becomes difficult (it asks for baudrate and Oscillator_in_kHz... "lpc21isp -bin firmware.bin /dev/rfcomm0 115200 14746". It also complains that it can not open the port. \$\endgroup\$ Feb 2, 2014 at 22:05
  • \$\begingroup\$ The frequency is not important (for an lpc1343 it is 12MHz, the internal oscillator). Can other tools open the port? You can try a terminal emulator at 115k2 and type ? \$\endgroup\$ Feb 3, 2014 at 6:39
  • \$\begingroup\$ I tried the minicom terminal emulator and found out about a permission issue with lpc21isp. There is still a sync issue (I added to my question for better formatting) \$\endgroup\$ Feb 3, 2014 at 8:26
  • \$\begingroup\$ lpc21isp does not get any response from the target chip. When you use a terminal emulator and type a few ?'s, do you get any response? If not, there is a problem with the serial (bluetooh) connection, or your target is not in bootload mode. \$\endgroup\$ Feb 3, 2014 at 8:29
  • \$\begingroup\$ minicom terminal does not accept ?'s and I can not figure out what is wrong. As you said maybe there is something wrong with the bluetooth connection or I have to push a button on the robot. I contacted the shop website where I bought the robot maybe they can help or get some info from the manufacturer. \$\endgroup\$ Feb 3, 2014 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.