Topic: Virtual Nabaztag emulation

It seems like another great learning tool would be something that would emulate a Nabaztag in software. Basically, you give it a serial number and it handshakes to the Violet servers just like a 'real' Nabaztag would do.

This is different than the API's and Proxy Servers that have been built and discussed. This is basically the idea of a Virtual Nabaztag.

How hard would this be to build as well as what are the potential benefits? Maybe it would be good for diagnostic work as well?

Roy

Re: Virtual Nabaztag emulation

Actually, I started something like that... wink

When the mp3 streaming Violet API came out a few days ago, I needed something to send lots of messages to the API and immediately grab the resulting packets thrown to the rabbit by the Violet server.
So I choosed a random MAC address (aka Rabbit serial number), registered this dummy rabbit on Violet server and started to send http calls such as a real rabbit would do.

My new rabbit appeared as 'connected' on Violet web site !

I did not go further into interpreting the data as would do a full implementation of a virtual rabbit but I can say for sure that such a concept would work (until Violet starts to filter the MAC addresses...)

Re: Virtual Nabaztag emulation

I figured it was a logical thing to build. I wouldn't be surprised if Violet had their own software Chumby they use for development.

Can I assume your Nabaztag Emulator was pure PHP as well?

Re: Virtual Nabaztag emulation

If you can call a bunch of web links inside a php page whose code is mainly 'file_get_contents' an "emulator", yes it was pure php.

Re: Virtual Nabaztag emulation

And the calls are basically to the p4.jsp URL, correct?

http://193.149.120.33/vl/p4.jsp

Re: Virtual Nabaztag emulation

Correct !

Re: Virtual Nabaztag emulation

I'd be much more interested in an emulator for the virtual machine that's inside the PIC processor. You know, the thing that executes the firmwares ("dances") that the Violet servers send to it. The rabbit isn't really useful for debugging my firmwares, so it can be a total pain to work out bugs.

Re: Virtual Nabaztag emulation

In order to do a "perfect" emulation, you would havr to base it on a software ARM (the tag/tag bunny has an ARM7 CPU) emulator. Then you would have to dismantle a real tag/tag, connect to the JTAG connector and read out the ROM code. You would also have to load the ARM firmware 0.0.0.10

I would be much more interested in a software bunny emulator that is based on tag/tag Bytecode emulation.
Sache has been immensly helpful and supplied me with his information.

I have written a little Proxy program (similar to Opennab) in C# (it's a monolithic C# program and does not need a web server).
Based on Sache's stuff, I have a bytecode disassembler - and I want to turn this into an assembler/disasembler/script-compiler/bytecode emulator. I ported sache's stuff to C#, added cross-referencing and other stuff.

The catch is: The tag/tag bytecode is still undocumented, and Sache has reverse engineerd only part of it. So we know only a useful, large subset of bytecode opcodes, but not enough.

I had a look at the ARM firmware too, but it seems I suck at ARM reverse engineering.

Re: Virtual Nabaztag emulation

alexh wrote:

I have written a little Proxy program (similar to Opennab) in C# (it's a monolithic C# program and does not need a web server).
Based on Sache's stuff, I have a bytecode disassembler - and I want to turn this into an assembler/disasembler/script-compiler/bytecode emulator. I ported sache's stuff to C#, added cross-referencing and other stuff.

The catch is: The tag/tag bytecode is still undocumented, and Sache has reverse engineerd only part of it. So we know only a useful, large subset of bytecode opcodes, but not enough.

Funny. I have made the same thing with Java smile And I have connections to CEO of violet and they promised to send SDK to me. It's still unclear what the SDK does and it has been several weeks now that they promised to give it. I'm hoping that it is something related to bytecode...

-Rallu

Re: Virtual Nabaztag emulation

Have you ever wondered why bootcode starts with "amber" and ends with "Mind"? yikes

Sache, the bunny trying to know himself better

Re: Virtual Nabaztag emulation

Three weeks ago, I had a friendly Mail exchange with BK from violet, asking about spec availability.

BK's answer was

(Quote)
For right now, we are not giving out the bytecode.  This may change in the future.  As far as a proxy goes, of course there is OpenNab (http://sourceforge.net/projects/opennab/), which I believe you already know.

Good luck with your hacks and we'll keep reading about them here in the forums.  Ask me again about the bytecode in some months, because I doubt that we will make an announcement when we are ready to give out the bytecode.
(End Quote)

I appreciate the open answer, but as you can expect, Violets "once upon a time there will be" approach is not exactly thrilling. Note as well that he says "may" and "upon request".

I think violet should release the source code for entire firmware for their gadget. Chumby (www.chumby.com) has done it, and LEGO does it with their new Mindstorm controllers.

Right now, the bunny is of limited attractivity, Violet's web based API simply sucks. Sometimes it takes 4-5 minutes just to play back a voice message, often they get lost. Toleable would be like 2 seconds delay.

Re: Virtual Nabaztag emulation

alexh wrote:

I appreciate the open answer, but as you can expect, Violets "once upon a time there will be" approach is not exactly thrilling. Note as well that he says "may" and "upon request".

I also have been in contact with violet, and the answer I have is (barely) more concrete. They will share something, but don't know exactly how much and need "some time" to sort out the details. They promised to contact me again in a pair of weeks. I'll keep you informed

alexh wrote:

I think violet should release the source code for entire firmware for their gadget.

Unless you have JTAG cable and software, playing with the firmware is really dangerous and you can "brick" the bunny very easily. So firmware is at his moment not so useful, unless you want to use it along with an ARM emulator to build a Nabaztag emulator.

#pragma joking ON
And anyway you already have firmware source. ARM assembly source I mean: real programmers use just the "0" and "1" keys roll
#pragma joking OFF

Now seriously: What I think would be most useful is to have the complete list of opcodes. With this, my work on the bc.jsp format, and a little more experimentation we could create our own bytecode assemblers, disassemblers, emulators, .... Mix this with opennab, the I2C bus, and some opensource TTS and STT packages and the possibilities are uncountable.

Sache, the bunny trying to know himself better

Re: Virtual Nabaztag emulation

sache wrote:

Now seriously: What I think would be most useful is to have the complete list of opcodes. With this, my work on the bc.jsp format, and a little more experimentation we could create our own bytecode assemblers, disassemblers, emulators, .... Mix this with opennab, the I2C bus, and some opensource TTS and STT packages and the possibilities are uncountable.

Everything is possible already with the tools we have. I think that access to correct tools we can some small things (like double click sounds and etc) better but nothing major. Well... Something like I2C would be really nice, but I want to keep my things so that all Nab's have out-of-the-box support for my software. Instead of hacking Nab itself I'm thinking adding more devices to my server software. Like adding external microphones that are hidden some where near Nabaztag.

Btw, I have currently my Nabs integrated TTS (through windows sapi5) and one prototype with STT support. And currently I'm working on to get a bit better STT integrated.

-Rallu

Re: Virtual Nabaztag emulation

Rallu wrote:

Everything is possible already with the tools we have. .... better but nothing major.

Setting rabbit to "listen" without the need to press a button, so you can use it for skype-like activities? That sounds major to me and would need bytecode modification

A "quietears" functionality bettar that my lame pluggin attempt? Major or not depending on how concerned you are about your bunny developing the ear related
problems.

Anyway, I agree that most of the developments should be done in openab, but bytecode manipulation would provide the needed "glue"

Rallu wrote:

Btw, I have currently my Nabs integrated TTS (through windows sapi5) and one prototype with STT support. And currently I'm working on to get a bit better STT integrated.

I'd love to know the details of that!!. Could you please post them in the opennab subforum? Thanks

Sache, the bunny trying to know himself better

Re: Virtual Nabaztag emulation

sache wrote:
Rallu wrote:

Btw, I have currently my Nabs integrated TTS (through windows sapi5) and one prototype with STT support. And currently I'm working on to get a bit better STT integrated.

I'd love to know the details of that!!. Could you please post them in the opennab subforum? Thanks

Well thing is that like said one post above: I'm not using opennab smile I have custom Java based server software with all the same functionality as opennab (well. almost. I still can't get choreographies work). Even though I'm PHP dev for hearth this thing I'm working is just too much for it.

For TTS I have simple custom JNI .dll that calls basic windows functions to create synthezised .wav files from strings.

And for STT we have used some commercial product that can recognize just one sentence that is "I would like to run ten kilometers" which was taken from one other project. Currently I'm trying to get my hands on advanced speaker recognizer .dll's to start working on JNI interface for it...

p.s I'm working for University of Tampere and my job description says "do something neat with nabaztag" and I belong to "Speech-based and Pervasive Interaction Group" so I have access to all these latest TTS and STT tools smile Oh and this server I'm working on will be released under some open source license as soon as I get legal things sorted out.

Re: Virtual Nabaztag emulation

FYI: there's an OpenNab branch with my name on it, and I've integrated pocketsphinx into that, works great. I've also added a choreography class which seems to work ok (not much testing done yet).

Do you have any suggestions on *good* (opensource, or not too expensive) TTS libraries which can be called from the commandline? I've tried one or two, but most sound horrible...

   - Herman

Re: Virtual Nabaztag emulation

ozuzo wrote:

Do you have any suggestions on *good* (opensource, or not too expensive) TTS libraries which can be called from the commandline? I've tried one or two, but most sound horrible...

Sorry, don't know any. On windows side you could write small program that could use windows SAPI5. It is really simple. Just several function calls and thats it.

Re: Virtual Nabaztag emulation

Ah ok. But with a Linux server over here that's not really an option :-( Shall need to continue looking then...

19

Re: Virtual Nabaztag emulation

ozuzo wrote:

Ah ok. But with a Linux server over here that's not really an option :-( Shall need to continue looking then...

Cepstral voices aren't bad. I think they're about $30.00 each and there's Linux versions.

http://www.cepstral.com

Re: Virtual Nabaztag emulation

Didn't know that, thanks. Had a look and tried all of them with the same sentence. It might be me, but they aren't that good :-) Milly and Emily sounded ok, but I always thought I had a boy rabbit and a girl rabbit :-(

Re: Virtual Nabaztag emulation

You can adjust pitch and speed of all voices and create boy voice from older man's voice.

Re: Virtual Nabaztag emulation

I saw, but didn't think it improved the voices a lot :-(
The Acapela voices sounded very nice, but they don't seem to have a Linux version...