تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4712 أدوات العرض

I manage to print out the "PosBox Status" ticket with correct IP data.
But, POS doesn't see the printer, which is ridiculous when it has printed the ticket one minute before.

This is the weird error I am getting:

2014-08-10 12:14:22,688 50368 INFO ? openerp.addons.hw_escpos.controllers.main: connected : Connected to Epson TM-T20
2014-08-10 12:14:22,694 50368 INFO ? openerp.addons.hw_escpos.controllers.main: error : [Errno None] Configuration not set
2014-08-10 12:14:22,694 50368 ERROR ? openerp.addons.hw_escpos.controllers.main: ESC/POS Error: [Errno None] Configuration not set

... as you may notice, the printer is properly recognized, but without Configuration ?

Just one comment aside. 
I had to "import platform" module, and modify "main.py" under hw_escpos to corretly retrieview the local IP of my Mac, as "ifconfig" throws slightly different results:

    def print_status(self,eprint):
        localips = ['0.0.0.0','127.0.0.1','127.0.1.1']
        if platform.system() == 'Darwin':
            ips =  [ c.split(' ')[1].split(' ')[0] for c in commands.getoutput("/sbin/ifconfig").split('\n') if 'inet ' in c ]
        else:
            ips =  [ c.split(':')[1].split(' ')[0] for c in commands.getoutput("/sbin/ifconfig").split('\n') if 'inet addr' in c ]
        ips =  [ ip for ip in ips if ip not in localips ]

... (rest of the code) ...

 

Am I missing something?

 

 

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

I have finally found the answer myself :-)

YES !!

We only need to install the necessary Python module:

I use macports to solve dependencies:
sudo port install py27-pyusb-devel

and

Use macport to install pip:
sudo pip install qrcode

That's all you need

 

 

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
ديسمبر 22
2341
1
أبريل 20
6890
0
فبراير 19
3426
1
يوليو 18
2354
0
نوفمبر 17
2848