| | |
USB device command
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Serial communication has to be done fairly low level using Windows API's.
You can buy a wrapper component called ActiveComport (USB is just a much much faster RS232) here which gives you an interface you can manipulate in scripting languages.
I beleive on Linux it's simpler because everythings a file, so you just read and write your bits to the file that represents your USB port or device, if I find any leads in that direction I'll post them.
You can buy a wrapper component called ActiveComport (USB is just a much much faster RS232) here which gives you an interface you can manipulate in scripting languages.
I beleive on Linux it's simpler because everythings a file, so you just read and write your bits to the file that represents your USB port or device, if I find any leads in that direction I'll post them.
•
•
Join Date: Mar 2005
Posts: 3
Reputation:
Solved Threads: 0
Thanks! But if it is possible to access USB devices then any webpage can just control your peripherals and cause a mess, no?
Secondly, can PHP give orders to ActiveComport? and if so, what functions can be used? I would like to use PHP for a new POS (point of sale) software I am developing for my shop. The problem is sending orders to the cash drawer/printer using php.
Secondly, can PHP give orders to ActiveComport? and if so, what functions can be used? I would like to use PHP for a new POS (point of sale) software I am developing for my shop. The problem is sending orders to the cash drawer/printer using php.
•
•
•
•
Originally Posted by hollystyles
Serial communication has to be done fairly low level using Windows API's.
You can buy a wrapper component called ActiveComport (USB is just a much much faster RS232) here which gives you an interface you can manipulate in scripting languages.
I beleive on Linux it's simpler because everythings a file, so you just read and write your bits to the file that represents your USB port or device, if I find any leads in that direction I'll post them.
Any webpage cannot control your USB port, PHP is not just for web pages although that's where it is most commonly used. ActiveComport is a component that you will have to register with the windows registry on the machine on which you are executing your PHP script. I'm afraid I am not an authority on PHP as I have used it very little, and the site I gave does not mention PHP specifically. But if VBScript can use it I would be very surprised if PHP couldn't.
•
•
Join Date: Mar 2005
Posts: 3
Reputation:
Solved Threads: 0
This is the printer I will use: http://www.orient-technologies.com/p...BTP-2002CP.pdf .
The cash drawer connects directly to the printer so when it gets a command to print, it tells the drawer to open. So really what I need is just communication with the printer.
The cash drawer connects directly to the printer so when it gets a command to print, it tells the drawer to open. So really what I need is just communication with the printer.
•
•
•
•
Originally Posted by hollystyles
Ooh nice, I could find some uses for that, thinking send/receive SMS text messages thru PDA phone.
Choky,
I take it your cash drawer has a USB interface, does it not have any software with it, perhaps the vendor or manufacturer have a development KIT ?
Sorry, I'm really lost here.
Why do you want to mess about with low level stuff like communicating with a printer?
I take it this PHP POS software is going to run on a pc, on which the printer is installed as a device right?
so you just want to create a receipt document from your sales data and just put it in the print queue right ? let your OS worry about talking to the printer.
Why do you want to mess about with low level stuff like communicating with a printer?
I take it this PHP POS software is going to run on a pc, on which the printer is installed as a device right?
so you just want to create a receipt document from your sales data and just put it in the print queue right ? let your OS worry about talking to the printer.
![]() |
Similar Threads
- USB device and INF file (USB Devices and other Peripherals)
- Samsung MP0603H USB Device (Windows 95 / 98 / Me)
Other Threads in the PHP Forum
- Previous Thread: Php / Rtf
- Next Thread: php mysql help
Views: 5619 | Replies: 7
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cookies cron curl database date directory display download dynamic ebooks echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail mediawiki menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql stored structure subdomain syntax system table tutorial update updates upload url validation validator variable video web xml youtube






