Azrael1706

Cannot donwload Code to Cybermaster Unit

Recommended Posts

Hello,

I hope there is someone out there to help me.

I recently dug out my old cybermaster set and tried to make it work.

I wanted to show my son (5 years old) the fantastic world of Lego Cybermaster.
So I set up a VM (VirtualBox) with windows XP and installed the Cybermaster software there. Everything's runnung greatly. (If someone is interested I'd love to share the setup process).
I can start the software and get a connection in game between the tower unit and the mobile unit. I connected the Tower Unit through a Serial-USB Connector with the PC (its a windows surface 4pro by the way).
It takes some time to connect, but it always will (I assume it's due to the VM). 
In Game I can controll the Mobile unit directly with arrow keys and the additional motor with CTRL and ALT. No Problem.

My Son and I having already a great time with the set. So it was already worth it.

PROBLEM: I cannot download a Program (Code) to the mobile unit. When I try, the Tower starts flickering as well as the mobile unit, but after a few seconds the mobile unit just turns off. No Programm downloaded.

I also installde Bricx Command Center directly in Windows 10. Here the connection starts immediately. I, again, have direct control via the "Brick Joystick" Tool and the "Direct Control" Tool.
I cann also play music notes through the "Brick Piano". But still I cannot download code to the Mobile Unit. 
I can write code and compile ist successfully, but the download always crashes.

I own three Mobile units (and Towers) now for testing. All show the same behavior. 
I assume it's got something to do with the Serial Connector. Maybe the Read and Writing timings are off. But i have no idea what to change them to.

I hope someone here can help me. I'd really love to show my son how we can program the robot to do what we want.

Thank you very much.

Share this post


Link to post
Share on other sites

Not only timings, maybe some packet sizes, if they are there. Don't know what was for this available. 

Maybe just that USB/serial thing doesn't support that. That is why still have some old computers to program some older relay protections, as trough USB adapters it is not possible, or we could not find correct one.

Share this post


Link to post
Share on other sites
8 hours ago, JaBaCaDaBra said:

Did you assign a com port to the usb you use?

I believe yes, otherwise direct control won't work?

If of any help, I'll fire up my cybermaster units and try downloading a short program. Direct control worked flawlessly also here ...

Now, you are of course aware of the 396 LEGO byte code RAM limit, right?

Best,
Thorsten

Share this post


Link to post
Share on other sites
On 11/10/2023 at 2:08 PM, JaBaCaDaBra said:

Did you assign a com port to the usb you use?

Yes I did. It’s on com port 4. 

19 hours ago, Toastie said:

I believe yes, otherwise direct control won't work?

If of any help, I'll fire up my cybermaster units and try downloading a short program. Direct control worked flawlessly also here ...

That’s sounds great. Do you use a usb-serial adapter as well? Maybe I could copy your settings if they work. 

19 hours ago, Toastie said:

Now, you are of course aware of the 396 LEGO byte code RAM limit, right?

Best,
Thorsten

Oh yes 😂 I am well aware of that. I used to program the brick about 10 years ago. It was a lot of fun for me. Got it driving around wildly, while playing a little song. That’s all I‘ll ask of it. 

Edited by Azrael1706
Orthography

Share this post


Link to post
Share on other sites
On 11/10/2023 at 10:44 AM, Azrael1706 said:

I can write code and compile ist successfully, but the download always crashes.

This is really weird.

I fired up my Cybermaster brick and tower, along with BricxCC on WIn11/64bit. USB2Ser adapter on COM1. Composed a short program, making the CM play some tones. All works as expected.

I have no clue what goes wrong on your side. It maybe the adapter; I remember that I had one, where all looked good, but some stuff simply did not work. I am using a rather seasoned LogiLink adapter with an FTDI FT232RL chip set. Others will certainly also work; what is the chip set on yours?

Do you have other PBricks as well? Maybe an RCX or SCOUT? If so, do these run programs you downloaded from BricxCC?

Maybe acquiring an RF tower from BrickLink may be an option?

All the best,
Thorsten

P.S.: You did put on all 4 antennas on both the CM brick and tower, I am sure. Just speculating, because I remember having issues with communication when 2 antennas were missing, even when putting them side by side. I am just wildly guessing here ... 

 

Edited by Toastie

Share this post


Link to post
Share on other sites
4 hours ago, Jurss said:

Just "maybe" idea/question - is that Windows XP 32bit? 

I really hope it's got nothing to do with that and honestely, I doubt it. 
...
I just checked:
Win XP in VM 32-Bit
Win 10 OS 64-Bit

As either OS shows a similar behavior (direct control working; downloading code not working), I assume the problem is not the OS.
But thanks for the input. It's really helpfull to get all kind of ideas to check. I'd have never thought of that 32/64 bit thing

16 hours ago, Toastie said:

I fired up my Cybermaster brick and tower, along with BricxCC on WIn11/64bit. USB2Ser adapter on COM1. Composed a short program, making the CM play some tones. All works as expected.

That's some good news.
Maybe we could compare our USB-Serial-Adapter settings.

2031803994_Screenshot2023-11-12113859-min-min.png.8a7abe0823c11ec3993c48607eaeffc8.png1238799776_Screenshot2023-11-12114013-min-min.png.30a5954f3059bb8a5ea7606942fc81e5.png506562462_Screenshot2023-11-12114048-min-min.png.f6f1e39aaa04bb06582053775ea1120d.png

Maybe you could check, if there is something different with your adapter settings.

16 hours ago, Toastie said:

I have no clue what goes wrong on your side. It maybe the adapter; I remember that I had one, where all looked good, but some stuff simply did not work. I am using a rather seasoned LogiLink adapter with an FTDI FT232RL chip set. Others will certainly also work; what is the chip set on yours?

I got a DIGITUS DA-70156 and I heard of someone, who used the DA-70146 successfully.

16 hours ago, Toastie said:

Do you have other PBricks as well? Maybe an RCX or SCOUT? If so, do these run programs you downloaded from BricxCC?

Maybe acquiring an RF tower from BrickLink may be an option?

I don't have other programmable bricks, but I got some other RF Towers here. I will check them. Maybe its that easy.
And yes, I do use all 4 antennas ;-)

Thank you very much. I really aprecciate all your helping attempts

Edited by Azrael1706

Share this post


Link to post
Share on other sites
2 hours ago, Azrael1706 said:

No change. :-(

Oh crap ... all "advanced" serial ports settings are identical. However, I noticed that you are using XON/XOFF as protocol; I have "none" activated.

The IR/RF towers are as dumb as a rock. They don't know anything about flow control other than having the bridge between RTS and CTS = "always ready". BricxCC/NQC don't even bother, the LEGO software does though - the SCOUT tool for example claims there is no tower when the corresponding pin is not pulled high. The electronics in the tower is naturally always way faster than 9600 baud can ever be - it doesn't have to do anything other than emitting the IR/RF serial signal coming in and vice versa.

Not the point. But when you have xon/xoff activated, any "tower echo" or CM reply with value 0x13 may stop the transmission, as this is the character to signal "device is busy". For ASCII character transmission, all is fine, as these begin at 0x20 (space). All characters below (0x00 - 0x1F = 32) are considered control codes. LEGO byte codes are of binary nature - no control chars at all. That may be an issue when transmitting longer sequences of bytes (a program). And then no further bytes are coming in, as the towers don't do anything smart, as for example sending 0x11 = "ready" ... 

I'm not sure though, you can simply try that out - somewhere in your code may be 0x13 ;)

Best regards,
Thorsten

P.S.: I just noticed the pwr command is byte code 0x13. Mayb you should just let the CM brick play a tone. Does this work?

Edited by Toastie

Share this post


Link to post
Share on other sites
23 hours ago, Toastie said:

Oh crap ... all "advanced" serial ports settings are identical. However, I noticed that you are using XON/XOFF as protocol; I have "none" activated.

Hey man, thnaks for that.

I really thought that's the problem. I changed the vallue to "none". It didn't do any change. 
Cannot download any Program to the brick, neither via BricxCC nor via the original Lego Software (Cybermaster).
Still the same behavior as discriped above. 
I even tried a Code that's got only a comment, not even a line of executable code. Same result.

I am out of ideas, now. Still appreciate any suggestions you guys might have.

Share this post


Link to post
Share on other sites

Another "stupid" idea, as I'm not technically familiar with this port (I have used it some time ago, but thats all). I just see, that theer are many wires, which play different roles (there are not just two like for ethernet), maybe some wire on cable is broken - it can send some packets, for those separate commands, but doesn't allow to properly start or finish something longer with many packets for that program. 

Share this post


Link to post
Share on other sites
11 minutes ago, Jurss said:

maybe some wire on cable is broken

That is true, but @Azrael1706 said, he tried different cables. Also, direct control means that the tower sends a command and as per (RCX/CM) PBrick protocol, the brick has to acknowledge that command. Maybe BricxCC does not enforce that, this is why I suggest a couple of further test, in another EB window :pir-laugh:

Best,
Thorsten 

1 hour ago, Azrael1706 said:

I am out of ideas, now. Still appreciate any suggestions you guys might have.

Yeah - checked this behavior (with xon/xoff protocol) - it still downloads to the CM brick. Bummer.

Well, the situation is:

  1. You checked antennas, RF towers, RS232 cable.
  2. Protocol on the USB port is identical to the settings I am using.
  3. You checked with Win10 as well as in a VM.
  4. Direct control works on all machines.

There are not many options left, I believe:

  1. The CM brick is flawed - maybe the RAM section is faulty ...
  2. Something is weird with the USB2Ser adapter.

With regard to 1:

  1. When you tested "direct control", did you also run the "Diagnostic" and "Watching the brick" routine? If so, could you repeat that test and poll the brick every second with a good number of variables, the built-in timers etc. turned on? That will create a lot of bidirectional data traffic from/to the tower. Maybe this screws up as well; if not, communication is for sure OK.
  2. What does the panel "Memory map" tell you? Can you post a screenshot?
  3. In "Direct control", set a couple of variables to any number between 1 and 255. Then poll these variables in "Watching the brick": Do they show the numbers, you typed in "Direct control"?
  4. When you do set more and more variables, does the memory map show you less available RAM?

With regard to 2: Any chance you have another USB2Ser adapter?

Best regards,
Thorsten

 

Edited by Toastie

Share this post


Link to post
Share on other sites
2 hours ago, Jurss said:

maybe not even too far

True - next option! :pir-huzzah2:

All the best,
Thorsten

Share this post


Link to post
Share on other sites
On 11/13/2023 at 2:16 PM, Toastie said:

There are not many options left, I believe:

  1. The CM brick is flawed - maybe the RAM section is faulty ...
  2. Something is weird with the USB2Ser adapter.

With regard to 1:

  1. When you tested "direct control", did you also run the "Diagnostic" and "Watching the brick" routine? If so, could you repeat that test and poll the brick every second with a good number of variables, the built-in timers etc. turned on? That will create a lot of bidirectional data traffic from/to the tower. Maybe this screws up as well; if not, communication is for sure OK.
  2. What does the panel "Memory map" tell you? Can you post a screenshot?
  3. In "Direct control", set a couple of variables to any number between 1 and 255. Then poll these variables in "Watching the brick": Do they show the numbers, you typed in "Direct control"?
  4. When you do set more and more variables, does the memory map show you less available RAM?

With regard to 2: Any chance you have another USB2Ser adapter?

Hey, sorry for the waiting,

I ordered another USB to Serial Adapter (Logilink). Same results. I was really hoping this was it.

I didn't check the RAM yet. I will follow your instructions but cannot do so in the next days. Christmas is goona come and I'm very buisy.
I will keep you updated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.