Connecting a Bluetooth module to the CPC Booster+

 

I really love Antitecs [[CPC Booster|CPC Booster+]] and I also think, that this small hardware enhancement for the CPC is a pretty underestimated device, because it contains a still state of the art Atmel microcontroller and above all: it is a serial interface. Ok, normally you would say something like “Serial interface, nobody uses that anymore”, but then you are wrong. If you are working with microcontrollers, you will find many modules which can adapt modern technologies to an UART (Universal Asynchronous Receiver Transmitter).

When I talked to a colleague about his hardware project, he told me that Bluetooth defines a SPP mode (Serial Port Profile) and that you can use Bluetooth simply with an serial interface of your microcontroller. If such a module is connected to another device, it is completly transparent, which means, that it just behaves like a normal serial connection.

After thinking about it I decided to buy a such module and hook it up to the CPC Booster+ and found a seller in Hong Kong (“digital-account”, but there are many sellers who sell that kind of Bluetooth modules), who offers Bluetooth modules for around 10 EUR including postage and packaging.

The connection to the Booster is really simple, but there are two variants on how you can connect it to the CPC Booster.

Variant 1 (removing the SN75176):

This variant is the prefered one for connecting a Bluetooth module to the CPC Booster, because you won’t loose the possibility to use the RS232 port. However, you will loose the RS485 network connection. It was suggested by Antitec, the creator of the CPC Booster, in the comments below.
To connect the Bluetooth module to the CPC Booster, you have to remove (!!!) the SN75176 IC, which you can find under the RJ45 port on the CPC Booster. On the image below, you can see how to connect the cables:

 

Variant 2 (removing the MAX232):

This variation was published first on this page. It has the disadvantage that you will loose the RS232 functionality, so I would prefer variant 1 instead now.
You just have to remove(!!!) the MAX232 chip on the Booster, which is needed to do the voltage level shifting for RS232. When you removed it, you just connect the Bluetooth module directly to the empty IC socket (I used another IC socket on which I directly soldered the cables). On this image, you can see how to connect the cables:

Amstrad CPC: Connecting a Bluetooth module to the CPC Booster+

When you switch on your CPC with the CPC Booster+ connected to it, you will see a blinking red LED, which shows that the module is working and if you search for new Bluetooth devices, you should find a new one.
To use the Bluetooth module transparently with the tools, which already exist (e.g. the cool Arkos tools), you have to set the module to 115.200bps, 8N1. I wrote a small BASIC program, to do that for you. It tries to autodetect the current serial interface speed, sets the correct transfer parameters and you can also define a new Bluetooth device name, which is shown by the module, when you search for it. If you use this program, be sure that the Bluetooth module is not connected to another device (red LED should be blinking).

100 'Automatische Bitratenerkennung eines Bluetooth Moduls
110 '(c)2011 Octoate
115 MODE 2
120 IF INP(&FF00)<>170 AND INP(&FF01)<>85 THEN PRINT"CPC Booster not detected."
125 PRINT"Trying to detect Bluetooth module bitrate."
130 'setup: 8n1, buffer
140 OUT &FF07,&6:OUT &FF0B,&16
150 FOR i=1 TO 8
154   OUT &FF1C,0:'reset buffer
155   READ value:READ bps:OUT &FF04,value
160   OUT &FF08,&41:OUT &FF08,&54:'send AT
170   FOR j=1 TO 2000:NEXT j:'just wait a bit
180   IF INP(&FF1C)=2 AND INP(&FF1D)=&4F AND INP(&FF1D)=&4B THEN 210
185   PRINT bps;:PRINT"bps...failed."
190 NEXT i
200 PRINT"Couldn't detect bps rate.":END
210 PRINT bps;:PRINT"bps detected."
220 PRINT "Select Bluetooth device name:";:INPUT a$
230 IF LEN(a$)=0 THEN 220
240 'send new name
250 send$="AT+NAME"+a$
260 length=LEN(send$):FOR i=1 TO length:OUT &FF08,ASC(MID$(send$,i,1)):NEXT i
266 response$="OKsetname":errmsg$="Set name failed.":GOSUB 500
270 send$="AT+BAUD8"
280 length=LEN(send$):FOR i=1 TO length:OUT &FF08,ASC(MID$(send$,i,1)):NEXT i
300 response$="OK115200":errmsg$="Baudrate configuration failed.":GOSUB 500
340 PRINT"Bluetooth device configuration successfull."
499 END
500 'check response
510 length=LEN(response$)
520 c=0:WHILE c<2000 AND INP(&FF1C)<length:c=c+1:WEND
530 IF INP(&FF1C)<>length THEN PRINT errmsg$:END
540 FOR i=1 TO length:IF CHR$(INP(&FF1D))<>MID$(response$,i,1) THEN PRINT errmsg$:END ELSE NEXT i
550 RETURN
1000 DATA 143,4800,71,9600,47,14400,35,19200,23,28800,17,38400,11,57600,5,115200


That’s all. You can now connect e.g. your PC with the CPC Booster (pair the Bluetooth device first) and use the serial device which gets available when you paired the devices correctly. By the way, if the seller of your Bluetooth module didn’t tell you the pairing password, you can try “0000” or “1234”. Mostly they use them as a default password.

The Bluetooth module is controlled via simple AT commands (you can see that in the source code above). In my case, the Bluetooth module contains the “linvor” firmware, which offers AT, AT+BAUD,  AT+VERSION, AT+NAME and AT+PIN. You can read more about those commands in a great Blog entry by Byron76.

  13 Responses to “Connecting a Bluetooth module to the CPC Booster+”

  1. You don’t have to remove the max232! You can get the TTL signals from the SN75176 / 485 chip. Remove the chip and use the pins RX & TX.

  2. Hi Antitec,
    thanks for your comment. Great to see that you are still around :-)!
    Ok, that’s a better solution. Then you can switch between RS232 and the Bluetooth mobule. I guess I will update the description if I have time…

  3. Great idea !
    Just ordered the same module to test this.Do you have an idea how to configure AFT on PC to use bluetooth instead of COM ?
    (oh yes , please update description asap , please =) )

  4. Hi Fano,
    thanks for your reply. I updated the description on how to connect the Bluetooth module, so you can now use “Variant 1” to connect the Bluetooth module to your CPC Booster. You won’t loose the RS232 port and you can switch between the Bluetooth and the RS232 functionality via the switch on the CPC Booster.

  5. Hi Octoate, I tried your cool idea connecting the CPC via Bluetooth. But your BASIC program is not able to detect the bps rate? I build up the second variant: removing the MAXIM IC and connecting every pin as you described. The bluetooth on the CPC Booster in blinking red and will be detected by the PC. At least the 5V is working. Do you have an idea what did I do wrong?

  6. Ok, I finally managed it. I used Variant 1 instead of 2. Then it works fine.
    I have a CPC with a HXC Emu as Floppy “A”. Transferring datas won’t work. Only with a original CPC transferring works!
    Great idea. Thanks for working it out!

  7. …of course… Variant 2 didn’t work because I forgot to switch the booster to RS232 instad keeping RS485. Damn… 🙂

  8. Sorry for late answer. Well, ok. That was a simple solution :). I am glad that it now works fine. Great :).

  9. Well , i think the next step is to have an USB serial module on RS232 and BT module on RS485.Btw i translated your program in ASM (for HC06) and made a little console for other firmware (HC05) that accepts AT commands, i’ll release theses soon 😉

  10. Hi fano, thanks for your comment. Sounds like a good idea to me. Just connecting a cheap FTDI cable to the Booster for simple PC connection. On the other hand… you can do this with the Bluetooth module, too :-). Please keep me informed about your software. Another idea, which I had when playing around with the Booster, is an upgraded firmware, which allows to connect a SD card to the I/O ports. So the ATMega could do the FAT32 work and the CPC can focus on writing and reading files. Maybe in another life, where I have too much time… ;-).

  11. It is a part of a complete devkit that handles CPCbooster too so that will still take a bit of time 😉
    I just received a PL2303 today and communication works perfectly between PC and CPC, sadly i wasn’t able to finish modding my cpcbooster as my soldering iron is kaputt =(

    About SD cards in serial , i noticed a serial module that contains its own firmware and you have to send commands like AT ones to get or write file, get directory and so on… Amazing but sadly that was expensive (something like 40€) and seems discontinued.

    To finish , that’s a shame CPCbooster design have stripped down ATmega SPI capabilities =(

  12. A PL2303… I guess I have one laying around here, too :-).
    I don’t think a UART-SD card adapter would be necessary to connect a SD card with the Booster. My idea is to directly connect a SD card to the non used I/O pins of the Booster, add software SPI to the Boosters firmware and also the handling of the FAT filesystem (e.g. with FAT FS). Of course this means, that the firmware needs to be redesigned and maybe also rewritten in C.
    The hardware SPI of the Booster is connected to the data bus, so it can’t be used, but software SPI should be ok for connecting a SD card. You can also find cheap breakout boards by searching “SD card Arduino” on eBay, which also contain a level shifter. This could also be a nice project for the printer port :).

  13. A bit of news about this, i just success to connect a HC06 (slave) and HC05 (in master mode), i am now waiting for my new Minibooster (improved CPCbooster+ clone with SPI support) to connect 2 CPC (and why not PCWCPC in the future) via bluetooth =)
    Next step will be to write a bluetooth lib to allow this automaticaly =)

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close