Accessing the RS Media's serial console
This How-To is still a work in progress, and not intended to be actually used at this point in time.
So you want to access the serial console on the RS Media? This How-To will tell you how. It covers three different methods you could use to access the RS Media's serial console, as well as some things to try, and not to try, if you do access the serial console.
[center][color=red]WARNING!WARNING!WARNING!WARNING!WARNING!WARNING!WARNING!WARNING![/color]
Following the steps outlined in this How-To will most certainly violate the
terms and conditions of your warranty. You could break your RS Media by
doing any of the things mentioned in the How-To. Assuming you manage to
access the serial console without damaging your RS Media, it is still
possible to damage the RS Media by doing the wrong things with the serial
console.
If you chose to follow this How-To, I will not be held responsible for the
consequences. You have been warned.
[color=red]WARNING!WARNING!WARNING!WARNING!WARNING!WARNING!WARNING!WARNING![/color][/center]
Now assuming you have read the above disclaimer, lets move onto the [url=?page=0%2C1]Basic Introduction[/url]
Basic Introduction
Accessing the RS Media's serial console will give your [url=http://en.wikipedia.org/wiki/Root_access]root[/url] access to the RS Media, allowing you to run programs, access files and command the RS Media to move. You can do anything that can be done from within a macro, call bodycons etc etc.
Generally speaking though, without a fair chunck of linux experience, most people will not find this particularly useful. But for anyone who wants to do this anyway, here are some basic commands you will need to get started.
ls
cat
more
vi
Now its time to cover [url=?page=0%2C2]Opening the RS Media[/url]
Opening the RS Media
To access the serial port you first have to open up the RS Media's chest, to do that you need to remove the 8 screws shown in the picture below.
Opening the Chest: Remove these screws to remove the chest panel.
Once the screws are removed, you should be able to gently separate the chest panel from the RS Media, you will need to be unplug the ribbon cable going to the LCD in the chest shown in the image below. The ribon cable runs along left side of his neck when viewed from behind, on the right is a second cable going to his microphone that will also need to be disconnected.
Opening the Chest: Be careful of this cable when separating the chest shells.
Disconnecting the microphone is much easier, you will find the cable can be disconnected at the join in his left shoulder. Disconnecting the ribbon cable is slightly more complicated, you will either have to disconnect it from the Media Board, of from the LCD. When disconnecting the ribbon cable, you will notice that the socket is made of white plastic with a brown plastic part at the front. Gently pry the brown plastic part away from the white plastic section a few millimeters, by prying it with a small screwdriver on either side, this will release the ribbon cable.
Next you will need to remove the rear panel, to do this you will need to remove the 6 screws shown in the picture bellow.
Opening the Chest: Remove these screws to remove the rear panel.
Once these screws are removed, gently separate the rear panel from the RS Media. You will have to unplug the two ribbon cables that come out of the neck, I suggest you mark them before you do, otherwise you may have trouble determining which one is which. You will also have to unplug several cables from the RS Media, and one from the power button in the rear shell, fortunately these are all socketed, and different sizes, so reassembly should be simple. You may wish to take note of where the plugs come from to save searching later.
With the rear panel removed, the arms have a tendency to fall off, if you plan on opening him up you might want to look into performing the Arm Mod (covered elsewhere) to keep them from coming off.
Once the panel is removed, you will need to remove the Media Board from the rear shell by removing the two screws shown in the image bellow. Once the screws are removed, the board should just slide out. You will have to open his side panels first.
Removing the Media Board: Remove these two screws to slide out the Media Board.
This is the Media Board, the pads shown below are the ones we will be working with.
Media Board: This shows the pinout for the RS Media serial console.
The 3.3V wire will only be required if you are not powering things seperately. There are some disadvantages to not powering a Bluetooth module separately, but they are covered in the relevant sections.
So now its time to cover the different methods of accessing the serial console, select the one you plan to use.
[url=?page=0%2C3]Sena Promi-ESD01 Bluetooth Serial Module[/url]
[url=?page=0%2C4]BlueSMiRF Bluetooth Modem[/url]
[url=?page=0%2C5]3.3V - RS232 Converter[/url]
Sena Promi-ESD01 Bluetooth Serial Module
SENA Promi-ESD01: Serial Bluetooth Module
The Sena Module is the hardest way to go. It requires external power, as the current draw causes unpredictable faults in the RS Media when powered directly from it. Configuring the Module requires a 3.3V to Serial converter, because unline the BlueSMiRF, the module can only be configured from the module side of the connection.
So first up we are going to need to power the module, you can build the schematic shown below (which includes a status LED), or buy one of [url=http://www.sparkfun.com]Spark Fun's[/url] [url=http://www.sparkfun.com/commerce/product_info.php?products_id=449]power module[/url] or [url=http://www.sparkfun.com/commerce/product_info.php?products_id=133]power kit[/url]. At the end of the day, any power supply that produces 3.3V from 9V and has a power switch will work.
Not shown in my schematic is the inline resistor for the Status LED, you need a 68ohm (or close) resistor in series with the LED (assuming a 2V LED, with a 20ma current draw).
Bluetooth Power: This is the schematic for the carrier board for the bluetooth module. Basically all it does is supply 3.3v power.
Next you need to hook the Sena module up to the 3.3v to RS232 converter. Connecting the RX to TX, TX to RX and GND to GND. In theory it might be possible to get the RS Media to perform this step itself, but that would require several steps that I have yet to get the RS Media to reproduce.
Hook the converter up to your PC and fire up HyperTerminal and give the new connection a name. I called mine RS Media. For non-windows users, any terminal program will work, just set it to 9600baud, , 8 data bits, no flow control, no parity and 1 stop bit.
Windows Setup: Creating a new connection in HyperTerminal to talk to the Bluetooth Module.
Select the COM port to use for the connection, at the moment this is port the serial converter is connected to (most likely COM1), later we will make it the Bluetooth serial port.
Windows Setup: Setting the COM Port to use to connect to the Bluetooth Module.
Configure HyperTerminal to talk to the Sena Module in its unconfigured state. Set the Bits per second to 9600, Data bits to 8, Parity to None, Stop bits to 1 and Flow control to None, and click "OK".
Windows Setup: Configuring HyperTerminal to connect to the Sena Bluetooth Module for configuration.
In the bottom left corner of the window, the status should change from "Disconnected" to "Connected". Turn on the power for the Sena Module, you should see "OK" appear in the window. If you see nothing, or only garbage characters, check both the Sena Module and 3.3V to RS232 converter are powered, and that the RX and TX lines are connected correctly.
For the module to work we must configure it to run at 115200 baud, set the mode, key, security mode, name and a few other settings. You can cut an paste the below AT commands into HyperTerminal, though I would suggest you first change the key from ****** to something else.
AT+UARTCONFIG,115200,N,1
AT+BTMODE,3
AT+BTKEY="******"
AT+BTSEC,1,0
AT+BTNAME="RS Media - Bluetooth"
ATS1=1
ATS3=0
ATS4=0
ATS10=0
ATS11=0
After pasting the above text into HyperTerminal, you will see several "OK"'s and one or two "ERROR"'s near the end. Turn the Sena Module off. Disconnect from serial port as shown in the image below, but do not exist HyperTerminal.
Windows Setup: Disconnecting from the serial port so it can be reconfigured.
Enter the properties for the connection, so that we can configure it to talk to the now configured Sena module.
Windows Setup: Reconfiguring the connection in HyperTerminal to talk to the reconfigured Bluetooth Module.
Click the "Configure" button to enter the port configuration settings.
Windows Setup: Changing the COM Port settings for the Sena BlueTooth module.
Change the Bits per second to 115200, and click "OK".
Windows Setup: Configuring HyperTerminal to talk to the Bluetooth module.
Now, turn the Sena Module back on, and right click on the Bluetooth icon in the task bar, and search for a the Sena Module as shown in the image below.
Windows Setup: Adding the Bluetooth Serial Module.
Double click on the "RS Media - Bluetooth" item to connect to it.
Windows Setup: Discovering the Sena Bluetooth Module.
When it connects you should see a window like the one shown in the image below, and the Status LED will light up (if you are using a similar schematic to me). Take note of the COM port number, you will need it later (COM7 in this case). Click "OK" to continue
Windows Setup: Connected to the BlueTooth Module.
Fire up a new HypterTerminal session using the connection created previously, you will get the error message shown below. Click "OK" to continue.
Windows Setup: When opening a second HyperTerminal session, HyperTerminal will complain.
Open up the properties fo the connection so that we can change it to talk to the Sena Module over Bluetooth.
Windows Setup: Reconfiguring the connection in HyperTerminal to talk to the reconfigured Bluetooth Module.
Change the COM port to one from the connection message above and click "Configure".
Windows Setup: Changing the COM Port settings for the Sena BlueTooth module.
Set the Bits per second to 115200, Data bits to 8, Parity to None, Stop bits to 1 and Flow control to None, and click "OK" and the "OK" again.
Windows Setup: Configuring HyperTerminal to talk to the Bluetooth module.
Now check that both HyperTerminal sessions are "Connected", check that both the Sena module and the 3.3V to RS232 converter are powered, and finally check that the Bluetooth connection is still active (the Bluetooth connection will automatically disconnect after a certain amount of time inactive). When everything is on, configured correctly and connected, something you type in one HyperTerminal session will appear in the other.
Essentially, we are connecting the TX and RX pins to the RX and TX pins on the converter. Connect the wires up as follows.
Media Board: This shows the pinout for the RS Media serial console.
| RS Media | RS232 Converter | |
| GND (pin 6) | - | GND |
| TX (pin 3) | - | RX-I |
| RX (pin 2) | - | TX-O |
| 3.3V (ping 1) | - | VCC |
You will need to connect it up to power, the image below shows where to connect your wires. Be aware that your power supply will need a power switch, as it will be connected before the RS Media's power switch.
Power Board: This is where to hook up to the Power Board to draw +9V, be aware though, that this power is always on. So you will need a switch of some sort to prevent your batteries from going flat when not in use.
The power board is in the rear shell, the same piece that contains the Media Board. When you remove it, be careful not to lose the small plastic piece that is the external portion of the switch.
Thats it. Connection complete. Put everything back together, and move on to the next section [url=?page=0%2C6]Things to do, and NOT to do[/url].
BlueSMiRF
BlueSMiRF: The BlueSMiRF Bluetooth modem.
[url=http://www.sparkfun.com]Spark Fun's[/url] [url=http://www.sparkfun.com/commerce/product_info.php?products_id=582]BlueSMiRF [/url] is much easier to configure than the Sena module. However, the range is less, and it doesn't have a status LED. On the upside, the power requirements for the BlueSMiRF are less than for the Sena module. So you might be able to get away with powering the BlueSMiRF directly from the RS Media, you may experience problems when the brain batteries run low though.
If you decide to power the module seperately, you will either need to buy a module ([url=http://www.sparkfun.com/]Spark Fun[/url] has a [url=http://www.sparkfun.com/commerce/product_info.php?products_id=114]kit[/url] that should do the job) or build a power board using the schematic shown below.
BlueSMiRF Power: This is the schematic for the carrier board for the BlueSMiRF module. Basically all it does is supply 3.3v power.
Once you have your power supply, you will need to connect it up, the image below shows where to connect your wires. Be aware that your power supply will need a power switch, as it will be connected before the RS Media's power switch.
Power Board: This is where to hook up to the Power Board to draw +9V, be aware though, that this power is always on. So you will need a switch of some sort to prevent your batteries from going flat when not in use.
The power board is in the rear shell, the same piece that contains the Media Board. When you remove it, be careful not to lose the small plastic piece that is the external portion of the switch.
Once you have your power sorted, you will need to connect it to the media board as follows. I have provided details for using either the schematic above or the [url=http://www.sparkfun.com]Spark Fun[/url] [url=http://www.sparkfun.com/commerce/product_info.php?products_id=114]power module[/url]. Essentially, we are connecting the TX and RX pins to the RX and TX pins on the converter. Connect the wires up as follows.
Media Board: This shows the pinout for the RS Media serial console.
| My Schematic | Spark Funs Power Module | |||||
| Carrier Board | RS Media | BlueSMiRF | RS Media | |||
| GND (pin 3) | - | GND (pin 6) | - | CTS-I (connect to RTS-O) | ||
| TX (pin 2) | - | TX (pin 3) | - | PWR | ||
| RX (pin 1) | - | RX (pin 2) | GND (pin 6) | - | GND | |
| RX (pin 2) | - | TX-O | ||||
| TX (pin 3) | - | RX-I | ||||
| - | RTS-O (connect to CTS-I) | |||||
With the Spark Fun power module (or any other one), you will also need to connect the power modules 3.3V and GND to the BlueSMiRF's PWR and GND.
Before you solder anything though, you need to figure out how to best route the wiring inside the RS Media, where to put the BlueSMiRF, where to mount the switch etc. I would recommend that you install a plugs of some type so you can disconnect the module if needed.
Bluetooth Power: This is the schematic for the carrier board for the bluetooth module. Basically all it does is supply 3.3v power.
Windows Setup: Creating a new connection in HyperTerminal to talk to the Bluetooth Module.
Windows Setup: Setting the COM Port to use to connect to the Bluetooth Module.
Windows Setup: Adding the Bluetooth Serial Module.
Windows Setup: Discovering the Sena Bluetooth Module.
Windows Setup: Connected to the BlueTooth Module.
Thats it. Connection complete. Put everything back together, and move on to the next section [url=?page=0%2C6]Things to do, and NOT to do[/url].
3.3V - RS232 converters
RS232 Shifter: Spark Fun's RS232 voltage shifter
Any RS232 converter will work, but the [url=http://www.sparkfun.com/commerce/product_info.php?products_id=449]Spark Fun module[/url] shown above is cheap and easy to use. They also make a [url=http://www.sparkfun.com/commerce/product_info.php?products_id=133]kit module[/url] that should work just as well. If you feel the creative urge, you could make your own RS232 level shifter, a quick google search should reveal a wealth of pages on the subject. Just make sure the converter works at 3.3v and 115200 baud.
The [url=http://www.sparkfun.com]Spark Fun[/url] modules power requirements are minimal, so there should be no problem powering one directly off the RS Media. Connecting the RS Media to one of the modules is very simple, you will need a cable, several meters in length, with at least 4 wires. Essentially, we are connecting the TX and RX pins to the RX and TX pins on the converter. Connect the wires up as follows.
Media Board: This shows the pinout for the RS Media serial console.
| RS Media | RS232 Converter | |
| GND (pin 6) | - | GND |
| TX (pin 3) | - | RX-I |
| RX (pin 2) | - | TX-O |
| 3.3V (ping 1) | - | VCC |
Before you solder anything though, you need to figure out how to route the cable out of the RS Media, there are one or two panels that can be removed that would work, or you can do something more perminent, its up to you. I would recommend that you install a plug of some type so you can disconnect the cable when not in use.
Once you have soldered everything up, put the RS Media back together (I use sticky tape to hold the shells together rather than screwing everything back together, until I'm certain everything is working), and plug it in to your computers serial port.
Windows Setup: Creating a new connection in HyperTerminal to talk to the RS Media.
Fire up HyperTerminal and create a new connection. If you are not using Windows, any terminal program will do, just set it to use 115200 baud, 8 data bits, no flow control, no parity and 1 stop bit. Give your new connection a name, I called mine "RS Media", and click "OK".
Windows Setup: Setting the COM Port to use to connect to the RS Media.
Select the COM Port that you have connected the RS Media to (most likely this will be COM1) and click "OK".
Windows Setup: Configuring HyperTerminal to connect to the RS Media.
Set the Bits per second to 115200, Data bits to 8, Parity to None, Stop bits to 1 and Flow control to None, and click "OK".
In the bottom left corner of the HyperTerminal window, the status should change from "Disconnected" to "Connected". Everything is set, so turn your RS Media on. Give it a few seconds and you should see the startup details for the RS Media. If you don't see anything, double check that the RS232 - 3.3V Module is powered and the RX and TX lines are the right way round. If you see a lot of garbage, check that COM Port settings are correct, and the RX and TX line are the right way round.
Thats it. Connection complete. Put everything back together, plug it into you computer, and move on to the next section [url=?page=0%2C6]Things to do, and NOT to do[/url].
What's not to do?
hi Nocturnal, I'm going to cobble up an RS232 level shifter and hook into my RSM serial console. But I'm not convinced that the disassembly really has to go so far- just getting that neck plate out of the way after taking front and back torso shells off, has opened up the pads for the serial console. (though I suppose soldering in there with everything connected is asking for trouble of the electrostatic discharge sort!)
[[http://benybee.wordpress.com/2008/01/13/serial-level-converter-rs232-2-ttl-converter/|Here's]] what I'm going to try (MAX232, though I've heard it may be unreliable when run at 3.3V)
Hi Milw,
Hi Milw,
The MAX232 is not rated for 3.3V operation. It didn't work for me when I tried mine, I doubt it will work for you. Maxim produces a whole range of RS232 level shifters, you can see a table here. Pick one the does 3.3v and save yourself some hassle. I suggest using a MAX3232.
If its any reassurance, since my work on creating my own bootloader for the RS Media, the list of things (ie the Things Not To Do) that might damage your RS Media has dropped significantly.
You could solder the leads on without further dismantling, but its a tight confined space, not somewhere I would want to be sticking my fingers along with a hot soldering iron.
This instead...
Thanks for the advice Nocturnal; I just realized I've got the very thing here, hooked up to my Propellor board- the [[http://www.parallax.com/Store/Microcontrollers/PropellerTools/tabid/143/List/1/ProductID/398/Default.aspx?SortField=ProductName%2cProductName|Prop Clip USB to Serial 3.3V adapter]]! It's a 4 pin interface, Tx, Rx, VSS and /RES - I need to read the docs about the /RES function. This is the [[http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/32200-32201-PropClipPlug-v1.3.pdf|documentation]]. It's based on the [[http://www.ftdichip.com/Documents/DataSheets/DS_FT232R.pdf|FTDI 232R USB to Serial UART]].
ps for creating pages here, is there a 'sandbox' area I can play in? Or would you prefer only comments?
That would be perfect :) The
That would be perfect :)
The /RES is meant to be tied to the /RESET line of the circuit its connected to, so that the circuit can be reset using the DTR signal.
Success
I feel like Anakin! its working!
my first ls (bashful)
# ls
bin dev j2me meri_jam pw tmp
buffer etc lib mnt root usr
config home lnk proc sbin var
default icons meri_config programs testscript
#
Troubleshooting Bluesmirf connection..
Got my bluesmirf today, it seems it is a newer version with LEDS for status (flashes green when waiting for connection, other LED goes red when connected)
Anyway, I have sucessfully set up the bluesmirf talking to the bluetooth USB dongle and I can issue AT commands etc and get a response back. It is set up at 115200 8N1 and I am using the Bluesoleil bluetooth stack.
I am powering the bluesmirf directly from the 3.3v output on the RS Media and this doesn't seem to be causing any problems, however I cannot get any response in Hyperterminal from the RS Media itself.
I have tried connecting with just the RX > TX and TX > RX and also with the CTS/RTS jumpered together, but not a peep from the RS Media.
Any tips to get this working? The bluetooth seems to be functioning properly, just maybe a wiring problem or wrong settings in Windows.
Cheers, Ben
Update... got it working!
I went back to the Bluesmirf website and noticed there was an updated PDF datasheet for this newer revision of the module (rev2). I had to manually set the baud rate to 115200, no parity, 1 stop bit by writing "ATSW20,472,0,0,1" to the module.
Suddenly I started receiving data back from the RS Media... so looks like problem solved!