Menu

#26 OWFS not working on Windows with CyWin 2.3.0 / libusb 1.0.20.7

v1.0_(example)
open
nobody
None
1
2016-01-13
2016-01-11
Anonymous
No

C:\Program Files (x86)\OWFS\bin>owhttpd.exe --foreground -u all -p 8080
DEFAULT: owlib.c:(208) Cannot open USB bus master
Exception: STATUS_ACCESS_VIOLATION at eip=64C222E3
eax=00000000 ebx=80041D1C ecx=00000000 edx=00000000 esi=80041CF8 edi=80049338
ebp=0028AAB8 esp=0028AA60 program=C:\Program Files (x86)\OWFS\bin\owhttpd.exe, p
id 8076, thread main
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
0028AAB8 64C222E3 (80049338, 00000000, 00000001, 6FCF679A)
0028ABE8 6FD25D21 (00000006, 0028AC0C, 80028290, 00000000)
0028ACE8 610082DE (00000000, 0028CD74, 610073E0, 00000000)
0028CD48 61006044 (0028CD74, 00000000, 00000000, 00000000)
0028FF18 610061B6 (610073E0, 00000000, 00000001, E0FC4216)
0028FF38 61007164 (00405230, 00000000, 00000000, C00000D8)
0028FF58 00404D02 (00405230, 00000001, 00000000, 00000000)
0028FF80 00401015 (FFFD8000, 77357BE0, 0AFDC3D6, 0028FFDC)
0028FF94 77357C04 (FFFD8000, 0ADCF384, 00000000, 00000000)
0028FFDC 775AAD5F (FFFFFFFF, 775901F2, 00000000, 00000000)
0028FFEC 775AAD2A (00401000, FFFD8000, 00000000, 78746341)
End of stack trace

Discussion

  • Jan Kandziora

    Jan Kandziora - 2016-01-11

    Which version of OWFS do you use? Can you compile it yourself, so you can use the latest one from the git archive?

    I think the main problem is owlib.c says "Cannot open USB bus master", and the segfault is inside the error handling code. Which user starts owhttpd.exe? A normal user isn't granted raw access to USB, so libusb will fail.

    Don't know the requirements exactly but I think you need to run it as LocalSystem, which is done by creating a service entry for that executable. You can do it with Cygwin's cygrunsrv command line tool. If you don't like to start owhttpd as LocalSystem for security reasons, you can create a service for owserver instead

    $ cygrunsrv -I owserver -p /path/to/owserver.exe -a "-u all"

    $ /path/to/owhttpd.exe -s localhost:4304 -p 8080

    Kind regards
    Jan

     

    Last edit: Jan Kandziora 2016-01-11
  • Jan Kandziora

    Jan Kandziora - 2016-01-13

    Uh, no. Please don't use an arbitrary archive from an external site. The main owfs code archive is here at sf.net:

    $ git clone git://git.code.sf.net/p/owfs/code owfs-code

    Kind regards
    Jan

     
  • Anonymous

    Anonymous - 2016-01-13

    ok. Tried http://sourceforge.net/projects/owfs/files/owfs/3.1p0/owfs_3.1p0.exe/download
    running the whole thing as admin.

    Error in CMD
    owhttpd version:
    3.1p0
    libow version:
    3.1p0
    DEFAULT: owlib.c:(208) Cannot open USB bus master

    Exception: STATUS_ACCESS_VIOLATION at eip=64C222E3
    eax=00000000 ebx=80041C3C ecx=00000000 edx=00000000 esi=80041C18 edi=80049260
    ebp=0028AA98 esp=0028AA40 program=C:\Program Files (x86)\OWFS\bin\owhttpd.exe, pid 9160, thread main
    cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
    Stack trace:
    Frame     Function  Args
    0028AA98  64C222E3 (80049260, 00000000, 00000001, 6FCF679A)
    0028ABC8  6FD25D21 (00000007, 0028ABEC, 80028290, 61027638)
    0028ACE8  610082DE (00000000, 0028CD74, 610073E0, 00000000)
    0028CD48  61006044 (0028CD74, 00000000, 00000000, 00000000)
    0028FF18  610061B6 (610073E0, 00000000, 00000001, 7FFF1216)
    0028FF38  61007164 (00405230, 00000000, 00000000, C00000D8)
    0028FF58  00404D02 (00405230, 00000001, 00000000, 00000000)
    0028FF80  00401015 (FFFD5000, 75997BE0, 3FF715A1, 0028FFDC)
    0028FF94  75997C04 (FFFD5000, 3D5E0D32, 00000000, 00000000)
    0028FFDC  76F6AD5F (FFFFFFFF, 76F501F7, 00000000, 00000000)
    0028FFEC  76F6AD2A (00401000, FFFD5000, 00000000, 78746341)
    End of stack trace
    

    Note: 3.0p2 is working, but the connection to anything connected to the Busmaster (DS9490) is unstable.

     
  • Jan Kandziora

    Jan Kandziora - 2016-01-13

    Ahhh.

    3.0p2 uses libusb0
    3.1p0 uses libusb1

    Please make sure to install libusb1 through the Cygwin installer.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.