Preparation of phenylpiperazines from the corresponding aniline 
Reference: J. Med. Chem. 29, 630 (1986)

1-(2,5-Dimethoxyphenyl)-piperazine Dihydrochloride

A mixture of bis(2-chloroethyl)amine hydrochloride (23.3g, 131 mmol), 
anhydrous K2CO3 (18g), freshly distilled 2,5-dimethoxyaniline 
(20.0g, 131 mmol) and diglyme (75 mL) was heated at reflux for 48 h, 
allowed to cool to room temperature, and then poured into water 
(200 mL). The aqueous mixture was made basic (about pH 12) by the 
addition of a saturated KOH solution and was extracted with ethyl 
acetate (3x200mL). The combined organic portions was washed with 
water (3x200mL), dried over MgSO4 and evaporated to dryness under 
reduced pressure to yield a dark oil. 

Vacuum distillation afforded 18 grams (62%) of the amine as a 
light-yellow liquid, bp 142-146C at 0.18 mmHg. A saturated soln 
of HCl gas in anhydrous diethyl ether was added to a solution of 
the freebase in a small amount of 100% ethanol (can use methanol) 
to give the title compound, mp 218-220C after recrystallization 
from 100% ethanol. 

1-(4-Bromo-2,5-dimethoxyphenyl)-piperazine Dihydrobromide

A solution of Br2 (3.2g, 20mmol)in glacial acetic acid (20 mL) was 
added in a dropwise manner to a solution of 1-(2,5-Dimethoxyphenyl)-
piperazine freebase (4.0g, 20 mmol) in 48% HBr (4 mL) and glacial 
acetic acid (5 mL) at 0C, and after the addition was complete, the 
solution was stirred at room temperature for another 4 h. The solvent 
was removed under reduced pressure to afford a white solid material 
(mp 220-224C after recrystallization from 100% ethanol). 

This is the hydrobromide salt. Conversion of it to the hydrochloride 
is wasteful and may not be necessary. But if wanted, here goes:

1-(4-Bromo-2,5-dimethoxyphenyl)-piperazine Dihydrochloride

2 grams of the above compound was dissolved in 10 mL H2O; the soln 
was made basic (to ca pH 9) with 10% aqueous NaOH and extracted with 
ethyl acetate (3x50mL), the combined organic portion was dried over 
MgSO4 and evaporated under reduced pressure to afford a dark oil. 
The oil can be distilled (optional step) with some difficulties, 
bp 72-75C at 0.08 mmHg. The oil is then dissolved in 100% ethanol 
and dry HCl gas is bubbled through the solution until salt formation 
ceases. Recrystallization from 100% ethanol gave 0.3 grams of the 
title compound as small white crystals, mp 203-205C (dec).
 