Page 1 of 3 123 LastLast
Results 1 to 15 of 41

Thread: BitHoist on Server

  1. #1
    Fuel Injected! historystamp's Avatar
    Join Date
    Dec 2011
    Location
    USA
    Posts
    169

    BitHoist on Server

    Is there still an interest on running BitHoist on the Gearhead-efi server?

    I understand BitHoist to identify a bin file. Given a bin file, BitHoist tells you want it is.

    I've looked into this a little more.

    Questions:
    What Operating System does the server run? Windows?
    What web server? Apache?
    Have you gotten BitHoist to run on the server from the command line? This would be a necessary step.

    What programming language do I use? I'm looking at PHP. It's free.

    The general idea:
    1) display "welcome to BitHoist" web page. User selects what bin file to analyze.
    2) The PHP script that I would write gets invoked on server
    3) Bin file is uploaded to server.
    4) Program BitHoist gets invoked on server. It runs as if it was invoked from command line.
    5) The PHP scripts get the results from BitHoist.
    6) Script sends back new web page with the results.

    Robert
    Last edited by historystamp; 02-10-2012 at 10:38 PM.

  2. #2
    RIP EagleMark's Avatar
    Join Date
    Feb 2011
    Location
    North Idaho
    Age
    64
    Posts
    10,477
    Sure! Why not have another cool online service? But I can't even get it to run on my windows computer...

    Sever is Linux, Apache and PHP is not an issue. All librarys are enabled. If you can make it work I can install it in HTML pages like BCCFind and change paths to server...

    1990 Chevy Suburban 5.7L Auto ECM 1227747 $42!
    1998 Chevy Silverado 5.7L Vortec 0411 Swap to RoadRunner!
    -= =-

  3. #3
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,862
    Bithoist outputs to stdout which may or may not produce data you can use for the php script. stdout is configurable on the server and could change. A simple code change would ensure output is directed where needed. Does the output need to be formatted to html or can the script handle that?

    There are quite a few calibrations that bithoist does not recognize so it may be worthwhile to fully learn how the program works in order to teach it new ones.

  4. #4
    Fuel Injected! historystamp's Avatar
    Join Date
    Dec 2011
    Location
    USA
    Posts
    169
    PHP supports an exec command that says run this file in a command line and return the results to a PHP array. All the HTML formating would be done in PHP.

    There are not any comments in the code besides the Open Source statement.


    -------------------

    Here how I compiled and ran bit hoist. Give it another try. If you run into problems, I'll install Linux & compile there.

    Look for "mac $". This is what I typed in.

    Just the commands.


    cd BitHoistServer/
    pwd
    ls
    cp -i Makefile.ix Makefile
    pwd
    make
    # at this point, I want to a window to copy the akal.bin to this folder.
    ls
    pwd
    # akal.bin is last becase it starts with a lower case lettter!
    ./bithoist -id -mask akal.bin



    Code:
    # put the bithoist stuff in some folder.
    # cd to that directory
    #
    # also, copy the akal.bin to the same  folder as bithoist
    mac $ cd BitHoistServer/
    mac $ pwd
    /Users/mac/BitHoistServer
    mac $ ls
    BitHoist.c         Exormacs.c         IdentifyMask.r     Mostek.c           Storage.c
    BitHoist.h         Exormacs.h         IdentifySpec.r     Mostek.h           Storage.h
    BitHoist.r         ExtractBCC         Intellec.c         Options.c          TekExtended.c
    CRC.c              HostTypes.h        Intellec.h         Options.h          TekExtended.h
    CRC.h              Identify.c         License            ReadMe             TekHex.c
    ChangeLog          Identify.h         MacObject.c        Series.c           TekHex.h
    Chunks.c           Identify.r         MacObject.h        Series.h           ToDo
    Chunks.h           IdentifyBCC.r      MakeFile.mac       Signetics.c
    EditBCC            IdentifyBCCTest.r  Makefile.ix        Signetics.h
    
    # copy the Makefile.ix to a new file named Makefile
    mac $ cp -i Makefile.ix Makefile
    mac $ pwd
    /Users/mac/BitHoistServer
    # compile program bithoist
    mac $ make
    gcc -c BitHoist.c -o BitHoist.o
    gcc -c Storage.c -o Storage.o
    gcc -c Options.c -o Options.o
    gcc -c Mostek.c -o Mostek.o
    gcc -c Signetics.c -o Signetics.o
    gcc -c TekHex.c -o TekHex.o
    gcc -c Intellec.c -o Intellec.o
    gcc -c Exormacs.c -o Exormacs.o
    gcc -c TekExtended.c -o TekExtended.o
    gcc -c Series.c -o Series.o
    gcc -c Chunks.c -o Chunks.o
    gcc -c CRC.c -o CRC.o
    gcc -c Identify.c -o Identify.o
    gcc -o BitHoist BitHoist.o Storage.o Options.o Mostek.o Signetics.o TekHex.o Intellec.o Exormacs.o TekExtended.o Series.o Chunks.o CRC.o Identify.o 
    mac $ # at this point, I want to a window to copy the akal.bin to this folder.
    mac $ ls
    BitHoist*          EditBCC            IdentifyMask.r     Mostek.h           Storage.c
    BitHoist.c         Exormacs.c         IdentifySpec.r     Mostek.o           Storage.h
    BitHoist.h         Exormacs.h         Intellec.c         Options.c          Storage.o
    BitHoist.o         Exormacs.o         Intellec.h         Options.h          TekExtended.c
    BitHoist.r         ExtractBCC         Intellec.o         Options.o          TekExtended.h
    CRC.c              HostTypes.h        License            ReadMe             TekExtended.o
    CRC.h              Identify.c         MacObject.c        Series.c           TekHex.c
    CRC.o              Identify.h         MacObject.h        Series.h           TekHex.h
    ChangeLog          Identify.o         MakeFile.mac       Series.o           TekHex.o
    Chunks.c           Identify.r         Makefile           Signetics.c        ToDo
    Chunks.h           IdentifyBCC.r      Makefile.ix        Signetics.h        akal.bin
    Chunks.o           IdentifyBCCTest.r  Mostek.c           Signetics.o
    mac $ pwd
    /Users/mac/BitHoistServer
    mac $ # akal.bin is last becase it starts with a lower case lettter!
    
    
    mac $ ./bithoist -id -mask akal.bin
    ---- cut here ----
                    0x0, 0x1000, scan, seq, sum, mask, spec, 0x57ba9cf4,
    #ifndef rez
                    1, 1,
    #endif
                            begin
                            0x0, 0x1000
                            end,
                            begin
                            sumlo, sumhi
                            end,
    ---- cut here ----
    File 'akal.bin'
     Mask ID:  Unknown
    
    
    mac $
    Last edited by historystamp; 02-11-2012 at 02:28 AM.

  5. #5
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,862
    It looks like you've got it working on your machine. You happened to pick a calibration which bithoist is unaware of. Try the file "sunbird.bin" which is included in the zip file I uploaded. You should see

    Code:
    C:\bithoist>bithoist -id sunbird.bin
    File 'sunbird.bin'
     Address:  0xc000,0xffff
     CRC:      0xf3680b8f
     Mask ID:  58
     ID byte:  0x58
     Sum word: 0xd1ee
     Sequence: Dec 3, 1990 #1420 (0D2A058C)
     Scan ID:  3411
     BCC:      AUWR3607 (stock)
    I only offer to compile a version on Intel platform because I don't know the portability of a file compiled on a Mac.

  6. #6
    Fuel Injected! historystamp's Avatar
    Join Date
    Dec 2011
    Location
    USA
    Posts
    169
    Where did you upload Sunbird.bin? I'll need a link.

    Robert

  7. #7
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,862
    It's zipped up with bithoist in the "uphill to school both ways" thread.
    http://www.gearhead-efi.com/Fuel-Inj...0&d=1318993955

  8. #8
    Fuel Injected! historystamp's Avatar
    Join Date
    Dec 2011
    Location
    USA
    Posts
    169
    plus I've been reading through bithoist code to understand how it works and maybe we can put an ID program up as well.
    I think I will be able to run on this web site from a technical perspective. I'm concentrating on writing a PhP script to invoke the BitHoist program.

    I'm holding off trying to figure out how to add more bins to the program.

    Robert

  9. #9
    Fuel Injected! historystamp's Avatar
    Join Date
    Dec 2011
    Location
    USA
    Posts
    169
    What I'm thinking of doing will require the existing BitHoist program to be run on the server. The question is will GoDaddy let a program such as BitHoist run on their server. In other words, will GoDaddy let someone upload a binary file and let a PHP script run on the GoDaddy server?

    I was thinking EagleMark was running a personal web server.

    Robert

  10. #10
    RIP EagleMark's Avatar
    Join Date
    Feb 2011
    Location
    North Idaho
    Age
    64
    Posts
    10,477
    Quote Originally Posted by historystamp View Post
    I was thinking EagleMark was running a personal web server.

    Robert
    Oh no, not falling for that again! No need nowadays!

    Quote Originally Posted by historystamp View Post
    What I'm thinking of doing will require the existing BitHoist program to be run on the server. The question is will GoDaddy let a program such as BitHoist run on their server. In other words, will GoDaddy let someone upload a binary file and let a PHP script run on the GoDaddy server?

    Robert
    All forum and web based software is placed in my FTP folders. Programs just need proper path to all server side includes. Anything you need is there!

    1990 Chevy Suburban 5.7L Auto ECM 1227747 $42!
    1998 Chevy Silverado 5.7L Vortec 0411 Swap to RoadRunner!
    -= =-

  11. #11
    Fuel Injected! historystamp's Avatar
    Join Date
    Dec 2011
    Location
    USA
    Posts
    169
    I've made some progress on porting BitHoist to run an the web.

    I've gotten BitHoist to work in my web server!



    Positive:
    -- got a prototype PHP scripts written
    -- got linux version of BitHoist compiled
    -- lots of debug info in scripts.-
    -- lots of checking on input parameters

    Problems:
    -- just a prototype for now.

    Update: BitHoist is putting all/most output to error and PHP only returns normal output. I've used some Unix kung-fu to get around this.

    I sure wish there was a little more documentation on BitHoist.

    You should upload all the files to the same directory/folder. I placed all these files in a folder called bithoist and placed the folder with all the other stuff I have on my web server.

    I'm running Apache/PHP 5.

    Robert
    Attached Files Attached Files
    Last edited by historystamp; 04-16-2012 at 10:25 PM.

  12. #12
    RIP EagleMark's Avatar
    Join Date
    Feb 2011
    Location
    North Idaho
    Age
    64
    Posts
    10,477
    Well wouldn't that be cool!

    I'll have to find some time to try this...

    1990 Chevy Suburban 5.7L Auto ECM 1227747 $42!
    1998 Chevy Silverado 5.7L Vortec 0411 Swap to RoadRunner!
    -= =-

  13. #13
    Fuel Injected! historystamp's Avatar
    Join Date
    Dec 2011
    Location
    USA
    Posts
    169
    Once the php pages and BitHoist are install on the web server, you can ...

    Run bithoist:
    1) Point your web browser to query.php
    2) Select a bin
    3) click on the upload button.

    This invokes the server based web page of reply.php.

    At present, you will see a lot of debug information. The actual output from BitHoist is surrounded by horizontal lines.

    I used the sunbird.bin file and I included it in the zip file. Here is a picture of the BitHoist output. You'll need to scroll down in your web browser to see:
    Picture 2.png
    Last edited by historystamp; 02-27-2012 at 11:13 PM.

  14. #14
    Fuel Injected! historystamp's Avatar
    Join Date
    Dec 2011
    Location
    USA
    Posts
    169
    Enhanced security of php code by following advice in Essential PHP Security by Chris Shiflett.

    Split reply.php into two files. Should be able to adjust file reply.php to include template code.

    Include test case write up. See file testFilesProcedures/testCases.txt

    See earlier post in this thread for changed code.

    Robert
    Last edited by historystamp; 04-16-2012 at 10:33 PM.

  15. #15
    RIP EagleMark's Avatar
    Join Date
    Feb 2011
    Location
    North Idaho
    Age
    64
    Posts
    10,477
    We do appreciate the work Robert! If it works it's just another cool addition to Gearhead-EFI.com team effort.

    If we get some bad weather, hurt my back or get insomnia back I will give it a shot!

    Right now I have winded down web work with good weather coming in North Idaho and have many chores to do. My butt hurts from all the web work this winter and I need to get some excercise! This is without pulling LT1 motor from wrecked Roadmaster Wagon, resealing etc... and installing in Chevy Caprice wagon.

    With everything going to a new 4G server I'm hoping I can give FTP access to folder and guys could have there own folder to work on projects like this. Since I have many client websites on my server space it is just not practical to give complete acceess to server for individual projects... something I would like to do!

    1990 Chevy Suburban 5.7L Auto ECM 1227747 $42!
    1998 Chevy Silverado 5.7L Vortec 0411 Swap to RoadRunner!
    -= =-

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •