Hello,
I’m running lw4 as a docker image on a RaspberryPi 3.
The RRI is connected via USB to the Ortur LaserMaser2 on ttyACM0.
I’m using the folowing docker-compose file :
The service runs fine and I can get the web interface.
But when I attempt to connect to the machine, the port is not detected and I cannot select any port for my USB connexion.
what is wrong, is there something else that should be defined in the docker-compose.
Nota : when running “outside” docker (as a normal rpi install) it is working fine.
Sounds like you’ve already narrowed down the issue with the device connection. Have you searched google for docker setup accessing USB serial devices? My guess is access control as maybe the Docker user does not have the same dialout group privileges as the pi user.
with LaserWeb running, open a console on that Docker image and show the long listing( ls -l ) of the /dev/ttyACM0 device and then run a process listing to show what owner is running the laserweb daemon( ps -fe | grep -i laserweb )
You got me, it sure looks correct so I would expect the laserweb server to find the device.
And when laserweb is started there’s nothing in the logs about access devices? Just considering something might not have installed in the docker container so it’s operating differently from when installed native on RaspbianOS.
Nothing special in the logs, even after enabling DEBUG LOGGER; just this :
> laserweb@4.0.998 start-server /usr/src/app
node node_modules/lw.comm-server/server.js
***************************************************************
---- LaserWeb Comm Server 4.0.136 ----
***************************************************************
Use http://172.17.0.2:8000 to connect this server.
* Updates:
Remember to check the commit log on
https://github.com/LaserWeb/lw.comm-server/commits/master
regularly, to know about updates and fixes, and then when ready
update accordingly by running git pull
* Support:
If you need help / support, come over to
https://plus.google.com/communities/115879488566665599508
***************************************************************
App connected! (id=0)
INFO: Requesting Server Config
App disconnected! (id=0)
App connected! (id=0)
INFO: Requesting Server Config
Any way to turn on more logs ?
It’s running on RaspberryPI 3 with Raspbian Linux 5.10.17-v7+ armv7l
wow, so no logging when you open the connection dialog or anything. Weird.
Did you try starting up LaserWeb without anything connected to USB and then connect your laser after LaserWeb was running? Just shotgunning things at this point. Otherwise I would be checking config files to compare between the working native install and the Docker install.
I see that G+ was still set as the support forum in the code… And see that MakerForums is their preferred support forum. I made a pull request to fix the G+ link to MakerForums.
On another note, I would also run through to make darn sure your Docker container was running only the preferred nodejs and serial port versions. ie matching what was installed natively. Sometimes, two packages of differing versions can be installed and you think it’s running on one version but it’s defaulting to another version. I’ve done this myself with python stuff many times.
Did you set the server ip (and port 8000) in the frontend?
The default points to localhost, not the server.
You can change the log and verbose level in config.js or via the .env file, where 0 is the lowest level and 3 is the highest. To get the most screen output add “VERBOSE_LEVEL=3” to the .env file, or “LOG_LEVEL=3”, if you want the output in the logfile.
The ENV file must be named “.env” only, with nothing in front of the dot!
The websocket communication only uses port 8000 by defuault, but you can change the port by adding the following line to the env file:
WEB_PORT=8001 (whatever port you like)
you can do that, aslong as you also reconfigure the server to listen on this port. So create a file named “.env” and add the line “WEB_PORT=82”.
If this does not work, go to config.js (where the defaults are defined) and change the port at the end of line 6 to:
config.webPort = process.env.WEB_PORT || 82;
> laserweb@4.0.998 start-server /usr/src/app
> node node_modules/lw.comm-server/server.js
***************************************************************
---- LaserWeb Comm Server 4.0.136 ----
***************************************************************
Use http://172.17.0.3:8000 to connect this server.
* Updates:
Remember to check the commit log on
https://github.com/LaserWeb/lw.comm-server/commits/master
regularly, to know about updates and fixes, and then when ready
update accordingly by running git pull
* Support:
If you need help / support, come over to
https://plus.google.com/communities/115879488566665599508
***************************************************************
App connected! (id=0)
INFO: Requesting Server Config
App connected! (id=1)
INFO: Requesting Server Config
App connected! (id=2)
INFO: Requesting Server Config
App disconnected! (id=0)
App disconnected! (id=0)
App disconnected! (id=0)
App connected! (id=0)
INFO: Requesting Server Config
App disconnected! (id=0)
App connected! (id=0)
INFO: Requesting Server Config
App disconnected! (id=0)
App connected! (id=0)
INFO: Requesting Server Config