After some research, It turned out that the Arab bank of Jordan has a unified SWIFT code (Same as BIC) for all their branches, which is ARABJOAX100, you will need to combine that with your account number which is 13 digits, all other swift codes for the branches are obsolete
بعد البحث، تبين ان كل فروع البنك العربي تستخدم سويفت كود (بيك كود) موحد وهو ARABJOAX100 ، جميع السويفت كودز القديمه للفروع القديمه غير مطلوبه، بالاضافه الى السويفت كود ستحتاج الى رقم حساب وهو رقم من 13 خانه (بالاضافه الى شحطتين تفصلان الارقام)
Even though this looks like a long post, I have composed it for a friend and unlike mostly everything else on this blog, this is not just for my own reference, so it should be easy to follow and understand (I hope).
What for ?
This is a very valid question, Why would i use a slower Arduino and connect it to WiFi using an ESP8266 you ask, why not just use the ESP8266 or even ESP32 as both the WIFI and the microcontroller to run our code? There are many situations where you would want to, the most common of which is the analogue and digital pins on an Arduino board, the friend I am writing this tutorial for is looking to use the 50 digital pins on an Arduino Mega Pro Embed as select lines for 50 Arduino pro mini boards, another might be the analogue pins on an Arduino (8 or 16 depending on the board), so digital and ADC pins on an Arduino might be needed.
You might ask why not an ESP32, it has a bunch of digital and analogue pins, the answer is that sometimes they are not enough, especially when you find out that the analogue pins on the ESP32 are divided into 2 groups, one of them is not usable if you enable WiFi.
Another valid reason is all the shields that have Arduino libraries but those libraries do not function with ESP, which is probably even more common of a problem than the pins problem.
So in short, even though the need might not arise very often, it does exist.
The ESP8266 as an Arduino WIFI shield
Arduino does not come with WiFi, there are shields from Arduino that provide WiFi, and those shields are based on ESP8266 which is a very cheap WiFi enabled microcontroller. but there is nothing stopping you from using any ESP8266 board and connecting it to your Arduino,
Which one: They should all work, and you probably already have one since you are here, I am personally using the slightly more expensive $4.6 boards that come with a USB-TTL chip and power regulator built in, if you want to use the cheaper boards (esp8266-01), you might want to connect it to the 3.3V output of your Arduino, but you will still need a level shifter, I would expect you also have a UART USB to serial board.
Price: models from the 01 ($2.5 each when you get 5 boards for $12 ) up to the 12E or 12F ($4.6 each when you buy them as 3 for $14). not bad for a WiFi enabled microcontroller !
Communication between Arduino and ESP8266
Arduino can talk to the shield either via UART or via SPI (Given the libraries written for this), SPI is up to three times faster than UART, but most of the time your application, be it sensor data or the like, will not be able to flood any of those 2 buses, In this post, I will cover both, SPI first then serial.
The components (hardware)
1- ESP8266 (Any variant should do) 2- Logic level shifter, since Arduino is 5V and ESPs are 3.3, I have been told that the ESP 12E and 12F are 5 volt logic tolerant, but I would think going with a logic shifter might save me something down the road, hours of debugging, or a new board, or something i fail to foresee 3- An Arduino, I am using a mega, but an UNO should do just fine (I will cover it) 4- Wires to connect all the above, and probably a breadboard (I like to solder things to a universal PCB board, but not everyone likes to do this) 5- A power supply, in my case a couple of micro USB cables and a 5V source that is my a power supply.
Software on the ESP8266
1:SPI: If you are going with SPI, you will need to flash JiriBilek / WiFiSpiESP onto your ESP8266, fortunately, this comes with an ino file that you can use your Arduino software to flash directly
2:UART-Serial: If you are going with serial, you might want to go with jeelabs / esp-link, mind you, Arduino themselves forked this before for their own WiFi shields, but since then, the jeelabs esp-link has added many features, so i would recommend you go with the original jeelabs.
Software on Arduino
1:SPI: if you have installed the SPI software from above on your ESP8266, the accompanying Arduino software would be JiriBilek / WiFiSpi, The library implements almost the same functions as the Arduino WiFi library.
2:UART-Serial: there is no library to go with this case that is beyond your regular serial bus if you want to exchange serial info, so if this is a 3D printer, software on your PC should be able to translate the data into serial, and it would be transparent, but what if you want to use WiFi from within Arduino, like a client that downloads pages or sends post data to pages,
Choice of UART-Serial vs SPI
UART-SERIAL, has certain advantages and disadvantages, with serial, i can simply update the software on the Arduino over the air over WiFi, I can get serial messages and use WiFi at the same time both as client and server, SPI on the other hand is faster, but it is not out of the box compatible with serial messages. Another disadvantage of SPI is that it needs a bit of extra code to allow the board to boot
Implementing WIFI over SPI
SPI – The hardware, how to connect
The H.SPI (On the ESP8266) is connected to the SPI on the Arduino like you would connect any SPI bus, with the addition of a logic level shifter (Red part in the photo), We connect Clock to clock, Slave select to select line, MOSI to MOSI and MISO to MISO, there is nothing to it. I have added a table for the Uno (Same for Arduino Pro Mini) and the Mega for your convenience
Now assuming you are done with the connection above, it is time to load some software.
SPI: Installing the WiFiSpiESP on the ESP8266
First, we need to load the software to ESP8266, the JiriBilek / WiFiSpiESP comes with a .ino file, so all you need to do is load that into Arduino studio, connect your esp8266, compile and upload, now this part is done, no modifications are needed to this code since all the control is passed on to the Arduino, compile and upload.
If you are having trouble uploading the code or selecting the board, my 12E board works in Arduino studio as NODEMCU V1.0, if you don’t have any ESP8266 boards in your boards list, you will need to add it, there are many tutorials on using Arduino with esp8266.
SPI: software on the Arduino
On the Arduino side, you will have to include the library (WiFiESP), then include it in your code, the library should be readily available in your libraries menu of your Arduino Studio.
NOTE: Both the library and the software you installed on your ESP need to have the same release number (0.2.5 at the time of writing) or it would not work, the software is hard coded not to work if they don’t match, you will be presented with the error (Protocol version mismatch. Please upgrade the firmware) in your serial console during runtime, I know this because a couple of weeks ago, I contacted the author (Jiri) through GitHub, and he brought both versions of the software and the library current so that they would match, it was a small thing but if you ever get this error in the future, you know where to go, he was quick to fix it within hours.
Now to the Arduino code, inside the library, there are examples, all you need to do is upload one of those examples, most likely, you would want to start off with the WiFiWebClient, this example that comes with the library needs to be modified in two locations, the first is the credentials to your WiFi, and the other is to change the server you are connecting to from www.example.com to wherever that web server is. this should get you started on most projects.
In my case, I have had to modify a few things in the script to make it work, first of all, a short delay needs to be inserted before we check if the WiFi is connected, the other is to not have it die but rather try again if it is not for a set number of times
WiFi using UART-Serial
UART-SERIAL should be the as easy, I should be back here
The ESP8266 has a TX and RX pin that should be connected in reverse to the ones on the Arduino, RX (Receive) should be connected to send, and send to receive, both boards need to share a common ground (reference voltage), and an Arduino mega should be able to provide 3.3 volts with sufficient current for the ESP8266 if you plan to power the ESP from the MEGA, if you have an ESP8266 with an onboard voltage regulator, you can simply add it to the power supply directly through the VIN pin (rather than the 3.3V pin)
The most common reason for this is your cable, a charging cable that has higher resistance (worse thinner or damaged wire) will tell the phone to charge slower, reason for that is that your phone does not want to overwhelm a cable beyond it’s capacity and cause it to burn or even cause fires, but how does the phone know, well, ohm’s law will let it know, a voltage drop at the wire end once a load is attached (the charging is a load) tells it all it needs to know. then the phone can determine a safe current to draw.
2- Phone is already nearing a full charge
Because of how lithium batteries work, a phone can not charge the upper 10% (Or more) at full speed, speed is reduced as the phone gets full to protect the battery from degradation
3- Battery is overheating
Your phone will charge a hot battery slower, so if your phone is sitting in sunlight or is hot in general, it will charge at reduced speeds, this as well is to protect the battery from degradation or even becoming a hazard.
4- Your power brick capabilities
Power bricks are voltage and current regulated power supplies, but they lose capacity over time and degrade, sometimes, their connection with the cable is not clean, or the plating on the pins has worn out, or the spring like mechanism of the pins no longer holds the pin tight against the pins on the USB cable, sometimes it has low capacity to begin with by design
5- Your phone has a Quick Charge capability but your wall adapter does not
Many modern phones, especially on the higher ends have a fast charging feature, where the power brick provides a higher voltage rather than a higher current, your phone will first negotiate this capability with the charger, if your charger does not support this feature, rest assured, it won’t work, and the phone will fall back to 5V charging.
If you have any questions about this matter, feel free to ask me in the comments section
Sometimes you need to find the largest sub directory in a directory, for this, the DU command has an argument that can work for you, max-depth
du -h --max-depth=1 backup-final
The above will simply list all sub directories inside the backup-final directory alongside the size of the directory (recursive, including all files in sub directories)
One of the most annoying things that can happen to you is to disconnect your laptop from the network, then realize that there was a file moving job that was running, the command is going to get disconnected before mv gets the chance to delete the source files, the new copy is a hassle, i personally use rsync to continue such a copy with the delete source files flag
But it does not have to be this way, you can move the mv command to the background, the steps are simple
First, to suspend the job, you need to hit CTRL+z , once suspended, you should see a job number in the suspend acknowledgement
CTRL+Z
Now, the next step is to disown the job, because right now, if you close your terminal window, the job will still be terminated
disown -h %1 (replace one with your own job number which may be 1)
Now to get the job running again but in the background
bg 1
That is it, you can now close (logout) your terminal window
So the summery
ctrl+z
disown -h %1
bg 1
logout
Now mind you, the output to stdout will not display (In most cases), you will need to use process status ps x to see the process.
If you want to bring back the command into the foreground, all you need to do is execute the command jobs (to find the ID), then run the command fg 1 (if it was job number one), then to hide it again, you can ctrl+z then bg 1 again (No need to disown it this time)
Sometimes, you realize you would want to use LVM in a computer but you want a tutorial to take you there fast, So i have put this post together to get you up and running in 10 minutes or less.
First, let us start with the tools, install the following packages in your debian installation, (Debian 10-Buster in this tutorial)
In this tutorial, I have two 8TB disks i want to combine with LVM to use as one
1- Create partitions of type LVM on the disks
Why not use the disk without a partition ? See this post
Start by running parted on every physical disk, and creating a big partition to span the whole disk (Or if you are using empty spaces on old disks, any partition is good enough really)
In my example, where i wish to combine /dev/sdb and /dev/sdc into one logical volume (To be used as one block)
parted /dev/sdb mklabel gpt unit mib mkpart primary ext4 1 100% set 1 lvm on
Now, repeat the above, but this time for /dev/sdc
1- Prepare the physical volumes to be added to volume groups (those two partitions) (For instructions on how to add disks directly without an underlying partition which is not recommended, see here)
pvcreate /dev/sdb1 /dev/sdc1
Now, you can see what we have with the commands
pvdisplay or pvs
2- Add the PVs to a logical volume
vgcreate LVMGroup /dev/sdb1 /dev/sdc1
Volume group "LVMGroup" successfully created
this will create a volume group (VG) called LVMGroup, you can see the VGs you have with the commands (vgdisplay, vgscan, and vgs)
rsync is better than mv to move files because of a few reasons
First, it gives you much more control, for example the following command
rsync -a -v --ignore-existing --remove-source-files /hds/iscsi/all_new /hds/usb
Does not copy the files that are already at destination, meaning if there is a file with the same name in the same directory at the destination, it will not be overwritten, files moved will be deleted, and files that had counterparts and not moved will not be deleted
rsync -a -v --remove-source-files /hds/iscsi/all_new /hds/usb
While the command above will overwrite files, and delete whatever we have moved ! if files exist on the destination, it does not seem to be overwriting them, but it is probably somehow comparing them, then deleting the original
I had to investigate this as a move command resulting in an error did not remove the files, the error was relevant to the file name being too long
When tarring a file, even if the process (Nice) priority is low, sometimes the IO will make the computer unusable, so what you can do it ask Linux to only work on the IO intensive job when there is no other application requiring IO
ionice -c 3 -p $PID
The above class (3) means only if no other application is using this disk
The answer is, depending on your needs, but you are not here to hear that now are you, so I did a little experiment, tailored specifically for a certain need that does not apply accross the board, but combined with other experiments online, this might give you an idea
The experiment is annotating an image with image magic plugin for PHP
Both running buster (Debian/Raspbian 10), both on PHP7.3 and everything fresh installed
the PC has 8GB of DDR3 Ram, and the PI 1GB of LPDDR2-900 SDRAM
The PC has a 12 year old “Intel(R) Core(TM)2 Quad CPU Q9450 @ 2.66GHz”
The PC was around 7 fold faster than the raspberry PI 3 (the mean of a trial of 20 runs, with all the files cached in ram by the linux kernel)
The trial was done with a discrete VGA card (AMD RADEON) and with the chipset’s own graphics card, results were identical (The VGA card did not have it’s drivers installed, so we don’t know if it might have an effect or not)
I am now moving into even older PCs to compare performance, and will report the results here again to see what the limiting factors might be
Well, to make a long story short, I make large scans that don’t need to be on my system disk, I would like to have them stored on the spinning disk, So, i searched online, and found that people were suggesting that I create a symlink to the new location in place of the Scanned Documents folder, Something like
The above obviously has downsides, backup software, changed disk IDs, or other unforeseen effects, In my mind, there is no way the developers of Windows Fax And Scan have hard coded this into the application,
Another solution would have been to move the entire Documents folder (Right click it, then change it’s location, windows provides that option), But not everyone wants that, So there is a third more elegant solution (Even though this works like a charm)
The third is to look in the registry (Find) where Windows Fax And Scan stores it’s path (Look for the word scanned for example), and change that, but i Have already gone with the second, the third should be simple
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok