Communication via http
Moderator: Rathinagiri
Communication via http
Hi guys!
I've realised my first Arduino project. It will switch on/off lamp indicators depend on barcode scanner read in the warehouse.
Barcode scanner sends barcode to computer, computer sends info to my arduino which lamp should be switched on.
I've created http server which wait for info from computer via http.
I can control lamps via internet browser, calling arduino server: http://192.168.20.190/BRAMKA=3
I want to create simple application, which can call such a page.
Second problem is to act as http server to read info from wifi barcode reader.
Can anybody provide simplest http server application?
regards, Marek
I've realised my first Arduino project. It will switch on/off lamp indicators depend on barcode scanner read in the warehouse.
Barcode scanner sends barcode to computer, computer sends info to my arduino which lamp should be switched on.
I've created http server which wait for info from computer via http.
I can control lamps via internet browser, calling arduino server: http://192.168.20.190/BRAMKA=3
I want to create simple application, which can call such a page.
Second problem is to act as http server to read info from wifi barcode reader.
Can anybody provide simplest http server application?
regards, Marek
- serge_girard
- Posts: 3176
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Communication via http
Marek,
Can you please explain more about what you want?
I have a NETIO server but I don't think you mean that.
Serge
Can you please explain more about what you want?
I have a NETIO server but I don't think you mean that.
Serge
There's nothing you can do that can't be done...
Re: Communication via http
I need to build app, which will wait for transmision at eg. 80 port.
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: Communication via http
I remember your work. But, I need minimum solution
Re: Communication via http
I've simplified my procedure to control lamps:
I can switch on/off 32 sending www request:
Now, I need to create server, which will wait for request from codebar scanner
Code: Select all
PROCEDURE SendRequestViaWWW
param cURL
local lSilent := .f.
LOCAL oCon, i
local ret := .f.
local cOdp:=""
for i:=1 to 3
// number of tries
oCon := TipClientHttp():New( cUrl )
IF oCon:Open()
cOdp := oCon:ReadAll()
msgdebug("Connected?", cOdp)
oCon:close()
ret := .t.
exit
endif
next i
if !ret
MsgBox("Error in connection " + oCon:lastErrorMessage())
endif
RETURN ret
Code: Select all
SendRequestViaWWW("http://192.168.20.190/BRAMKA=16")
Now, I need to create server, which will wait for request from codebar scanner
Re: Communication via http
Marek, maybe this will be helpful: micro web server on hb (uhttpd)
https://github.com/harbour/core/tree/ma ... as/httpsrv
and
https://github.com/vszakats/harbour-cor ... ib/hbhttpd
https://github.com/harbour/core/tree/ma ... as/httpsrv
and
https://github.com/vszakats/harbour-cor ... ib/hbhttpd
Re: Communication via http
I've created my solution. It's very small and it's doing what I want.
A month ago, I even didnt dream I'll be able to control some devices from harbour app via wifi.
I'll present my app later.
A month ago, I even didnt dream I'll be able to control some devices from harbour app via wifi.
I'll present my app later.
Re: Communication via http
So I'm waiting impatiently
Last edited by edk on Sun Jan 07, 2018 11:34 am, edited 2 times in total.