OpenWrt Forum Archive

Topic: OWFS & temploggerd error message "fusermount: mountpoint is not empty"

The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi!

I'm getting the following error message on my Asus WL-500G Premium (running White Russian 0.9) when trying to run run-owfs.

$ run-owfs
fusermount: mountpoint is not empty
fusermount: if you are sure this is safe, use the 'nonempty' mount option

The 1-wire devices attached (to the bottom USB-port) is two temperature sensors attached to a VS COM USB to RS232 adapter (more info available on www.vscom.de/619.htm - the adapter is supported by kernel 2.4 and up according to the manufacturer - it works in Ubuntu 6.10).

I have installed the following packages.

kmod-usb-uhci
kmod-usb-core
kmod-usb2
kmod-usb-storage

kmod-fuse
libfuse
fuse-utils

owfs
owlib

temploggerd
rrdtool1
librrd1
zlib
rrdcgi1

I installed the fuse packages from OpenWrt at first, but removed them and installed from http://home.mag.cx/openwrt/packages/ instead. OWFS & temploggerd are from mag.cx as well.

The html pages created by temploggerd & rrdtool are up and running nicely, but I get no temperature values so far.

lsusb info on the adapter:

root@Suze:~$ lsusb
Bus 003 Device 001: ID 0000:0000  
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
Bus 001 Device 002: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO

contents of /var/1wire/

$ ls /var/1wire/
bus.0       settings    statistics  structure   system      uncached

contents of /tmp/1wire/

$ ls /tmp/1wire/
bus.0       settings    statistics  structure   system      uncached

nattugglan

$ run-owfs
fusermount: mountpoint is not empty

fusermount: if you are sure this is safe, use the 'nonempty' mount option

If you try to start owfs multiple times, you get this message. Fuse has already mounted a filesystem under /tmp/1wire. If you try "lsmod | grep fuse" it will probably show that fuse is used at least once.
If owfs crash and fails to unmount the directory you get the same error.

# cd /       (Make sure you don't have any shell with pwd /tmp/1wire. This will lock the directory)
# kill-owfs
# fusermount -u /tmp/1wire    (Unmount the directory manually)
# fusermount -u /tmp/1wire
# lsmod | grep fuse
(make sure count is 0)
# run-owfs

This should probably restart it correctly.

nattugglan wrote:

The 1-wire devices attached (to the bottom USB-port) is two temperature sensors attached to a VS COM USB to RS232 adapter (more info available on www.vscom.de/619.htm - the adapter is supported by kernel 2.4 and up according to the manufacturer - it works in Ubuntu 6.10).

I haven't used this adapter before, and I'm not sure if you should load any more modules. I guess you have to start owserver with "-d /dev/ttyUSB0" or something similar with your adapter. Have you done that?
Edit /etc/default/owserver and specify that path before running run-owfs... I don't think I have any example or hints about that path.

Stop owfs and try to start owserver manually to find the problem.

# owserver --foreground --error_level=6 --error_print=2 -p 3002 -d /dev/ttyUSB0
root@Suze:~$ lsusb
Bus 003 Device 001: ID 0000:0000  
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
Bus 001 Device 002: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO

The device is clearly found, but you might need to install kmod-usb-serial and kmod-usb-serial-ftdi before using /dev/ttyUSB0. I'm not sure though...

Can you tell me how it looks like when you debug owserver?

/Christian

Hi d1mag!

I got the following when I tried to unmount /tmp/1wire the first time.

$ cd /
$ kill-owfs
$ fusermount -u /tmp/1wire/
fusermount: failed to unmount /tmp/1wire: Invalid argument

But /tmp/1wire unmounted ok after a few attempts, and after this run-owfs works without the error message. smile

$ ls /tmp/1wire/
$ lsmod | grep fuse
$ run-owfs

When owfs has started the previous contents of /tmp/1wire returns.

$ ls /tmp/1wire/
bus.0       settings    statistics  structure   system      uncached

/dev/ttyUSB0 doesn't exist.

I installed the modules you suggested.
kmod-usb-serial
kmod-usb-serial-ftdi

Tried to start owserver using /dev/ttyUSB0.

$ kill-owfs
$ owserver --foreground --error_level=6 --error_print=2 -p 3002 -d /dev/ttyUSB0
DEFAULT: Cannot access device /dev/ttyUSB0
  DEBUG: ow_exit 0

When I disconnect the USB-to-RS232 adapter I get the following.

Aug 21 14:19:19 Suze kern.info kernel: usb.c: USB disconnect on device 01:03.0-1 address 2
Aug 21 14:19:19 Suze kern.info kernel: usbserial.c: FTDI FT232BM Compatible converter now disconnected from ttyUSB0

The system says it was connected to ttyUSB0..

When I attach the USB-to-RS232 adapter again:

$ logread -f
Aug 21 14:28:38 Suze kern.info kernel: hub.c: new USB device 01:03.0-1, assigned address 3
Aug 21 14:28:38 Suze kern.info kernel: usbserial.c: FTDI FT232BM Compatible converter detected
Aug 21 14:28:38 Suze kern.info kernel: usbserial.c: FTDI FT232BM Compatible converter now attached to ttyUSB0 (or usb/tts/0 for devfs)

Added the vendor id and product id to /etc/modules.d/60-usb-serial.

$ cat /etc/modules.d/60-usb-serial 
usbserial vendor=0403 product=6001

Tried to start oswerver using /dev/usb/tts/0.

$ kill-owfs

$ owserver --foreground --error_level=6 --error_print=2 -p 3002 -d /dev/usb/tts/0
   CALL: PARSENAME path=[]
CONNECT: Cannot detect DS2480 or LINK interface on /dev/usb/tts/0.
  DEBUG: COM_close: flush
  DEBUG: COM_close: restore
  DEBUG: COM_close: close
   CALL: PARSENAME path=[]
DEFAULT: Cannot detect DS9097 (passive) interface on /dev/usb/tts/0.
  DEBUG: COM_close: flush
  DEBUG: COM_close: restore
  DEBUG: COM_close: close
  DEBUG: main_threadid = 1024
  DEBUG: ServerProcessOut = 1026
  DEBUG: ServerProcessAccept 3002[1026] try lock 0
  DEBUG: ServerProcessAccept 3002[1026] locked 0

The output stopped at the above last line, so I aborted with ctrl-c.

DEBUG: ServerProcess: break signo=2
  DEBUG: ow_net.c:ServerProcess() shutdown initiated
  DEBUG: Shutting down 0 of 1 thread 1026
  DEBUG: ow_net.c:ServerProcess() shutdown done
  DEBUG: ow_exit 0
   CALL: Starting Library cleanup
   CALL: Closing Cache
   CALL: Closing input devices
  DEBUG: FreeIn: busmode=2
   CALL: Closing outout devices
   CALL: Finished Library cleanup

Tried owserver using /dev/ttyUSB0.

$ owserver --foreground --error_level=6 --error_print=2 -p 3002 -d /dev/ttyUSB0
DEFAULT: Cannot access device /dev/ttyUSB0
  DEBUG: ow_exit 0

nattugglan

nattugglan wrote:

I installed the modules you suggested.
kmod-usb-serial
kmod-usb-serial-ftdi

When I attach the USB-to-RS232 adapter again:

$ logread -f
Aug 21 14:28:38 Suze kern.info kernel: hub.c: new USB device 01:03.0-1, assigned address 3
Aug 21 14:28:38 Suze kern.info kernel: usbserial.c: FTDI FT232BM Compatible converter detected
Aug 21 14:28:38 Suze kern.info kernel: usbserial.c: FTDI FT232BM Compatible converter now attached to ttyUSB0 (or usb/tts/0 for devfs)

That looks good... after inserting the modules usbcore, usbserial and ftdi_sio modules the device is found.

nattugglan wrote:

Added the vendor id and product id to /etc/modules.d/60-usb-serial.

$ cat /etc/modules.d/60-usb-serial 
usbserial vendor=0403 product=6001

Is this really correct?  The ftdi_sio module should take care of the inserted usb-adapter without telling usbserial about it. I don't believe that vendor and product should be added in 60-usb-serial. Can you try to remove that vendor and product parameters to usbserial?

nattugglan wrote:

Tried to start oswerver using /dev/usb/tts/0.

$ kill-owfs
$ owserver --foreground --error_level=6 --error_print=2 -p 3002 -d /dev/usb/tts/0
   CALL: PARSENAME path=[]
CONNECT: Cannot detect DS2480 or LINK interface on /dev/usb/tts/0.
  DEBUG: COM_close: flush
  DEBUG: COM_close: restore
  DEBUG: COM_close: close
   CALL: PARSENAME path=[]
DEFAULT: Cannot detect DS9097 (passive) interface on /dev/usb/tts/0.
  DEBUG: COM_close: flush
  DEBUG: COM_close: restore
  DEBUG: COM_close: close
  DEBUG: main_threadid = 1024
  DEBUG: ServerProcessOut = 1026
  DEBUG: ServerProcessAccept 3002[1026] try lock 0
  DEBUG: ServerProcessAccept 3002[1026] locked 0

owserver clearly doesn't find any ds2480 or ds9097 chip.
You have USB->serial adapter, but what kind of Serial->1-wire adapter do you have?

/Christian

d1mag wrote:

Can you try to remove that vendor and product parameters to usbserial?

I already have. I just wanted to see if they would make a difference. The result is the same, with or without the modifications to 60-usb-serial.

d1mag wrote:

You have USB->serial adapter, but what kind of Serial->1-wire adapter do you have?

The RS232 looks like this - a DE-9, no extra adapter in between.
http://pici.se/thumbs/t_hUuiBBiEi.gif

nattugglan

DS9097E should work - I used "digitemp_DS9097" with this cable when running digitemp on Ubuntu.

nattugglan

d1mag wrote:
nattugglan wrote:

The RS232 looks like this - a DE-9, no extra adapter in between.
http://pici.se/thumbs/t_hUuiBBiEi.gif

nattugglan

Ohh... No extra components?  There is a simple example how to use the bit-banging technique, but it requires some diods as far as I know, and reqiures GND, RXD, TXD and DTR pins.

http://owfs.sourceforge.net/adapters.html#Serial

/Christian

The cable works directly with Ubuntu + fuse and owfs (I've tried Ubuntu 6.10 and 7.04). I've tried both USB and the DE-9 (the DE-9 was connected to an old laptop, and the software was digitemp).

What could be wrong? One would think there'd be no difference in how the cable is seen by the system - given one has all the correct modules..

nattugglan

nattugglan wrote:

The cable works directly with Ubuntu + fuse and owfs (I've tried Ubuntu 6.10 and 7.04). I've tried both USB and the DE-9 (the DE-9 was connected to an old laptop, and the software was digitemp).

What could be wrong? One would think there'd be no difference in how the cable is seen by the system - given one has all the correct modules..

nattugglan

I just found a difference between owfs and digitemp. owfs initiated the serial-port to send 6 databits instead of 8. This speeds up the writing to the ds9097 adapter, but may have caused some problem in your case. I added a command-line option to setup 8 databits instead. Perhaps this will fix the problem for you.

Can you update to the latest version and try again...

owserver --foreground --error_level=5 --error_print=2 -p 3002 --8bit -d /dev/usb/tts/0

/Christian

The discussion might have continued from here.