USB Time Sync for RSM Alarm Clock

23 posts / 0 new
Last post
FreddyA
FreddyA's picture
USB Time Sync for RSM Alarm Clock

Hello everyone, I'd like to give all heads up on a new way to set your time on the RSM Alarm Clock by Helibot. This has been one of my top of the wish list for a while and thanks to Jamie it is now possible! I've successfully updated my pc time and date to the RSM! no need to got through the menus scroll all, although I am very thankful for Helibot that we could even do that. Jamie requested "DO mention that the user Vader did some of the sync!" so thanks Vader, you and Jamie are talented. So hope to see the new RSM Time Sync available in the downloads soon with alarm scheduling and more!

Thanks again guys keep at it!

Shai Alyt NEMO
Shai Alyt NEMO's picture

It would be great and (if can be automated) will make RSM alarm-clock not only a lboratory experiment but a really useful application!

I'am also eager to see this feature in "downloads" or at least a HOWTO make it?

Vader
Vader's picture

Actually, I posted this app some days ago and it's now available for download...It would be even better if it could launch itself as soon as you plug in the RSMedia and load Helibot's drivers...maybe he could work on a solution with me...

Helibot
Helibot's picture

Hi Vader and Freddy,
Good idea guys!!. I think it would be great to automate this further.

But firstly , the program does not seem to work for me? It runs and I see a few windows flash up then quickly close, it says 'time synchronised' but it isnt? (time on robot has not been set?)
I sometimes get a popup about SSH settings (from Terraterm?)
Should I have the usbtcp.exe and/or teraterm running before I run your program?
(BTW I copied your files into the same directory as the USB console files. Should this work OK?)
How does your program work? Does it run both USB2TCP and Terraterm?

Cheers
Helibot

Vader
Vader's picture

It runs and I see a few windows flash up then quickly close.

Perfectly Normal...That's the program working away...

Should I have the usbtcp.exe and/or teraterm running before I run your program?

No, all instances of TeraTerm and USB2TCP must be closed first, and your RSMedia must be in USB Console Mode...

Does it run both USB2TCP and Terraterm?

Yes, in that order...

How does your program work?

It's an AutoHotKey script which gets the current date, converts it to UNIX format, stores that value in the variable %time%, and then opens USB2TCP and TeraTerm, each with a specified PID (Process ID).
It then uses the ControlSend() function to type "date -s %time%" (where %time% is the time in UNIX format) in the TeraTerm window and press enter.

Then it closes the USB2TCP and TeraTerm windows...thats about it I think!

Now to check if the config file is correct...open up config.ini in the text editor of your choice...you should see the following...

[Config]

Telnet_Client_Path=C:\Program Files\TERATERM\ttermpro.exe

Telnet_Client_Parameters=localhost:222

USB2TCP_Path=usb2tcp.exe

Set "Telnet_Client_Path" to the location of the TeraTerm executable.

Leave "Telnet_Client_Parameters" at "localhost:222"

Set "USB2TCP_Path" to the location of the USB2TCP executable.

Jamie
Jamie's picture

Hi guys!

I'm also planning on coding my own speech recognition program for the rs media (Freddy came up with the idea) and i'm making it possible to recognize a persons' speech, then running a command on the rs media (if I say "stop" the robot will run the 'stop' command on the rs media. To see more about these apps, please visit my website at http://www.computersnmore.biz.

Cheers,

Jamie Kugelmann

FreddyA
FreddyA's picture

hey guys, first for Helibot. I used Jamie's version of the usbnet to get the time sync to work.. second for Jamie, thanks for the props but the idea of speech recognition came from some posts about programming rsm and the member who started the post claimed to have made speech recognition to work on his rsm. Then there was also some work being dome by Tikac I think and since you said you were going to attempt a new kernel for rsm i thought I'd present you the challenge. I went to your site and it is coming along real good. keep it up!

Jamie
Jamie's picture

Yeh thanks i'm getting more stuff done by the minute.

Cheers,

Jamie Kugelmann

Helibot
Helibot's picture

Hi all,
I have got the config.ini setup correctly. I found one issue - that terraterm (at least my teraterm!) defaulted to a SSH TCP/IP connection (not a telnet connection). So I had to change the settings and save them to the terraterm.ini file. So now I can see that the TCP2USB window opens, Teraterm opens some characters appear in the tcp2usb window , some lines scroll past in the usb2tcp window, but they all close to quickly for me to see what the lines are (and if there is any errors?).
But I noticed that even with normal USBConsole I am often getting corrupted characters and lockups, I think its caused by corrupted folders on the SDCard. This has happened to me a 3 or 4 times now (over the few years I have had RSMedia - does anyone else get corrupted SDcards? (I must admit that I am abusing them sometimes (in both windows and the bot) - eg just pulling them out.
Anyway I stopped using the card - I wanted to get a spare card anyway, so now I've got a good excuse! Will try the time sync again after that.

BTW I think that I could change the USB2tcp program to optionally send the time every time it starts up. I will look into that soon.

Related to the speech recog. I have been playing with the flite speech generation source code recently, I can successfully compile the latest version and I think I know how to solve the double speed problem. I will post some details sometime soon(ish).
Cheers
Helibot

FreddyA
FreddyA's picture

Hey Helibot, I have had corrupted sd cards also I keep a backup of my favorite robot files ready and I use this one old 16mb sd as my tester now. There is this one kingston 1gb card that my pcs read but both my RSMs dont?? I've tried formatting it several times to fat and fat32 but no go. One the time sync subject, great idea to have the update occur when the usb2pc starts up.
On the speech recog, keep it coming! I want to talk to these robots!

Vader
Vader's picture

Helibot - I'll PM you a special version which keeps the windows open if you want

Helibot
Helibot's picture

Hello Vader,
Yes please send me a version that keeps the window open. I have tried a new SDCrad and it doesnt help.
I still have this problem - "But I noticed that even with normal USBConsole I am often getting corrupted characters and lockups" It wasnt caused by my corrupted SD card. But I am using a new PC now....maybe I should try on my old PC. Maybe the USB drivers I've loaded are not right? (I did have a lot of old development ones..maybe I installed the wrong ones on my new PC.)
I will have a look at it again soon - I have been sidetracked by doing a new version of RSM alarmclock....its almost done:-)
Cheers
Helibot

FreddyA
FreddyA's picture

HELLO HELIBOT! Glad to read that your making a new version of the RSM Alarm Clock, it's something I use everyday. I just wanted to point out that I also tried the time sync with the USBnet from the development kit and it didnt work. Jamie sent me a modified version of USBnet he created and that is the one that works for me currently. I'm not sure if its included in the download from here, but if you need it I can send it to you.

Cheers

Freddy

my edit By USBnet I meant the mx1ads_usbserial.o bodycon deal not the pc driver end.

Helibot
Helibot's picture

Hi Freddy,
Thanks for the info, I will check the mx1ads_usbserial.o I am using....I hope I didnt release a broken one in the development kit , I will check that.

(PS - At the moment the new alarm clock will have better graphics (done by GDK), multiple alarms (upto 20!), recuring alarms (ie repeat the alarm every x seconds,minutes or hours), ability to play a random file (for sound or picture alarms). I hope to also add support for a alarm on an exact date or a day of the week.)

Cheers
Helibot

FreddyA
FreddyA's picture

Helibot that is a big upgrade! Scheduling for exact date or day of the week is a big deal! Are you going to try to make it sync? how will the alarms be set, via pc ui? About the mx1ads_usbserial.o, the one in the Devkit works, just not with the time sync for me so I use Jamies. I'd love to take a peek at any beta you have.

Freddy

Vader
Vader's picture

Helibot - How did that custom version go that I e-mailed you?

Helibot
Helibot's picture

Vader said: Helibot - How did that custom version go that I e-mailed you?

Hi Vader,

    Thanks for the custom version - I can see that on my new computer it seems to always receive garbage when the USB is first connected, so this causes the timesync to fail. But if I use my old computer it works fine.  So I guess it must be todo with the usb drivers I have installed on my new machine. Will try to replace those tomorrow.

Hi Freddy, Thanks for the tip on the mx1ads_serial.o.  I did have a different version than the devkit - but it seemed to work (with my old computer) so it wasnt causing the  issue.
(PS I'm still working on the RSMClock upgrade- nearly there!!)

Cheers
   Helibot

Helibot
Helibot's picture

Hi all,
I have FINIALLY got to the bottom of my USB console garbage problem. After much testing I finally traced the problem to the TERATERM.ini file. My ini file is quite a bit larger than a default one (I guess because I have saved a custom one with settings for RSMedia serial console and some other things.) So I replaced my inifile (in My Documents\My RS Media\USBNet directory) with the smaller teraterm.ini file from the USBNet archive and my USB console started working :-).
But RSMediaTimeSynchronizer still did not work.....this is because it uses the TERATERM.ini file from the directory where teraterm is installed into. So I replaced this one with the smaller file....and presto time synchronising works every time now !!.
Theres another chapter to the story about why it worked on my old computer...but I dont think its worth retelling...I doubt anyone else will see the same problem!
Anyway glad the mystery is solved , its working great now so I can get to some more fun things!!
Cheers
Helibot

FreddyA
FreddyA's picture

That is great news! I'm glad you found the problem. Cant wait to see all the more fun things your working on.

Freddy

Vader
Vader's picture

Helibot said: .. it uses the TERATERM.ini file from the directory where teraterm is installed into. So I replaced this one with the smaller file....and presto time synchronising works every time now !!...

I'll have to fix this by adding a part in the options where you can specify the .ini file...

Helibot
Helibot's picture

Vader said:

Helibot said: .. it uses the TERATERM.ini file from the directory where teraterm is installed into. So I replaced this one with the smaller file....and presto time synchronising works every time now !!...

I'll have to fix this by adding a part in the options where you can specify the .ini file...

I tried adding it as part of the Telnet_Client_Path - but it didnt workFrown. So adding it as another option would be a good idea.

   Cheers
      Helibot

Vader
Vader's picture

Helibot said:
I tried adding it as part of the Telnet_Client_Path - but it didnt work

Try adding it as part of Telnet_Client_Parameters then...that's what it's there for!Wink

Helibot
Helibot's picture

Vader said:

Try adding it as part of Telnet_Client_Parameters then...that's what it's there for!Wink

Dohhhh. I missed that - thought it was the usbtcp options!!!!.
That should work fine then!!
Cheers
Helibot