fanoush / ds-d6

stuff for Desay/MPOW DS-D6 nRF52832 bracelet
163 stars 28 forks source link

wrap a docker container around the DFU flashing tool #12

Closed x29a closed 3 years ago

x29a commented 3 years ago

so it can be used more easily with its dependencies. especially python 2 will get more and more scarce :)

DFU script works great, verified with an SMA Q2, thanks a lot!

fanoush commented 3 years ago

Nice and interesting. At first it looked very odd and heavyweight solution to me, because porting to python3 is probably not an issue, however why not. If someone already has docker installed as is used to it then it may have sense.

Can the docker file have different name like desay_dfu.Dockerfile so it is clear it is not related to other stuff?

If you do not have any dependencies installed outside docker like bluez will it still work with bluez just inside the container? if yes, can you provide example in readme how to call hcitool lescan from same container so you can see addresses to use in desay_dfu.py without having any dependencies?

Alternatively maybe the desay_dfu.py could call this command via some extra command option, then no change in calling via docker would be needed.

x29a commented 3 years ago

hi @fanoush and thanks for your feedback.

Im more familiar with docker than python3, so that were the solutions that came to me ;) If anybody feels like porting it to python3, i can also build an image for that ;)

I incorporated your suggestion to rename the file and also describe how to perform a hcitool lescan. As far as i understand, the container should work without apps installed on the host, in fact it might be counterproductive to have bluez daemon or something running on host.

If you feel that your repo is not the right place, also no problem, id create a small project with your script, references and the Dockerfile. Its so helpful for development!

fanoush commented 3 years ago

thanks, no problem with merging :-) feel free to put it to your repo anyway if it is useful for you