Go to advanced search

by drtechno
Wed Jul 14, 2021 11:23 pm
Forum: Advanced users
Topic: Web server with two IP addresses
Replies: 10
Views: 420

Re: Web server with two IP addresses

There are two ways that its done:

either add you server alias names in the /etc/host file on all those computers.

or install the dns server. Linux uses bind9
If you do this route, you will need to assign this dns server to your router.
by drtechno
Wed Jul 07, 2021 1:24 pm
Forum: General programming discussion
Topic: Is there any unique serial number on rpi machine?
Replies: 14
Views: 1274

Re: Is there any unique serial number on rpi machine?

Hi: I want to kown whether rpi machine has a unique serial number like cpuid,biosid,etc, if it is, how to get it? /etc/machine-id is one file that gets generated at os install, but the way they distribute the OS on this platform, I don't know if it regenerates this. It would be easier to generate a...
by drtechno
Sun Jul 04, 2021 8:31 pm
Forum: MicroPython
Topic: weird character when using UTF-8
Replies: 24
Views: 759

Re: weird character when using UTF-8

In python2 you have to put this within the first two lines of the file or else it will do that.

Code: Select all

#-*- coding: utf-8 -*-
Of course this will do this when character encoding is different between two data sources or was stored in a file with a different encoding than what is viewing it.
by drtechno
Sun Jul 04, 2021 8:17 pm
Forum: Other projects
Topic: Instax Printer (or similar) for foto booth project
Replies: 2
Views: 268

Re: Instax Printer (or similar) for foto booth project

Depends on paper + ink supplies in the long run.

Last coin op photo booth I upgraded from a inkjet printer to a Xerox colorQube solid ink printer because in the long run the paper was cheaper.
by drtechno
Sun Jul 04, 2021 7:56 pm
Forum: Troubleshooting
Topic: Can and can't login to Chrome
Replies: 3
Views: 122

Re: Can and can't login to Chrome

They took the connecting functionality out of chromium. So the only way to connect to cloud services is through the website using that program. Other web browsers like firefox use a Avahi connection scheme to google cloud services which chromium doesn't use unless you go to the google site and log i...
by drtechno
Sun Jul 04, 2021 7:40 pm
Forum: Troubleshooting
Topic: PWM problem
Replies: 16
Views: 525

Re: PWM problem

I'm thinking the OP needs to use a different mode.

ALT0 or ALT5 instead of OUTPUT
by drtechno
Sun Jul 04, 2021 5:26 pm
Forum: Python
Topic: PHP not actioning requests.post
Replies: 20
Views: 536

Re: PHP not actioning requests.post

you shouldn't need to ssh into a hosting machine to fix this. the folder "/newlogs" sometimes needs to be 664 on some hosting setups, but most now these days are configured to work with permissions 644 . One thing that is important is to pass the correct path to fopen(). Also clicking on y...
by drtechno
Sun Jul 04, 2021 3:57 pm
Forum: Beginners
Topic: Connecting a PC fan to Raspberry Pi 4
Replies: 3
Views: 210

Re: Connecting a PC fan to Raspberry Pi 4

Hey there As my Raspberry Pi 4 tends to get rather hot, I plan to cool it using a Pure Wing 2 fan (3-pin, https://www.bequiet.com/en/casefans/506). Now I'm not quite sure how to connect it. The cables are all black, but there are some descriptions at the pins: The first pin has an arrow symbol (⇀),...
by drtechno
Sat Jul 03, 2021 4:16 pm
Forum: Networking and servers
Topic: Apache2 - /(Subpage) instead of Port # (WeeWX)
Replies: 4
Views: 271

Re: Apache2 - /(Subpage) instead of Port # (WeeWX)

I thought there was a port issue looking at the subject line, the userguide https://www.weewx.com/docs/usersguide.htm doesn't mention any need to specify to specify the port in the url. no need to unless you set it up that way. In that guide, they are landing the html pages in a port 80 directory (...
by drtechno
Sat Jul 03, 2021 3:52 pm
Forum: Networking and servers
Topic: Apache2 - /(Subpage) instead of Port # (WeeWX)
Replies: 4
Views: 271

Re: Apache2 - /(Subpage) instead of Port # (WeeWX)

If you wanting http://localhost to have a index page , then a sub directory with an index page (like http://localhost/foo) , you would just add the folder, then give it permissions to users to read it. for something like http://localhost/foo: PI:~/www/html$ mkdir foo PI:~/www/html$ chmod +644 foo If...
by drtechno
Sat Jul 03, 2021 3:11 pm
Forum: Networking and servers
Topic: pi-hole + access point at the same time
Replies: 2
Views: 298

Re: pi-hole + access point at the same time

set up the pihole first using the normal static ip , then install hostapd (host access point daemon). It doesn't matter if the pihole is the dchp server in the network btw but you would set up the dns and dchp services up first before adding on hostapd . Sometimes order of installing modules count, ...
by drtechno
Sat Jul 03, 2021 2:33 pm
Forum: Networking and servers
Topic: Hosting a java web app on raspberry pi.
Replies: 3
Views: 475

Re: Hosting a java web app on raspberry pi.

There are several options. Most popular is node.js AKA JSNode.

To install:

Code: Select all

sudo apt-get update
sudo apt-get install nodejs
by drtechno
Sat Jul 03, 2021 2:28 pm
Forum: Networking and servers
Topic: How can get database from sql (phpMyAdmin on Raspberry Pi) for Xamarin.Forms (on PC)
Replies: 5
Views: 360

Re: How can get database from sql (phpMyAdmin on Raspberry Pi) for Xamarin.Forms (on PC)

The OP wouldn't use any php in the client code.
The OP would use C# calls to the database to communicate with it directly, or send data to a php processing page via C# HttpClient POST method.

phpmyadmin is just a php app using http/php interface to communicate with the mysql sever.
by drtechno
Sat Jul 03, 2021 1:52 pm
Forum: Networking and servers
Topic: Windows 10 0x80070035 Error Code When Connecting to Pi4B Samba Server [ABANDONED]
Replies: 5
Views: 273

Re: Windows 10 0x80070035 Error Code When Connecting to Pi4B Samba Server

If one of the computers is wireless, Check your settings in the new router to see if the wireless is isolated. Because if it is isolated, you could still ssh into it, but will not connect via network neighborhood because the netbios names are isolated. Since changing the router broke this setup, so ...
by drtechno
Sat Jul 03, 2021 12:48 pm
Forum: Graphics, sound and multimedia
Topic: how to remove microphone delay?
Replies: 3
Views: 282

Re: how to remove microphone delay?

You will always get a delay looping through software. That is why the monitoring button inside DAWs are useless unless you running specialized low latency audio gear (less than 10ms round trip). To get by, the pro-sumer level gear have a mixer that routes the microphone signal to the speaker outputs...
by drtechno
Sat Jul 03, 2021 12:21 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 555 timer for button debouncing
Replies: 4
Views: 557

Re: 555 timer for button debouncing

GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) or GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP) Does it matter how I set pull up or pull down? Given LOW at pin 3, 555 startuptime? not really because any pull up or down the output on the cmos 555 will act like a loading resistor to vcc or g...
by drtechno
Mon Jun 21, 2021 10:18 pm
Forum: Other projects
Topic: Scan server with web application
Replies: 3
Views: 528

Re: Scan server with web application

With php, you could scan it by shell_exec() using one the fallowing code, depending on the scanner type using the standard command line functions of SANE: [b]FOR USB[/b] echo shell_exec( 'scanimage --device "epson2:libusb:002:003" --mode Color --format=png --output-file preview.png --progr...
by drtechno
Sun Jun 20, 2021 3:51 pm
Forum: Other projects
Topic: Print server (CUPS) is very slow with pdf files
Replies: 7
Views: 631

Re: Print server (CUPS) is very slow with pdf files

The reason why I told the OP to look for a postscript driver is that it would read the PDF and print because PDF files are written in postscript format, so there would be no conversion and print fast PDF files are not PostScript. They are based on PostScript, but have other extensions. Actually CUP...
by drtechno
Sun Jun 20, 2021 7:15 am
Forum: Other projects
Topic: Print server (CUPS) is very slow with pdf files
Replies: 7
Views: 631

Re: Print server (CUPS) is very slow with pdf files

Some PDFs are really slow to process, and this is where the extra processing power and memory of the laptop win out over the Raspberry Pi's rather more modest capabilities. CUPS converts almost everything¹ to PDF for printing anyway, so even if you're printing a Word document from a laptop via your...
by drtechno
Sun Jun 20, 2021 4:45 am
Forum: Other projects
Topic: PI Zero W - Hottub Controller - Help needed
Replies: 11
Views: 598

Re: PI Zero W - Hottub Controller - Help needed

The problem with using the ULN2003 is 2 fold . 1. You still have to have the 12V ground and the pi 5V ground connected together, this can cause problems as others have found when switching mains voltages on the same circuit board because of electrical noise being over laid on the 12V ground. There ...
by drtechno
Sat Jun 19, 2021 2:50 pm
Forum: Troubleshooting
Topic: PW recovery failed; init=/bin/sh doesn't work
Replies: 19
Views: 512

Re: PW recovery failed; init=/bin/sh doesn't work

try adding this to your boot options line: systemd.unit=rescue.target or if you are using noobs, jumper 5&6 together (does not work on newer OS except noobs) What boot options line? Do you by chance mean /boot/cmdline.txt? Edit: and the OP has already tried it. As have I on a non broken system ...
by drtechno
Sat Jun 19, 2021 1:32 am
Forum: Other projects
Topic: I want to create an "On Air" sign for my studio.
Replies: 3
Views: 316

Re: I want to create an "On Air" sign for my studio.

Well in c you have to download a library to use. This c++ code uses the library called libjpeg : #include <jpeglib.h> int loadJpg(const char* Name) { unsigned char a, r, g, b; int width, height; struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr jerr; FILE * infile; /* source file */ JSAMPAR...
by drtechno
Sat Jun 19, 2021 12:10 am
Forum: Other projects
Topic: PI Zero W - Hottub Controller - Help needed
Replies: 11
Views: 598

Re: PI Zero W - Hottub Controller - Help needed

The first thing I am going to tell you that your driver chip is not the greatest thing to interface with the pi. Because mosfets are what should be used. But its not impossible to get them working, but you need to use safety circuits to protect your pi. Here is a method of implementing a safety circ...
by drtechno
Fri Jun 18, 2021 11:08 pm
Forum: Other projects
Topic: Print server (CUPS) is very slow with pdf files
Replies: 7
Views: 631

Re: Print server (CUPS) is very slow with pdf files

Be sure to use the postscript driver that was written for your printer instead of the general graphics one. If that is your issue, If you are using it by wireless, that is your issue because wireless performance on them are terrible. HP wireless printing isn't the greatest because I find them not st...
by drtechno
Fri Jun 18, 2021 5:10 pm
Forum: Troubleshooting
Topic: PW recovery failed; init=/bin/sh doesn't work
Replies: 19
Views: 512

Re: PW recovery failed; init=/bin/sh doesn't work

try adding this to your boot options line:

Code: Select all

systemd.unit=rescue.target
or if you are using noobs, jumper 5&6 together (does not work on newer OS except noobs)

Go to advanced search