ScratchX - not working

Hi

I can’t seem to get Scratch X working with my line-us. I have it connected to the local network and when I set up the program I do a connect to line-us.local and then instruction but nothing happens. If I try to go to line-us.local in my web browser it doesn’t work.

I believe I am using the latest firmware 2.0.4 as I updated it as the first thing I did. I also can not seem to find the ip address that the line-us is using to try to connect to that rather than the line-us.local.

Can anyone help?

Thanks

Dominic

Hi. Are you running on a mac or windows? On windows you may need to install bonjour print services. It could also potentially be a firewall issue so you could also try turning off firewall/AV software running on your PC.

You could also try re-starting your router to see if that helps.

To get you going quickly though if none of the above works log in to your router and find the IP address that way. It may show up in the list as ESP_XXXX - then use the IP address (e.g. something like 192.168.1.102) instead of line-us.local,

Of all the details to for get in a technical forum question ha sorry, I am on windows. Will install that print server and try again. Thanks

I have installed that print sever you suggested and unfortunately it doesn’t appear to have helped.

I have also tried disabling my bitdefender firewall and then tried to use Scratch X with no success.

I am fairly certain it is me doing something not quite right as the line-us works perfectly in the app. When programming in ScratchX do I need a connect to line-us.local (or IP which I have also tried) before giving it commands?

I have also tried inkspace and the LUS extension and am having trouble with that too could the issues be linked?

I can not see any settings in the bonjour print services program that would make anything better and the line-us is no listed as a shared printer.

If I try going to line-us.local it can not be found and if I go to the ip address of the line-us it takes me to a web page that says Welcome to Line-us and lists lots of technical details etc.

I believe everything it work but I am missing something.

Ok interesting in trying to get it working I followed the scratchX link from the “secret project Github page” and this page worked? When following the link from the line-us.com website it does not?

Also just one other question, now I have it working do you have any examples for ScratchX just to give a little push I am just trying to get my head round the co-ordinates system.

That’s very odd as they should be exactly the same. Does this link work?

http://scratchx.org/?url=http://Line-us.github.io/scratchx/Line-us.js#scratch

The examples we have aren’t very tidy at the moment, but should be enough to get you started. Durrell’s really the Scratch expert and his advice is to move the sprite (as in most if not all of the examples) and then use a block like this to send the sprite’s position to Line-us:

image

Of course you can just put your program on the stage if you prefer but definitely look at the sprite option if you haven’t before.

Because the Scratch stage is landscape shape the Line-us needs to be rotated for the drawing to match the screen:

The other important thing is that (0,0) is in the middle of the stage for Scratch. If you’ve got any questions though let us know.

Amazing thanks I will try that link and let you know.

Hi
Sorry it has taken me a while. I have just tried that link and yes that one does work.

Thanks again for all you help now on to coding some scratchX things for my line-us to draw.

Great! Do let us know how you get on.

I had problems with connecting via line-us.local but replacing that with the ip adress 1XX.xxx.x.xx:1337 worked to get connected.
The line-us will indicate connection as it would do with telnet ; running the newest firmware 3.0 (is there an updated command line summary pdf? )

But from here I can not get further - any chance to read the messages coming from the line-us? edit 3.3.2019 : in Chrome you can get messages in the console by pressing ctrl shift j.

The flow seems to stop somewhere - when I activate disconnect device can I immmediately reconnect

Could you share a project file (.sbx) one could load ? ah just saw the repository THX

I

Did capture some of the console messages - can anyone guide me in resolving please :slight_smile:

Firmware 3.0 Build 33

  1. When connecting to line-us.local:
    connect%203

  2. When conecting with iP adress - Line-us will wave but apparently the handshake ist not right
    connect%202

Did rename line-us to another name - same issue when trying to connect newname.local

No problem in connecting & drawing from iphone app or app on windows 10.

Thanks for sending the logs - it’s very helpful.

I think the problem is that you’ve got the port number in the IP address. Try xxx.xxx.xxx.29 instead of xxx.xxx.xxx.29:1337. We run the Websockets server on the standard port - 1337 is just for the plain sockets interface used by the app.

1 Like

You were so right Rob - Thx !

and after installing Bonjour on Windows 10 as mentioned in this post https://forum.line-us.com/t/line-us-svg-plotter/351 it connects also to line-us.local

Fantastic! Good that you got the line-us.local working.

I had the problem with Websockets and ScratchX today when 7 drawbots were in one network.

We solved the problem by disabling the network cache in Chrome’s network tab in developer tools.

That’s interesting - I’ll try to replicate the problem here - what were you seeing? Slowness or disconnects (or something else?). Good to hear that you got it working though.

The drawbots were not working at all. The connection via App and Telnet worked.

This is the error console:

After disabling the network cache all robots worked. It took a while to resolve the issue and it’s only a workaround. Our setup worked with less drawbots with the same repeater in another network.

That looks very odd - it’s having problems with Bonjour name resolution, but you mentioned that telnet worked, so name resolution must have been working at the OS level. If it happens again could you try another browser (e.g. firefox) before disabling the cache to try to establish whether it’s only affecting Chrome.

In general Bonjour can sometimes cause headaches - we put a lot of effort into the app to work around them but with Scratch running in the browser we don’t have the same level of control. Still, it’s important that it reliably connects in situations like yours so keep us up to date on how it goes.

One other question, what kind of WiFi hub are you using.

Bonjour’s got resolved. It didn’t work with the IP either. I think it’s a websocket related problem since it works when the network cache is disabled.

We are using a AVM Fritz Repeater. The DHCP is handled by the infrastructure.
https://en.avm.de/products/fritzwlan/fritzwlan-repeater-1750e/

It’s really odd. I compared all the computers and browsers. Identical OS and browser version.
Firefox is not an option since we had to install historic Flash plugins on the students’ computers.

My line app does not work at all and its presence in my phone is also affecting the performance of other app as well. What is the matter?