After upgrade to fhem5.2-7390 no culflash possible

Begonnen von Guest, 05 Januar 2012, 13:40:00

Vorheriges Thema - Nächstes Thema

Guest

Originally posted by: <email address deleted>

When trying to flash a CUL device with "CULflash CUL_0 CUL_V3" fhem
responds with

libusb couldn't open USB device /proc/bus/usb/002/004: Permission
denied.
libusb requires write access to USB device nodes.
dfu-programmer: no device present.

The CUL device is working properly in non-flash mode.

Reverting to fhem5.1-7390 works as expected.

ignisquivir

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

rudolfkoenig

                                                   

> libusb requires write access to USB device nodes.

This is most probably a side effect of the newly indroduced fhem user on the
FB7390: fhem is not running under root anymore on the FB7390 starting with 5.2

Good solution, anyone?

:/

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

Guest

Originally posted by: <email address deleted>

On Jan 5, 2:35 pm, Rudolf Koenig wrote:
> > libusb requires write access to USB device nodes.
>
> This is most probably a side effect of the newly indroduced fhem user on the
> FB7390: fhem is not running under root anymore on the FB7390 starting with 5.2
>
> Good solution, anyone?
>
> :/

If dfu_programmer wants to be root just give him root (setuid root):

  chown root dfu-programmer
  chmod u+s dfu-programmer

I have tested this and was able to flash firmware von my CUL_V2.
I would suggest to add this to startfhem.

A different question
Very stange on my FHEM 7390 configuration is that I was not able to
issue CULflash directly:

CULflash CUL CUL_V2
Usage: CULflash , where is one
of CUL_V2 CUL_V2_HM CUL_V3 CUL_V4

What did I do wrong?

I had to modify 99_updatefhem.pm (uncommenting the checks) in order to
get CULflash run.

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

rudolfkoenig

                                                   

> If dfu_programmer wants to be root just give him root (setuid root):

Have done this, and replaced fhem-5.2-fb7390.image on fhem.de

Also fixed a bug for creating more than one CUL via usb create (have to change
the FHTID to be different). Now up to 10 CULs can be auto-created.

Additionally on linux the lsusb command is executed on fhem startup (as part of
"usb create") to check if there are any unflashed CULs attached, and if found
one, CULflash will be called with the correct parameters.

I.e. in the future the following procedure should be enough (at least on the
FritzBox 7390) to flash the CUL, autoinstall it in fhem and start acquiring
data (SlowRF only):
- buy a CUL and attach it to the Fritzbox.
- install fhem-5.2-7390.image

Can somebody confirm this? I have no "unflashed" CULs. Setting them into
flash-mode with B01 works.


> Usage: CULflash , where is one
> of CUL_V2 CUL_V2_HM CUL_V3 CUL_V4

You do not have a CUL device or the device named CUL is not of type CUL.
The current (updated) version accepts the syntax

   CULflash none CUL_V3

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

Guest

Originally posted by: <email address deleted>

I don't have any unflashed CULs either, but afaik the CULflash should also
reflash CULs that have firmware loaded. What happens on a firmware update ?

Presently with 5.2 and SVN as of 201201071345 the log has:

2012.01.07 13:38:28 3: Opening CUL0 device /dev/ttyACM0
2012.01.07 13:38:28 3: Can't open /dev/ttyACM0: No such file or directory
2012.01.07 13:38:59 1: Got http://fhem.de/fhemupdate/filetimes.txt, length:
6351
2012.01.07 13:38:59 1: Got http://fhem.de/fhemupdate/CUL_V3.hex, length:
43656
2012.01.07 13:39:03 1: (dfu-programmer atmega32u4 erase && dfu-programmer
atmega32u4 flash ./FHEM/CUL_V3.hex && dfu-programmer atmega32u4 start) 2>&1
2012.01.07 13:39:03 1: libusb couldn't open USB device
/proc/bus/usb/002/011: Permission denied.
libusb requires write access to USB device nodes.
dfu-programmer: no device present.

ignisquivir

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

Guest

Originally posted by: <email address deleted>

Hmm. I think the setuid patch does not work if FHEM 5.2 was already
installed because if will only do a chown and chmod if the user
boxusr80 does not exist.

I suggest to move the lines
"
  chown root ${home}/dfu-programmer
  chmod 4755 ${home}/dfu-programmer
"
 before the comment

"
# let FHEM run as user boxusr80 by adding user fhem with uid of
boxusr80
"


--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

rudolfkoenig

                                                   

> I suggest to move the lines
> "
>   chown root ${home}/dfu-programmer
>   chmod 4755 ${home}/dfu-programmer
> "
>  before the comment

Suggestion accepted, implemented, tested, checked in, repackaged, and
fhem-5.2-fb7390.image uploaded to fhem.de

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com

Guest

Originally posted by: <email address deleted>

> Suggestion accepted, implemented, tested, checked in, repackaged, and
fhem-5.2-fb7390.image uploaded to fhem.de

Downloaded and tested, everything is fine now, thank you!

Still the disappearing comments in fhem.cfg need attention, is there
anything I can help with ?

ignisquivir

--
To unsubscribe from this group, send email to
fhem-users+unsubscribe@googlegroups.com