Linux – lpc1343 upload firmware via UART bluetooth module from linux

bluetoothfirmwarelinuxlpc

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

uXBot

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

Best Answer

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.

Related Topic