LifePlus - extensions to the Life software (AiboLife 1, AiboLife 2, Explorer, Recognition Plus)
Both LifePlus and RCodePlus support getting the camera photo from AIBO via the wireless LAN.
LifePlus has additional LAN card extensions including getting voice command data, mood data and semantic input data. LifePlus does not have any RCODE language extensions.
RCodePlus has RCODE language extensions that will do new things like voice recognition. See the RCodePlus page for more details.
Supported commands
| Feature |
command code |
Supported in RCodePlus (2.52) |
Supported in LifePlus (2.52) |
| Version Check |
TELEMREQ_GETVER |
Yes |
Yes |
| Get camera data (jpeg) |
TELEMREQ_GETJPEG |
Yes |
Yes |
| Get camera data (faster) |
TELEMREQ_GETYUV10 |
Yes |
Yes |
| Get color detection data |
TELEMREQ_GETCOLORIMAGE |
Yes |
Yes |
| Record audio |
TELEMOP_FLUSHAUDIO, TELEMREQ_GETAUDIO |
Yes |
Yes |
| Device control |
TELEMOP_SETPROPERTY |
Yes |
Yes |
| Voice top 10 matches |
TELEMREQ_GETVOICEDATA |
No |
Yes |
| Semantic input events |
TELEMREQ_GETSEMANTICEVENT |
No |
Yes |
| Upload file to RAM |
TELEMOP_RPUT |
Yes |
No |
| RCODE interpreter extensions |
AP_* |
Yes |
No |
LAN Protocol ("RCOMM" extensions)
This section discusses the extensions to the LAN card protocols.
These are done outside the RCODE interpreter and therefore will work with either "LifePlus" or "RCodePlus".
In earlier versions (RCodePlus 1.91 and earlier), the RCODE port (21002) was used to transfer data.
In this version, a separate TCP/IP connection (AKA "pipe" AKA "socket") is used to request and received binary telemetry data.
You open up port number 21001 on your AIBO to send telemetry requests.
If you use a Berkeley-like socket package (like WinSock) you can open up a connection-oriented byte stream (SOCK_STREAM).
Telemetry requests start with a single byte determining the request or operation.
The symbols start with "TELEMREQ_" for requests that return data, and "TELEMOP_" for operations that do something else. See the "telem.h" header in the C++ samples for more detail.
Protocol Extensions overview
When 32-bit value data is transmitted, it is transmitted in "intel" format.
With the exception of the TELEMREQ_VERSION request, all other data replies are in a standard binary reply format.
When asking AIBO for data, it will first reply with 4 bytes.
These 4 bytes make a 32-bit size value.
If there is no data available, this size will be zero.
If there is data available, this size will be the number of data bytes to follow.
Data packets larger that 32000 bytes are not supported.
"TELEMREQ_VERSION"
Return extension version info:
format:
struct TELEMVER
{
char name[8]; // "AiboPet\0"
unsigned char bMaj, bMin; // version 2, 50
unsigned char bType; // see TELEMVERTYPE
unsigned char bFiller;
};
You should check the version number (currently 2.51) and the capability flags before sending other commands to AIBO.
"TELEMREQ_GETJPEG"
Get JPG image.
Returns standard binary reply format.
If no data is available a count of zero is returned.
If data is available, a JFIF (.JPG) file is transmitted.
The 4 byte size prefix is the number of valid bytes of JFIF data to follow (there is no rounding).
The first time this is called, it will return a zero size, and will start the snapshot process. Subsequent calls will continue to auto-snapshot.
"TELEMREQ_GETYUV10"
Recommended over JPEG for faster image download (about 10 fps, compared to JPEG 5 fps).
Get image using 10 bits per pixel (5 bits for one Y sample each pixel, and 5 bits for the V and U values each other pixel).
Returns standard binary reply format.
If no data is available a count of zero is returned.
If data is available, the size is exactly 31680.
The first time this is called, it will return a zero size, and will start the snapshot process. Subsequent calls will continue to auto-snapshot.
See samples for how the format is decoded and turned into 24 color bitmaps.
NOTE: Version 2.51 and later
"TELEMREQ_GETCOLORIMAGE"
Get color image. Returns standard binary reply format.
If data is available it is exactly 6336 (88*72*1) bytes.
Each byte contains 8 bits, one bit for each color range.
This performs auto-snapshot just like TELEMREQ_GETJPEG.
"TELEMREQ_GETSEMANTIC"
LifePlus only
Get one or more semantic info records.
Returns standard binary reply format.
If data is available it is in multiples of 44 bytes
Each 44 byte record is in the format:
LONG - sequence number
LONG[10] - raw semantic data
"TELEMREQ_GETVOICEDATA"
LifePlus only
Get latest voice dictionary data record.
Returns standard binary reply format.
If data is available it is exactly 80 bytes.
Each 80 byte record is in the format of 10 records of 8 bytes each:
LONG voice dictionary id
LONG confidence
The order is the top ten matches from best to worst.
"TELEMREQ_FLUSHAUDIO", "TELEMREQ_GETAUDIO" - Getting audio from AIBO
AIBO records audio in stereo from both of his ear microphones at the same time.
The data format is 16kHz, 16bit, stereo.
To get the audio stream from AIBO, you need to perform "TELEMREQ_GETAUDIO" requests to get chunks of data. Each chunk of audio data is 2048 bytes in size (512 samples representing 32ms of audio data).
You must request audio at a fast enough rate not to lose data. AIBO will keep a circular buffer of 15 chunks (about 1/2 second).
If full older records are kept.
Non-empty reply packets include a sequence number you can check to see if data has been lost.
"TELEMREQ_GETAUDIO" returns the oldest audio chunks in the buffer.
Returns standard binary reply format.
If data is available it is multiple of 2056 (4+4+512*4) bytes.
The current implementation returns at least 2 and at most 10 (MAX_AUDIO_BUFF) buffers.
format: (see the AUDIO_BUFF structure in 'telem.h')
LONG - sequence number (increments for each chunk)
WORD - sensor value AP_SensorData0
WORD - sensor value AP_SensorData1
WORD[512*2] - PCM audio samples (right channel first)
Before starting the TELEMREQ_GETAUDIO loop, you should send "TELEMOP_FLUSHAUDIO" which will reset the circular buffer.
The special sensor values provide an efficient way to pass 32 bits of data from a running RCODE program on AIBO to your PC while recording.
See the AiboCap\aibomic.cpp sample for more details.
"TELEMOP_SETPROPERTY" - Device control
This allows you access to the device control features normally found in the RCodePlus feature "AP_DEVCTL", but accessible for Life sticks as well.
The byte command is followed by two data bytes, of the property index and the property value. See AP_DEVCTL for more details on the index and values supported.
"TELEMOP_RPUT" - Upload a file to RAM on AIBO
"TELEMOP_RPUT" will upload a single file to RAM to be used with performance playback.
See the "aiboplayr" sample for more details on the "TELEMOP_RPUT" protocol.
WARNING: the RCodePlus 2.51 RPUT is flakey in some cases. Version 2.50 is more stable for now.